-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb3b0a2
commit 23c4c2a
Showing
16 changed files
with
479 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Binary file added
BIN
+210 Bytes
subdominator/modules/enumerates/virustotal/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added
BIN
+8.79 KB
subdominator/modules/enumerates/virustotal/__pycache__/virustotal.cpython-311.pyc
Binary file not shown.
143 changes: 143 additions & 0 deletions
143
subdominator/modules/enumerates/virustotal/virustotal.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
from colorama import Fore, Style | ||
import aiofiles | ||
import random | ||
import yaml | ||
import aiohttp | ||
import sys | ||
|
||
bold = Style.BRIGHT | ||
blue = Fore.BLUE | ||
red = Fore.RED | ||
white = Fore.WHITE | ||
reset = Style.RESET_ALL | ||
|
||
async def virustotal(domain, session, configs, username, args): | ||
try: | ||
|
||
virustotals = [] | ||
|
||
try: | ||
|
||
async with aiofiles.open(configs, "r") as streamr: | ||
|
||
data = yaml.safe_load(await streamr.read()) | ||
|
||
if "virustotal" not in data: | ||
|
||
return | ||
|
||
randvalue = data.get("virustotal", []) | ||
|
||
if randvalue is None: | ||
|
||
return | ||
|
||
randomkey = random.choice(data.get("virustotal", [])) | ||
|
||
except yaml.YAMLError as e: | ||
|
||
if args.show_key_info: | ||
|
||
if not args.no_color: | ||
|
||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Hey {username} Please check syntax of {configs}{reset}", file=sys.stderr) | ||
|
||
else: | ||
|
||
print(f"[INFO]: Hey {username} Please check syntax of {configs}", file=sys.stderr) | ||
|
||
except TypeError as e: | ||
|
||
pass | ||
|
||
except KeyboardInterrupt as e: | ||
quit() | ||
|
||
except yaml.YAMLObject as e: | ||
|
||
if args.show_key_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Hey {username} Please check syntax of {configs}{reset}", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Hey {username} Please check syntax of {configs}", file=sys.stderr) | ||
|
||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception in virustotal reader block: {e}, {type(e)}{reset}", file=sys.stderr) | ||
|
||
if randomkey is None: | ||
|
||
return | ||
|
||
try: | ||
|
||
url = f"https://www.virustotal.com/vtapi/v2/domain/report?apikey={randomkey}&domain={domain}" | ||
proxy = args.proxy if args.proxy else None | ||
|
||
async with session.get(url, timeout=args.timeout, proxy=proxy, ssl=False) as response: | ||
if response.status != 200: | ||
|
||
if args.show_key_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}ALERT{reset}]: Virustotal blocking our request, {username} please check your api usage for this key: {randomkey}", file=sys.stderr) | ||
else: | ||
print(f"[ALERT]: Virustotal blocking our request, {username} please check your api usage for this key: {randomkey}", file=sys.stderr) | ||
return [] | ||
|
||
data = await response.json() | ||
|
||
if 'subdomains' in data: | ||
subdomains = data['subdomains'] | ||
for subdomain in subdomains: | ||
virustotals.append(subdomain) | ||
return virustotals | ||
|
||
except aiohttp.ServerConnectionError as e: | ||
|
||
if args.show_timeout_info: | ||
|
||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Virustotal API, due to Serverside Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Virustotal API, due to Serverside Error", file=sys.stderr) | ||
|
||
except aiohttp.ClientConnectionError as e: | ||
|
||
if args.show_timeout_info: | ||
|
||
if not args.no_color: | ||
|
||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Virustotal API, due to ClientSide connection Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Virustotal API, due to Clientside connection Error", file=sys.stderr) | ||
|
||
|
||
except KeyboardInterrupt as e: | ||
quit() | ||
|
||
except TimeoutError as e: | ||
if args.show_timeout_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Virustotal API, due to Timeout Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Virustotal API, due to Timeout Error", file=sys.stderr) | ||
|
||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception in virustotal request block: {e}, {type(e)}{reset}", file=sys.stderr) | ||
|
||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception occured in api virustotal main block: {e}, due to: {type(e)}{reset}", file=sys.stderr) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Empty file.
Binary file added
BIN
+214 Bytes
subdominator/modules/enumerates/waybackarchive/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added
BIN
+5.27 KB
subdominator/modules/enumerates/waybackarchive/__pycache__/waybackarchive.cpython-311.pyc
Binary file not shown.
56 changes: 56 additions & 0 deletions
56
subdominator/modules/enumerates/waybackarchive/waybackarchive.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from colorama import Fore, Style | ||
import re | ||
import httpx | ||
import sys | ||
from fake_useragent import UserAgent | ||
from subdominator.modules.utils import compiler, extracts | ||
|
||
bold = Style.BRIGHT | ||
blue = Fore.BLUE | ||
red = Fore.RED | ||
white = Fore.WHITE | ||
reset = Style.RESET_ALL | ||
Waybackurls = set() | ||
|
||
async def waybackarchive(domain, args): | ||
try: | ||
headers = { | ||
"User-Agent": UserAgent().random | ||
} | ||
proxy = args.proxy if args.proxy else None | ||
async with httpx.AsyncClient(verify=False, proxy=proxy) as request: | ||
async with request.stream("GET", f"https://web.archive.org/cdx/search/cdx?url=*.{domain}&collapse=urlkey&fl=original", headers=headers, timeout=httpx.Timeout(read=300.0, connect=args.timeout, write=None, pool=None), follow_redirects=True) as response: | ||
async for url in response.aiter_lines(): | ||
subdomains = await extracts(url, domain) | ||
if subdomains: | ||
for subdomain in subdomains: | ||
subdomain = subdomain.lstrip("25").lstrip("2F").lstrip("40").lstrip(".").lstrip("B0") | ||
if subdomain not in Waybackurls and not subdomain.startswith("%3D") and not subdomain.startswith("3D"): | ||
Waybackurls.add(subdomain) | ||
except KeyboardInterrupt as e: | ||
quit() | ||
except TimeoutError as e: | ||
if args.show_timeout_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Webarchive, due to Timeout Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Webarchive, due to Timeout Error", file=sys.stderr) | ||
except httpx.ConnectTimeout: | ||
if args.show_timeout_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Webarchive, due to Timeout Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Webarchive, due to Timeout Error", file=sys.stderr) | ||
except httpx.ConnectError: | ||
if args.show_timeout_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Webarchive, due to Timeout Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Webarchive, due to Timeout Error", file=sys.stderr) | ||
except httpx.ReadTimeout: | ||
pass | ||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception in wayback request block: {e}, {type(e)}{reset}", file=sys.stderr) | ||
finally: | ||
return Waybackurls |
Empty file.
Binary file added
BIN
+208 Bytes
subdominator/modules/enumerates/whoisxml/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added
BIN
+8.74 KB
subdominator/modules/enumerates/whoisxml/__pycache__/whoisxml.cpython-311.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
from colorama import Fore, Style | ||
import aiofiles | ||
import random | ||
import yaml | ||
import aiohttp | ||
import sys | ||
import asyncio | ||
|
||
bold = Style.BRIGHT | ||
blue = Fore.BLUE | ||
red = Fore.RED | ||
white = Fore.WHITE | ||
reset = Style.RESET_ALL | ||
|
||
async def whoisxml(domain, session, configs, username, args): | ||
|
||
try: | ||
|
||
try: | ||
async with aiofiles.open(configs, "r") as streamr: | ||
data = yaml.safe_load(await streamr.read()) | ||
if "whoisxmlapi" not in data: | ||
return | ||
|
||
randvalue = data.get("whoisxmlapi", []) | ||
|
||
if randvalue is None: | ||
return | ||
randomkey = random.choice(data.get("whoisxmlapi", [])) | ||
|
||
except yaml.YAMLError as e: | ||
|
||
if args.show_key_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Hey {username} Please check syntax of {configs}{reset}", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Hey {username} Please check syntax of {configs}", file=sys.stderr) | ||
|
||
except TypeError as e: | ||
pass | ||
|
||
except yaml.YAMLObject as e: | ||
|
||
if args.show_key_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Hey {username} Please check syntax of {configs}{reset}", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Hey {username} Please check syntax of {configs}", file=sys.stderr) | ||
|
||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception in whoisxmlapi request block: {e}, {type(e)}{reset}", file=sys.stderr) | ||
|
||
if randomkey is None: | ||
return [] | ||
|
||
try: | ||
|
||
whoisxmls = [] | ||
|
||
url = f"https://subdomains.whoisxmlapi.com/api/v1?apiKey={randomkey}&domainName={domain}" | ||
proxy = args.proxy if args.proxy else None | ||
async with session.get(url, timeout=args.timeout, proxy=proxy, ssl=False) as response: | ||
|
||
data = await response.json() | ||
if response.status != 200: | ||
if args.show_key_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}ALERT{reset}]: Whoisxmlapi blocking our request, {username} please check your api usage for this key: {randomkey}", file=sys.stderr) | ||
|
||
else: | ||
print(f"[ALERT]: Whoisxmlapi blocking our request, {username} please check your api usage for this key: {randomkey}", file=sys.stderr) | ||
return [] | ||
|
||
found_result = data.get('result', {}).get('records', []) | ||
|
||
for subdomains in found_result: | ||
|
||
subdomain = subdomains.get('domain') | ||
|
||
if subdomain: | ||
|
||
whoisxmls.append(subdomain) | ||
|
||
return whoisxmls | ||
|
||
except aiohttp.ServerConnectionError as e: | ||
|
||
if args.show_timeout_info: | ||
|
||
if not args.no_color: | ||
|
||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Whoisxml API, due to Serverside Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for whoisxml API, due to Serverside Error", file=sys.stderr) | ||
|
||
except aiohttp.ClientConnectionError as e: | ||
|
||
if args.show_timeout_info: | ||
|
||
if not args.no_color: | ||
|
||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Whoisxml API, due to ClientSide connection Error", file=sys.stderr) | ||
|
||
else: | ||
|
||
print(f"[INFO]: Timeout reached for Whoisxml API, due to Clientside connection Error", file=sys.stderr) | ||
|
||
except TimeoutError as e: | ||
if args.show_timeout_info: | ||
if not args.no_color: | ||
print(f"[{bold}{red}INFO{reset}]: {bold}{white}Timeout reached for Whoisxml API, due to Timeout Error", file=sys.stderr) | ||
else: | ||
print(f"[INFO]: Timeout reached for Whoisxml API, due to Timeout Error", file=sys.stderr) | ||
|
||
except KeyboardInterrupt as e: | ||
quit() | ||
|
||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception in whoisxmlapi request block: {e}, {type(e)}{reset}", file=sys.stderr) | ||
|
||
except Exception as e: | ||
if args.sec_deb: | ||
print(f"[{bold}{red}WRN{reset}]: {bold}{white}Exception in whoisxmlapi main block: {e}, {type(e)}{reset}", file=sys.stderr) |
Empty file.
Binary file added
BIN
+210 Bytes
subdominator/modules/enumerates/zoomeyeapi/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added
BIN
+11.1 KB
subdominator/modules/enumerates/zoomeyeapi/__pycache__/zoomeyeapi.cpython-311.pyc
Binary file not shown.
Oops, something went wrong.