mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-22 08:16:35 +08:00
fix build
This commit is contained in:
parent
65f100c8f8
commit
6e24941294
|
@ -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:
|
||||
|
|
|
@ -25,8 +25,8 @@ 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
|
||||
|
|
Loading…
Reference in a new issue