-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from OSINT-TECHNOLOGIES/rolling
Stabilized v1.1.3
- Loading branch information
Showing
14 changed files
with
431 additions
and
250 deletions.
There are no files selected for viewing
Binary file not shown.
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,59 @@ | ||
import requests | ||
import sqlite3 | ||
from colorama import Fore, Style | ||
|
||
def api_securitytrails_check(domain): | ||
conn = sqlite3.connect('apis//api_keys.db') | ||
cursor = conn.cursor() | ||
cursor.execute("SELECT api_name, api_key FROM api_keys") | ||
rows = cursor.fetchall() | ||
for row in rows: | ||
api_name, api_key = row | ||
if api_name == 'SecurityTrails': | ||
api_key = str(row[1]) | ||
print(Fore.GREEN + 'Got SecurityTrails API key. Starting SecurityTrails scan...\n') | ||
|
||
subdomains_url = f"https://api.securitytrails.com/v1/domain/{domain}/subdomains?apikey={api_key}" | ||
response = requests.get(subdomains_url) | ||
|
||
url = f"https://api.securitytrails.com/v1/domain/{domain}?apikey={api_key}" | ||
general_response = requests.get(url) | ||
general_data = general_response.json() | ||
|
||
print(Fore.GREEN + "[DOMAIN GENERAL INFORMATION]\n") | ||
print(Fore.GREEN + "Alexa Rank: " + Fore.LIGHTCYAN_EX + f"{general_data['alexa_rank']}") | ||
print(Fore.GREEN + "Apex Domain: " + Fore.LIGHTCYAN_EX + f"{general_data['apex_domain']}") | ||
print(Fore.GREEN + "Hostname: " + Fore.LIGHTCYAN_EX + f"{general_data['hostname']}" + Style.RESET_ALL) | ||
|
||
print(Fore.GREEN + "\n[DNS RECORDS]" + Style.RESET_ALL) | ||
for record_type, record_data in general_data['current_dns'].items(): | ||
print(Fore.GREEN + f"\n[+] {record_type.upper()} RECORDS:" + Style.RESET_ALL) | ||
for value in record_data.get('values', []): | ||
if record_type == 'a': | ||
print(Fore.GREEN + "IP: " + Fore.LIGHTCYAN_EX + f"{value['ip']} " + Fore.GREEN + "| Organization: " + Fore.LIGHTCYAN_EX + f"{value['ip_organization']}") | ||
elif record_type == 'mx': | ||
print(Fore.GREEN + "Hostname: " + Fore.LIGHTCYAN_EX + f"{value['hostname']} " + Fore.GREEN + "| Priority: " + Fore.LIGHTCYAN_EX + f"{value['priority']} " + Fore.GREEN + "| Organization: " + Fore.LIGHTCYAN_EX + f"{value['hostname_organization']}") | ||
elif record_type == 'ns': | ||
print(Fore.GREEN + "Nameserver: " + Fore.LIGHTCYAN_EX + f"{value['nameserver']} " + Fore.GREEN + "| Organization: " + Fore.LIGHTCYAN_EX + f"{value['nameserver_organization']}") | ||
elif record_type == 'soa': | ||
print(Fore.GREEN + "Email: " + Fore.LIGHTCYAN_EX + f"{value['email']} " + Fore.GREEN + "| TTL: " + Fore.LIGHTCYAN_EX + f"{value['ttl']}") | ||
elif record_type == 'txt': | ||
print(Fore.GREEN + "Value: " + Fore.LIGHTCYAN_EX + f"{value['value']}") | ||
|
||
if response.status_code == 200: | ||
data = response.json() | ||
print(Fore.GREEN + "\n[SUBDOMAINS DEEP ENUMERATION]\n") | ||
print(Fore.GREEN + f"Found " + Fore.LIGHTCYAN_EX + f"{data['subdomain_count']} " + Fore.GREEN + "subdomains") | ||
print(Fore.GREEN + "Subdomains list: ") | ||
for i, subdomain in enumerate(data['subdomains'], start=1): | ||
subdomain_url = f"http://{subdomain}.{domain}" | ||
try: | ||
response = requests.get(subdomain_url, timeout=5) | ||
if response.status_code == 200: | ||
print(Fore.GREEN + f"{i}. " + Fore.LIGHTCYAN_EX + f"{subdomain_url} " + Fore.GREEN + "is alive") | ||
else: | ||
pass | ||
except Exception: | ||
pass | ||
else: | ||
pass |
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,49 @@ | ||
import requests | ||
import sqlite3 | ||
from colorama import Fore, Style | ||
|
||
def check_domain(domain, api_key): | ||
url = "https://www.virustotal.com/vtapi/v2/domain/report" | ||
params = { | ||
'domain': domain, | ||
'apikey': api_key | ||
} | ||
|
||
response = requests.get(url, params=params) | ||
|
||
if response.status_code == 200: | ||
return response.json() | ||
else: | ||
print(f"Error: {response.status_code}") | ||
return None | ||
|
||
|
||
def api_virustotal_check(domain): | ||
conn = sqlite3.connect('apis//api_keys.db') | ||
cursor = conn.cursor() | ||
cursor.execute("SELECT api_name, api_key FROM api_keys") | ||
rows = cursor.fetchall() | ||
for row in rows: | ||
api_name, api_key = row | ||
if api_name == 'VirusTotal': | ||
api_key = str(row[1]) | ||
print(Fore.GREEN + 'Got VirusTotal API key. Starting VirusTotal scan...\n') | ||
|
||
result = check_domain(domain, api_key) | ||
|
||
if result: | ||
print(Fore.GREEN + "[VIRUSTOTAL DOMAIN REPORT]") | ||
print(Fore.GREEN + f"Domain: {result.get('domain')}") | ||
print(Fore.GREEN + f"Categories: {result.get('categories')}") | ||
print(Fore.GREEN + f"Detected URLs: {len(result.get('detected_urls', []))}") | ||
print(Fore.GREEN + f"Detected Samples: {len(result.get('detected_samples', []))}") | ||
print(Fore.GREEN + f"Undetected Samples: {len(result.get('undetected_samples', []))}\n") | ||
print(Fore.LIGHTGREEN_EX + "-------------------------------------------------\n" + Style.RESET_ALL) | ||
conn.close() | ||
else: | ||
print(Fore.RED + "Failed to get domain report\n") | ||
print(Fore.LIGHTGREEN_EX + "-------------------------------------------------\n" + Style.RESET_ALL) | ||
conn.close() | ||
pass | ||
|
||
|
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
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
Oops, something went wrong.