add ipv6 and ipv4

pull/208/head
Sebdraven 2018-07-11 08:43:23 +02:00
parent f2333a4978
commit 3a96e189ed
1 changed files with 27 additions and 14 deletions

View File

@ -265,7 +265,7 @@ def expand_whois(api, domain):
return r, status_ok
def expand_history_ipv4(api, domain):
def expand_history_ipv4_ipv6(api, domain):
r = []
status_ok = False
@ -274,6 +274,24 @@ def expand_history_ipv4(api, domain):
if results:
status_ok = True
r.extend(__history_ip(results, domain))
time.sleep(1)
results = api.history_dns_aaaa(domain)
if results:
status_ok = True
r.extend(__history_ip(results, domain))
except APIError as e:
misperrors['error'] = e
print(e)
return r, status_ok
def __history_ip(results, domain):
r = []
if 'records' in results:
for record in results['records']:
if 'values' in record:
@ -288,12 +306,7 @@ def expand_history_ipv4(api, domain):
}
)
except APIError as e:
misperrors['error'] = e
print(e)
return r, status_ok
return r
def introspection():
return mispattributes