diff --git a/theHarvester/discovery/anubis.py b/theHarvester/discovery/anubis.py index 672cd256..5d8a9fc0 100644 --- a/theHarvester/discovery/anubis.py +++ b/theHarvester/discovery/anubis.py @@ -1,12 +1,10 @@ -from typing import Type - -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher class SearchAnubis: def __init__(self, word) -> None: self.word = word - self.totalhosts: List = [] + self.totalhosts: list = [] self.proxy = False async def do_search(self) -> None: @@ -14,7 +12,7 @@ class SearchAnubis: response = await AsyncFetcher.fetch_all([url], json=True, proxy=self.proxy) self.totalhosts = response[0] - async def get_hostnames(self) -> List: + async def get_hostnames(self) -> list: return self.totalhosts async def process(self, proxy: bool = False) -> None: diff --git a/theHarvester/discovery/baidusearch.py b/theHarvester/discovery/baidusearch.py index d714c33f..687a8721 100644 --- a/theHarvester/discovery/baidusearch.py +++ b/theHarvester/discovery/baidusearch.py @@ -1,4 +1,4 @@ -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/bevigil.py b/theHarvester/discovery/bevigil.py index e21b5aeb..96ee5f2a 100644 --- a/theHarvester/discovery/bevigil.py +++ b/theHarvester/discovery/bevigil.py @@ -1,7 +1,7 @@ from typing import Set from theHarvester.discovery.constants import MissingKey -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchBeVigil: diff --git a/theHarvester/discovery/binaryedgesearch.py b/theHarvester/discovery/binaryedgesearch.py index 95c4815d..0341b207 100644 --- a/theHarvester/discovery/binaryedgesearch.py +++ b/theHarvester/discovery/binaryedgesearch.py @@ -1,7 +1,8 @@ import asyncio from typing import Set -from theHarvester.discovery.constants import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core, get_delay class SearchBinaryEdge: diff --git a/theHarvester/discovery/bingsearch.py b/theHarvester/discovery/bingsearch.py index 35033478..5d2af02c 100644 --- a/theHarvester/discovery/bingsearch.py +++ b/theHarvester/discovery/bingsearch.py @@ -1,5 +1,7 @@ -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from typing import Any + +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/bravesearch.py b/theHarvester/discovery/bravesearch.py index e65b5969..b9611896 100644 --- a/theHarvester/discovery/bravesearch.py +++ b/theHarvester/discovery/bravesearch.py @@ -1,6 +1,6 @@ import asyncio -from theHarvester.discovery.constants import * +from theHarvester.lib.core import AsyncFetcher, Core, get_delay from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/bufferoverun.py b/theHarvester/discovery/bufferoverun.py index a953de2d..1bb04633 100644 --- a/theHarvester/discovery/bufferoverun.py +++ b/theHarvester/discovery/bufferoverun.py @@ -2,7 +2,7 @@ import re from typing import Set from theHarvester.discovery.constants import MissingKey -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchBufferover: diff --git a/theHarvester/discovery/certspottersearch.py b/theHarvester/discovery/certspottersearch.py index 93619da8..19b979fe 100644 --- a/theHarvester/discovery/certspottersearch.py +++ b/theHarvester/discovery/certspottersearch.py @@ -1,6 +1,6 @@ from typing import Set -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher class SearchCertspoter: diff --git a/theHarvester/discovery/constants.py b/theHarvester/discovery/constants.py index 79dee833..8b00314d 100644 --- a/theHarvester/discovery/constants.py +++ b/theHarvester/discovery/constants.py @@ -1,7 +1,7 @@ import random from typing import Optional, Union -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core async def splitter(links): diff --git a/theHarvester/discovery/criminalip.py b/theHarvester/discovery/criminalip.py index be5af679..d98fee17 100644 --- a/theHarvester/discovery/criminalip.py +++ b/theHarvester/discovery/criminalip.py @@ -1,10 +1,9 @@ +import asyncio from typing import Set from urllib.parse import urlparse -import ujson - from theHarvester.discovery.constants import MissingKey, get_delay -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchCriminalIP: diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 8322f5b7..46369d6f 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -1,6 +1,6 @@ from typing import List, Set -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher class SearchCrtsh: diff --git a/theHarvester/discovery/dnsdumpster.py b/theHarvester/discovery/dnsdumpster.py index 888dc417..3e8c4c11 100644 --- a/theHarvester/discovery/dnsdumpster.py +++ b/theHarvester/discovery/dnsdumpster.py @@ -2,7 +2,7 @@ import asyncio import aiohttp -from theHarvester.lib.core import * +from theHarvester.lib.core import Core from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/duckduckgosearch.py b/theHarvester/discovery/duckduckgosearch.py index 49ab9e1c..196ecc96 100644 --- a/theHarvester/discovery/duckduckgosearch.py +++ b/theHarvester/discovery/duckduckgosearch.py @@ -1,7 +1,6 @@ import ujson -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import myparser @@ -10,8 +9,8 @@ class SearchDuckDuckGo: self.word = word self.results = "" self.totalresults = "" - self.dorks: List = [] - self.links: List = [] + self.dorks: list = [] + self.links: list = [] self.database = "https://duckduckgo.com/?q=" self.api = "https://api.duckduckgo.com/?q=x&format=json&pretty=1" # Currently using API. self.quantity = "100" diff --git a/theHarvester/discovery/fullhuntsearch.py b/theHarvester/discovery/fullhuntsearch.py index 610f59c0..de7b7daf 100644 --- a/theHarvester/discovery/fullhuntsearch.py +++ b/theHarvester/discovery/fullhuntsearch.py @@ -1,5 +1,5 @@ -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core class SearchFullHunt: diff --git a/theHarvester/discovery/githubcode.py b/theHarvester/discovery/githubcode.py index 64cf29e1..ce134c68 100644 --- a/theHarvester/discovery/githubcode.py +++ b/theHarvester/discovery/githubcode.py @@ -5,8 +5,8 @@ from typing import Any, Dict, List, NamedTuple, Tuple, Union import aiohttp -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey, get_delay +from theHarvester.lib.core import Core from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/hackertarget.py b/theHarvester/discovery/hackertarget.py index 96ae45b1..4980ee5c 100644 --- a/theHarvester/discovery/hackertarget.py +++ b/theHarvester/discovery/hackertarget.py @@ -1,4 +1,4 @@ -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchHackerTarget: diff --git a/theHarvester/discovery/huntersearch.py b/theHarvester/discovery/huntersearch.py index 46027bc9..2982e29c 100644 --- a/theHarvester/discovery/huntersearch.py +++ b/theHarvester/discovery/huntersearch.py @@ -1,7 +1,8 @@ +import asyncio from typing import List -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core class SearchHunter: diff --git a/theHarvester/discovery/intelxsearch.py b/theHarvester/discovery/intelxsearch.py index 7ab5bda2..f2f382bc 100644 --- a/theHarvester/discovery/intelxsearch.py +++ b/theHarvester/discovery/intelxsearch.py @@ -1,10 +1,11 @@ import asyncio +from typing import Any import requests import ujson -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import intelxparser diff --git a/theHarvester/discovery/netlas.py b/theHarvester/discovery/netlas.py index dd6c62fe..b5151aec 100644 --- a/theHarvester/discovery/netlas.py +++ b/theHarvester/discovery/netlas.py @@ -1,14 +1,12 @@ -from typing import Set - from theHarvester.discovery.constants import MissingKey -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchNetlas: def __init__(self, word) -> None: self.word = word - self.totalhosts: List = [] - self.totalips: List = [] + self.totalhosts: list = [] + self.totalips: list = [] self.key = Core.netlas_key() if self.key is None: raise MissingKey("netlas") @@ -23,7 +21,7 @@ class SearchNetlas: for domain in response[0]["items"]: self.totalhosts.append(domain["data"]["domain"]) - async def get_hostnames(self) -> List: + async def get_hostnames(self) -> list: return self.totalhosts async def process(self, proxy: bool = False) -> None: diff --git a/theHarvester/discovery/onyphe.py b/theHarvester/discovery/onyphe.py index 8960becd..6f5c2d43 100644 --- a/theHarvester/discovery/onyphe.py +++ b/theHarvester/discovery/onyphe.py @@ -2,7 +2,7 @@ from typing import Set from urllib.parse import urlparse from theHarvester.discovery.constants import MissingKey -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core # from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/otxsearch.py b/theHarvester/discovery/otxsearch.py index dbe0610d..8019e9dd 100644 --- a/theHarvester/discovery/otxsearch.py +++ b/theHarvester/discovery/otxsearch.py @@ -1,7 +1,7 @@ import re from typing import Set -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher class SearchOtx: diff --git a/theHarvester/discovery/pentesttools.py b/theHarvester/discovery/pentesttools.py index 35f780c0..96e5fadd 100644 --- a/theHarvester/discovery/pentesttools.py +++ b/theHarvester/discovery/pentesttools.py @@ -3,8 +3,8 @@ from typing import List import ujson -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core class SearchPentestTools: diff --git a/theHarvester/discovery/projectdiscovery.py b/theHarvester/discovery/projectdiscovery.py index dd28851c..3f1bde9c 100644 --- a/theHarvester/discovery/projectdiscovery.py +++ b/theHarvester/discovery/projectdiscovery.py @@ -1,5 +1,5 @@ -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core class SearchDiscovery: diff --git a/theHarvester/discovery/rapiddns.py b/theHarvester/discovery/rapiddns.py index 1e2245af..56426dc9 100644 --- a/theHarvester/discovery/rapiddns.py +++ b/theHarvester/discovery/rapiddns.py @@ -1,12 +1,12 @@ from bs4 import BeautifulSoup -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchRapidDns: def __init__(self, word) -> None: self.word = word - self.total_results: List = [] + self.total_results: list = [] self.proxy = False async def do_search(self): diff --git a/theHarvester/discovery/rocketreach.py b/theHarvester/discovery/rocketreach.py index 9f0b2ee0..25d4ecc9 100644 --- a/theHarvester/discovery/rocketreach.py +++ b/theHarvester/discovery/rocketreach.py @@ -1,8 +1,8 @@ import asyncio from typing import Set -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey, get_delay +from theHarvester.lib.core import AsyncFetcher, Core class SearchRocketReach: diff --git a/theHarvester/discovery/searchhunterhow.py b/theHarvester/discovery/searchhunterhow.py index 8618b71e..f66cca0e 100644 --- a/theHarvester/discovery/searchhunterhow.py +++ b/theHarvester/discovery/searchhunterhow.py @@ -5,7 +5,7 @@ from typing import Set from dateutil.relativedelta import relativedelta from theHarvester.discovery.constants import MissingKey -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class SearchHunterHow: diff --git a/theHarvester/discovery/securitytrailssearch.py b/theHarvester/discovery/securitytrailssearch.py index 3fcd61c8..1781e32a 100644 --- a/theHarvester/discovery/securitytrailssearch.py +++ b/theHarvester/discovery/securitytrailssearch.py @@ -1,8 +1,8 @@ import asyncio from typing import Sequence -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import securitytrailsparser diff --git a/theHarvester/discovery/shodansearch.py b/theHarvester/discovery/shodansearch.py index dd549e4e..3d144c2c 100644 --- a/theHarvester/discovery/shodansearch.py +++ b/theHarvester/discovery/shodansearch.py @@ -3,8 +3,8 @@ from typing import List from shodan import Shodan, exception -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import Core class SearchShodan: diff --git a/theHarvester/discovery/sitedossier.py b/theHarvester/discovery/sitedossier.py index 245fb19a..4dbcedf7 100644 --- a/theHarvester/discovery/sitedossier.py +++ b/theHarvester/discovery/sitedossier.py @@ -1,6 +1,9 @@ +import asyncio + from bs4 import BeautifulSoup -from theHarvester.discovery.constants import * +from theHarvester.discovery.constants import get_delay +from theHarvester.lib.core import AsyncFetcher, Core class SearchSitedossier: diff --git a/theHarvester/discovery/subdomaincenter.py b/theHarvester/discovery/subdomaincenter.py index 7e64b7ec..78e674f2 100644 --- a/theHarvester/discovery/subdomaincenter.py +++ b/theHarvester/discovery/subdomaincenter.py @@ -1,4 +1,4 @@ -from theHarvester.discovery.constants import * +from theHarvester.lib import AsyncFetcher, Core class SubdomainCenter: diff --git a/theHarvester/discovery/subdomainfinderc99.py b/theHarvester/discovery/subdomainfinderc99.py index 3b1082f4..8f8d2163 100644 --- a/theHarvester/discovery/subdomainfinderc99.py +++ b/theHarvester/discovery/subdomainfinderc99.py @@ -1,10 +1,11 @@ +import asyncio from typing import Set import ujson from bs4 import BeautifulSoup from theHarvester.discovery.constants import get_delay -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/takeover.py b/theHarvester/discovery/takeover.py index 099a66fb..a33e044f 100644 --- a/theHarvester/discovery/takeover.py +++ b/theHarvester/discovery/takeover.py @@ -4,7 +4,7 @@ from random import shuffle import ujson -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core class TakeOver: diff --git a/theHarvester/discovery/threatminer.py b/theHarvester/discovery/threatminer.py index a162a9fd..81426579 100644 --- a/theHarvester/discovery/threatminer.py +++ b/theHarvester/discovery/threatminer.py @@ -1,6 +1,6 @@ -from typing import List, Set, Type +from typing import Set -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher class SearchThreatminer: diff --git a/theHarvester/discovery/tombasearch.py b/theHarvester/discovery/tombasearch.py index 9f464c20..653a1f8d 100644 --- a/theHarvester/discovery/tombasearch.py +++ b/theHarvester/discovery/tombasearch.py @@ -1,7 +1,8 @@ +import asyncio from typing import List -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core class SearchTomba: diff --git a/theHarvester/discovery/urlscan.py b/theHarvester/discovery/urlscan.py index c3e2371b..d058026e 100644 --- a/theHarvester/discovery/urlscan.py +++ b/theHarvester/discovery/urlscan.py @@ -1,6 +1,6 @@ -from typing import List, Set +from typing import Set -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher class SearchUrlscan: diff --git a/theHarvester/discovery/virustotal.py b/theHarvester/discovery/virustotal.py index acb85da2..9e511070 100644 --- a/theHarvester/discovery/virustotal.py +++ b/theHarvester/discovery/virustotal.py @@ -1,5 +1,7 @@ -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +import asyncio + +from theHarvester.discovery.constants import MissingKey +from theHarvester.lib.core import AsyncFetcher, Core class SearchVirustotal: @@ -9,7 +11,7 @@ class SearchVirustotal: raise MissingKey("virustotal") self.word = word self.proxy = False - self.hostnames: List = [] + self.hostnames: list = [] async def do_search(self) -> None: # TODO determine if more endpoints can yield useful info given a domain diff --git a/theHarvester/discovery/yahoosearch.py b/theHarvester/discovery/yahoosearch.py index d0c069b0..7ac9b42d 100644 --- a/theHarvester/discovery/yahoosearch.py +++ b/theHarvester/discovery/yahoosearch.py @@ -1,4 +1,4 @@ -from theHarvester.lib.core import * +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import myparser diff --git a/theHarvester/discovery/zoomeyesearch.py b/theHarvester/discovery/zoomeyesearch.py index 90c7e2e1..d905d10e 100644 --- a/theHarvester/discovery/zoomeyesearch.py +++ b/theHarvester/discovery/zoomeyesearch.py @@ -2,8 +2,8 @@ import asyncio import re from typing import List -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * +from theHarvester.discovery.constants import MissingKey, get_delay +from theHarvester.lib.core import AsyncFetcher, Core from theHarvester.parsers import myparser