mirror of https://github.com/MISP/misp-modules
add searching domains
parent
a41cf59e0c
commit
999ae1f6f0
|
@ -91,17 +91,17 @@ def handle_domain(api, domain, misperrors):
|
||||||
# misperrors['error'] = misperrors['error'] + ' Error subdomains result'
|
# misperrors['error'] = misperrors['error'] + ' Error subdomains result'
|
||||||
# return misperrors
|
# return misperrors
|
||||||
#
|
#
|
||||||
time.sleep(1)
|
# time.sleep(1)
|
||||||
r, status_ok = expand_whois(api, domain)
|
# r, status_ok = expand_whois(api, domain)
|
||||||
|
#
|
||||||
if status_ok:
|
# if status_ok:
|
||||||
if r:
|
# if r:
|
||||||
result_filtered['results'].extend(r)
|
# result_filtered['results'].extend(r)
|
||||||
else:
|
# else:
|
||||||
misperrors['error'] = misperrors['error'] + ' Error whois result'
|
# misperrors['error'] = misperrors['error'] + ' Error whois result'
|
||||||
return misperrors
|
# return misperrors
|
||||||
|
#
|
||||||
time.sleep(1)
|
# time.sleep(1)
|
||||||
# r, status_ok = expand_history_ipv4_ipv6(api, domain)
|
# r, status_ok = expand_history_ipv4_ipv6(api, domain)
|
||||||
# #
|
# #
|
||||||
#
|
#
|
||||||
|
@ -135,11 +135,23 @@ def handle_domain(api, domain, misperrors):
|
||||||
# ' Error in expand History Whois'
|
# ' Error in expand History Whois'
|
||||||
# return misperrors
|
# return misperrors
|
||||||
|
|
||||||
|
|
||||||
return result_filtered
|
return result_filtered
|
||||||
|
|
||||||
|
|
||||||
def handle_ip(api, ip, misperrors):
|
def handle_ip(api, ip, misperrors):
|
||||||
pass
|
result_filtered = {"results": []}
|
||||||
|
|
||||||
|
r, status_ok = expand_searching_domain(api, ip)
|
||||||
|
|
||||||
|
if status_ok:
|
||||||
|
if r:
|
||||||
|
result_filtered['result'].extend(r)
|
||||||
|
else:
|
||||||
|
misperrors['error'] += ' Error in expand searching domain'
|
||||||
|
return misperrors
|
||||||
|
|
||||||
|
return result_filtered
|
||||||
|
|
||||||
|
|
||||||
def expand_domain_info(api, misperror, domain):
|
def expand_domain_info(api, misperror, domain):
|
||||||
|
|
Loading…
Reference in New Issue