Add new module Sitedossier (#1423)

* Create sitedossier.py

* Added new module.

* Added new module.

* Thanks to Jay for the help.

* Added new module to README.
This commit is contained in:
Lee Baird 2023-05-12 18:05:33 -05:00 committed by GitHub
parent 28ac939796
commit b1efc6ab3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 1 deletions

View file

@ -70,6 +70,8 @@ Passive:
* shodan: Shodan search engine, will search for ports and banners from discovered hosts (Requires an API key, see below.) - https://shodan.io
* sitedossier: Find available information on a site
* subdomainfinderc99: A subdomain finder is a tool used to find the subdomains of a given domain - https://subdomainfinder.c99.nl
* threatminer: Data mining for threat intelligence - https://www.threatminer.org/

View file

@ -38,7 +38,7 @@ async def start(rest_args: Optional[argparse.Namespace] = None):
parser.add_argument('-b', '--source', help='''anubis, baidu, bevigil, binaryedge, bing, bingapi, bufferoverun, brave,
censys, certspotter, criminalip, crtsh, dnsdumpster, duckduckgo, fullhunt, github-code,
hackertarget, hunter, hunterhow, intelx, otx, pentesttools, projectdiscovery,
rapiddns, rocketreach, securityTrails, subdomainfinderc99, threatminer, urlscan,
rapiddns, rocketreach, securityTrails, sitedossier, subdomainfinderc99, threatminer, urlscan,
virustotal, yahoo, zoomeye''')
# determines if filename is coming from rest api or user
@ -465,6 +465,14 @@ async def store(search_engine: Any, source: str, process_param: Any = None, stor
if isinstance(e, MissingKey):
print(e)
elif engineitem == 'sitedossier':
from theHarvester.discovery import sitedossier
try:
sitedossier_search = sitedossier.SearchSitedossier(word)
stor_lst.append(store(sitedossier_search, engineitem, store_host=True, store_ip=True))
except Exception as e:
print(e)
elif engineitem == 'subdomainfinderc99':
from theHarvester.discovery import subdomainfinderc99
try:

View file

@ -0,0 +1,27 @@
from theHarvester.lib.core import *
from theHarvester.parsers import myparser
import requests
class SearchSitedossier:
def __init__(self, word):
self.word = word
self.totalresults = ""
self.server = "www.sitedossier.com"
self.limit = 50
async def do_search(self):
url = f"http://{self.server}/parentdomain/{self.word}"
headers = {'User-Agent': Core.get_user_agent()}
response = requests.get(url, headers=headers)
self.totalresults += response.text
async def get_hostnames(self):
rawres = myparser.Parser(self.totalresults, self.word)
return await rawres.hostnames()
async def process(self, proxy: bool = False) -> None:
self.proxy = proxy
await self.do_search()

View file

@ -160,6 +160,7 @@ def get_supportedengines() -> list[str | Any]:
'rapiddns',
'rocketreach',
'securityTrails',
'sitedossier',
'subdomainfinderc99',
'threatminer',
'urlscan',