diff --git a/theHarvester/discovery/bufferoverun.py b/theHarvester/discovery/bufferoverun.py index 90068b95..c72c4b36 100644 --- a/theHarvester/discovery/bufferoverun.py +++ b/theHarvester/discovery/bufferoverun.py @@ -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']} diff --git a/theHarvester/discovery/certspottersearch.py b/theHarvester/discovery/certspottersearch.py index 1aa49a5a..70cc9385 100644 --- a/theHarvester/discovery/certspottersearch.py +++ b/theHarvester/discovery/certspottersearch.py @@ -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()) \ No newline at end of file diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 671e9f94..9a828c2f 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -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