mirror of https://github.com/MISP/misp-modules
add time sleep in each request
parent
602da3d1a3
commit
e9747a3379
|
@ -1,6 +1,7 @@
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
from dnstrails import APIError
|
from dnstrails import APIError
|
||||||
from dnstrails import DnsTrails
|
from dnstrails import DnsTrails
|
||||||
|
@ -79,6 +80,7 @@ def handle_domain(api, domain, misperrors):
|
||||||
misperrors['error'] = 'Error dns result'
|
misperrors['error'] = 'Error dns result'
|
||||||
return misperrors
|
return misperrors
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
r, status_ok = expand_subdomains(api, domain)
|
r, status_ok = expand_subdomains(api, domain)
|
||||||
|
|
||||||
if status_ok:
|
if status_ok:
|
||||||
|
@ -87,6 +89,7 @@ def handle_domain(api, domain, misperrors):
|
||||||
misperrors['error'] = 'Error subdomains result'
|
misperrors['error'] = 'Error subdomains result'
|
||||||
return misperrors
|
return misperrors
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
r, status_ok = expand_whois(api, domain)
|
r, status_ok = expand_whois(api, domain)
|
||||||
|
|
||||||
if status_ok:
|
if status_ok:
|
||||||
|
@ -95,6 +98,7 @@ def handle_domain(api, domain, misperrors):
|
||||||
misperrors['error'] = 'Error whois result'
|
misperrors['error'] = 'Error whois result'
|
||||||
return misperrors
|
return misperrors
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
r, status_ok = expand_history_ipv4(api, domain)
|
r, status_ok = expand_history_ipv4(api, domain)
|
||||||
|
|
||||||
if status_ok:
|
if status_ok:
|
||||||
|
|
Loading…
Reference in New Issue