mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-24 22:42:56 +08:00
Merge pull request #87 from NotoriousRebel/master
Updated how domains are printed and stored.
This commit is contained in:
commit
5f816485ef
2 changed files with 3 additions and 4 deletions
|
@ -425,12 +425,11 @@ async def handler(lst):
|
|||
print('\n[*] Hosts found: ' + str(len(all_hosts)))
|
||||
print('---------------------')
|
||||
all_hosts = sorted(list(set(all_hosts)))
|
||||
"""full_host = hostchecker.Checker(all_hosts)
|
||||
full, ips = await full_host.check()"""
|
||||
db = stash.StashManager()
|
||||
full = [host if ':' in host and word in host else word in host.split(':')[0] and host for host in full]
|
||||
full = [host for host in full if host]
|
||||
full.sort(key=lambda el: el.split(':')[0])
|
||||
for host in full:
|
||||
host = str(host)
|
||||
print(host)
|
||||
host_ip = [netaddr_ip.format() for netaddr_ip in sorted([netaddr.IPAddress(ip) for ip in ips])]
|
||||
await db.store_all(word, host_ip, 'ip', 'DNS-resolver')
|
||||
|
|
|
@ -28,7 +28,7 @@ async def query(host, resolver) -> Tuple[str, Any]:
|
|||
else:
|
||||
return f"{host}:{', '.join(map(str, addresses))}", addresses
|
||||
except Exception:
|
||||
return f"{host}:", tuple()
|
||||
return f"{host}", tuple()
|
||||
|
||||
async def query_all(self, resolver) -> list:
|
||||
results = await asyncio.gather(*[asyncio.create_task(self.query(host, resolver))
|
||||
|
|
Loading…
Reference in a new issue