fix build

This commit is contained in:
Jay Townsend 2019-09-25 21:22:43 +01:00
parent 65f100c8f8
commit 6e24941294
2 changed files with 3 additions and 5 deletions

View file

@ -434,10 +434,8 @@ def start():
else:
print('\n[*] IPs found: ' + str(len(all_ip)))
print('-------------------')
# ips = sorted(ipaddress.ip_address(line.strip()) for line in set(all_ip))
# print('\n'.join(map(str, ips)))
ip_list = sorted([netaddr.IPAddress(ip.strip()) for ip in set(all_ip)])
# use netaddr as the list may contain ipv4 and ipv6 addresses
ip_list = sorted([netaddr.IPAddress(ip.strip()) for ip in set(all_ip)])
print('\n'.join(map(str, ip_list)))
if len(all_emails) == 0:

View file

@ -25,12 +25,12 @@ def do_search(self):
self.totalresults += self.results
dct = json.loads(self.totalresults)
self.totalhosts: set = {host['hostname'] for host in dct['passive_dns']}
self.totalips: set = {ip['address'] for ip in dct['passive_dns'] if 'NXDOMAIN' not in ip['address']}
# filter out ips that are just called NXDOMAIN
self.totalips: set = {ip['address'] for ip in dct['passive_dns'] if 'NXDOMAIN' not in ip['address']}
def get_hostnames(self) -> set:
return self.totalhosts
def get_ips(self) -> set:
return self.totalips