concat results

pull/208/head
Sebdraven 2018-07-10 15:12:27 +02:00
parent 1223d93d52
commit 1d100833a4
1 changed files with 15 additions and 14 deletions

View File

@ -222,15 +222,17 @@ def expand_whois(api, domain):
if results:
status_ok = True
item_registrant = __select_registrant_item(results)
r.append({
'types': ['whois-registrant-email', 'whois-registrant-phone',
types = ['whois-registrant-email', 'whois-registrant-phone',
'whois-registrant-name', 'whois-registrar',
'whois-creation-date'],
'values': [item_registrant['email'],
'whois-creation-date']
values = [item_registrant['email'],
item_registrant['telephone'],
item_registrant['name'], results['registrarName'],
results['createdDate']],
results['createdDate']]
for t, v in zip(types, values):
r.append({
'types': t,
'values': v,
'categories': ['attribution'],
'comment': 'whois information of %s by securitytrails' % domain
}
@ -242,7 +244,6 @@ def expand_whois(api, domain):
except APIError as e:
misperrors['error'] = e
print(e)
return r, status_ok
@ -258,6 +259,6 @@ def version():
def __select_registrant_item(entry):
if 'contacts' in entry:
for c in entry['contacts']:
print(c)
if c['type'] == 'registrant':
return c