fix discovery imports

This commit is contained in:
yoonthegoon
2023-08-04 18:55:52 -04:00
parent 1e52709282
commit 8e5fff5eec
38 changed files with 75 additions and 69 deletions
+3 -5
View File
@@ -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:
+1 -1
View File
@@ -1,4 +1,4 @@
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher, Core
from theHarvester.parsers import myparser
+1 -1
View File
@@ -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:
+2 -1
View File
@@ -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:
+4 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -1,6 +1,6 @@
from typing import Set
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher
class SearchCertspoter:
+1 -1
View File
@@ -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):
+2 -3
View File
@@ -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:
+1 -1
View File
@@ -1,6 +1,6 @@
from typing import List, Set
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher
class SearchCrtsh:
+1 -1
View File
@@ -2,7 +2,7 @@ import asyncio
import aiohttp
from theHarvester.lib.core import *
from theHarvester.lib.core import Core
from theHarvester.parsers import myparser
+3 -4
View File
@@ -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"
+2 -2
View File
@@ -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:
+2 -2
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher, Core
class SearchHackerTarget:
+3 -2
View File
@@ -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:
+3 -2
View File
@@ -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
+4 -6
View File
@@ -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:
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,7 +1,7 @@
import re
from typing import Set
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher
class SearchOtx:
+2 -2
View File
@@ -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:
+2 -2
View File
@@ -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:
+2 -2
View File
@@ -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):
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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:
@@ -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
+2 -2
View File
@@ -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:
+4 -1
View File
@@ -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:
+1 -1
View File
@@ -1,4 +1,4 @@
from theHarvester.discovery.constants import *
from theHarvester.lib import AsyncFetcher, Core
class SubdomainCenter:
+2 -1
View File
@@ -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
+1 -1
View File
@@ -4,7 +4,7 @@ from random import shuffle
import ujson
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher, Core
class TakeOver:
+2 -2
View File
@@ -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:
+3 -2
View File
@@ -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:
+2 -2
View File
@@ -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:
+5 -3
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
from theHarvester.lib.core import *
from theHarvester.lib.core import AsyncFetcher, Core
from theHarvester.parsers import myparser
+2 -2
View File
@@ -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