mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-24 06:22:57 +08:00
Fixed test in test_otx and fixed pep8 error in main.py
This commit is contained in:
parent
cdd6b9020c
commit
1286ba4b75
2 changed files with 4 additions and 5 deletions
|
@ -20,7 +20,7 @@ def test_api(self):
|
|||
def test_search(self):
|
||||
search = otxsearch.SearchOtx(TestOtx.domain())
|
||||
search.process()
|
||||
assert type(search.get_hostnames()) == list
|
||||
assert isinstance(search.get_hostnames(), set)
|
||||
|
||||
def test_search_no_results(self):
|
||||
search = otxsearch.SearchOtx('radiant.eu')
|
||||
|
|
|
@ -435,11 +435,10 @@ 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 = [netaddr.IPAddress(ip.strip()) for ip in set(all_ip)]
|
||||
# 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.sort()
|
||||
print('\n'.join(map(str, ip_list)))
|
||||
|
||||
if len(all_emails) == 0:
|
||||
|
|
Loading…
Reference in a new issue