mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-23 14:02:58 +08:00
flake8 fixes.
This commit is contained in:
parent
c1e9e0c9c1
commit
7f8aea33ad
4 changed files with 15 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
from theHarvester.discovery import githubcode
|
||||
from theHarvester.discovery.githubcode import RetryResult, ErrorResult, SuccessResult
|
||||
from theHarvester.discovery.constants import MissingKey
|
||||
from theHarvester.lib.core import Core
|
||||
from unittest.mock import MagicMock
|
||||
|
|
|
@ -16,11 +16,13 @@ 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(',')[0] in host else
|
||||
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']}
|
||||
|
||||
self.totalips: set = {ip.split(',')[0]for ip in dct['FDNS_A'] if
|
||||
self.totalips: set = {ip.split(',')[0] for ip in dct['FDNS_A'] if
|
||||
re.match(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", ip.split(',')[0])}
|
||||
|
||||
async def get_hostnames(self) -> set:
|
||||
return self.totalhosts
|
||||
|
||||
|
|
|
@ -35,3 +35,13 @@ 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())
|
|
@ -1,5 +1,6 @@
|
|||
from theHarvester.lib.core import *
|
||||
import aiohttp
|
||||
from typing import Set
|
||||
|
||||
|
||||
class SearchCrtsh:
|
||||
|
|
Loading…
Reference in a new issue