mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-21 15:56:44 +08:00
small misc. changes.
This commit is contained in:
parent
7f8aea33ad
commit
eba479a610
|
@ -16,7 +16,7 @@ async def do_search(self):
|
|||
dct = responses
|
||||
|
||||
self.totalhosts: set = {
|
||||
host.split(',')[0].replace('www', '') if ',' in host and self.word.replace('www.', '') in host.split(',')[
|
||||
host.split(',')[0].replace('www.', '') if ',' in host and self.word.replace('www.', '') in host.split(',')[
|
||||
0] in host else
|
||||
host.split(',')[1] for host in dct['FDNS_A']}
|
||||
|
||||
|
|
|
@ -35,13 +35,3 @@ async def process(self, proxy=False):
|
|||
self.proxy = proxy
|
||||
await self.do_search()
|
||||
print('\tSearching results.')
|
||||
|
||||
async def main():
|
||||
x = SearchCertspoter(word='arrow.com')
|
||||
await x.do_search()
|
||||
hosts = await x.get_hostnames()
|
||||
print(hosts)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import asyncio
|
||||
asyncio.run(main())
|
|
@ -19,7 +19,8 @@ async def do_search(self) -> Set:
|
|||
response = await AsyncFetcher.fetch(client, url, json=True, proxy=self.proxy)
|
||||
await client.close()
|
||||
data = set(
|
||||
[dct['name_value'][2:] if '*.' == dct['name_value'][:2] else dct['name_value'] for dct in response])
|
||||
[dict(dct)['name_value'][2:] if '*.' == dict(dct)['name_value'][:2] else dict(dct)['name_value']
|
||||
for dct in response])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return data
|
||||
|
|
Loading…
Reference in a new issue