small misc. changes.

This commit is contained in:
NotoriousRebel 2020-02-13 17:51:20 -05:00
parent 7f8aea33ad
commit eba479a610
3 changed files with 3 additions and 12 deletions

View file

@ -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']}

View file

@ -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())

View file

@ -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