Serialize the found domain objects to str

This commit is contained in:
David Mougeolle 2020-01-07 21:17:28 +01:00
parent f037825ba7
commit e1af1f0a06
2 changed files with 7 additions and 7 deletions

View file

@ -489,11 +489,11 @@ async def handler(lst):
analyzed_ranges.append(ip_range)
else:
continue
for entries in res:
if entries.count(word):
dnsrev.append(entries)
if entries not in full:
full.append(entries)
for entry in res:
if word in entry:
dnsrev.append(entry)
if entry not in full:
full.append(entry)
print('[*] Hosts found after reverse lookup (in target domain):')
print('--------------------------------------------------------')
for xh in dnsrev:

View file

@ -64,7 +64,7 @@ def run(self, ip):
ptr_record_answer = dns.resolver.query(dns_record_from_ip_answer, 'PTR')
a_record_answer = dns.resolver.query(ptr_record_answer[0].to_text(), 'A')
print(a_record_answer.canonical_name)
return a_record_answer.canonical_name
return str(a_record_answer.canonical_name)
except Exception:
pass
@ -76,4 +76,4 @@ def process(self):
if host is not None:
# print(' : ' + host.split(':')[1])
results.append(host)
return results
return results