-
Notifications
You must be signed in to change notification settings - Fork 10
Stabilized v1.2.1 #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
35ac275
Update README.md
OSINT-TECHNOLOGIES 59bc899
Update SECURITY.md
OSINT-TECHNOLOGIES 1d57a0e
Update LICENSE
OSINT-TECHNOLOGIES e79524d
Bumped version
OSINT-TECHNOLOGIES 37e4c79
Added config parameter for selenium snapshotting setups
OSINT-TECHNOLOGIES c237cb8
Added logging and config paragraphs in docs
OSINT-TECHNOLOGIES 3a1356a
Create config.md (blank)
OSINT-TECHNOLOGIES 330dae6
Create logging.md (blank)
OSINT-TECHNOLOGIES 83f607c
Added folder for future snapshotting modules
OSINT-TECHNOLOGIES f15be4e
Update pyproject.toml with new requirements
OSINT-TECHNOLOGIES f91ee74
Update requirements.txt with new requirements
OSINT-TECHNOLOGIES c036141
Added basic functionality of page snapshotting
OSINT-TECHNOLOGIES 5fdad50
Added basic support for page snapshotting
OSINT-TECHNOLOGIES 79c6cd1
Added basic support for page snapshotting
OSINT-TECHNOLOGIES d5aaccb
Added basic support for page snapshotting
OSINT-TECHNOLOGIES 675f908
Added basic support for page snapshotting
OSINT-TECHNOLOGIES 6a0db74
Added basic support for page snapshotting
OSINT-TECHNOLOGIES a75f4de
Added basic support for page snapshotting
OSINT-TECHNOLOGIES 5ab2583
Update poetry.lock with new requirements
OSINT-TECHNOLOGIES 394cc72
Update README.md
OSINT-TECHNOLOGIES 84f10b2
Delete apis/api_keys.db
OSINT-TECHNOLOGIES 0840534
Delete apis/api_keys_reference.db
OSINT-TECHNOLOGIES 410888b
Added HudsonRock API key field (not required for scans)
OSINT-TECHNOLOGIES c3b8b2d
Added HudsonRock API key field (not required for scans)
OSINT-TECHNOLOGIES bc88590
Added HudsonRock API support for DB interactions
OSINT-TECHNOLOGIES 8eabc5b
Created basic implementation of HudsonRock API logic
OSINT-TECHNOLOGIES 04520b8
Added basic support for HudsonRock API
OSINT-TECHNOLOGIES 4ad6784
Added basic support for HudsonRock API
OSINT-TECHNOLOGIES 23348dc
Update README.md
OSINT-TECHNOLOGIES 01cfd4c
Added HTML snapshotting support
OSINT-TECHNOLOGIES 65ccc04
Added HTML snapshotting support
OSINT-TECHNOLOGIES 80a9e21
Created html_snapshotting.py module
OSINT-TECHNOLOGIES fd5b3f7
Update README.md
OSINT-TECHNOLOGIES 5b20aac
Addded support of HudsonRock API results reporting
OSINT-TECHNOLOGIES 857d92e
Added HTML preparation function for formatted_output
OSINT-TECHNOLOGIES 91de206
Added support of HudsonRock API results reporting
OSINT-TECHNOLOGIES c2ffbcc
Added HudsonRock API results transfering logic to reporting modules
OSINT-TECHNOLOGIES 44254bb
Update dpulse.py
OSINT-TECHNOLOGIES da767eb
Update README.md with API keys requirements
OSINT-TECHNOLOGIES baaec5d
Update api.md with APIs key requirements
OSINT-TECHNOLOGIES ca72459
Update api.md with some HudsonRock API info
OSINT-TECHNOLOGIES a5174c2
Fixed bug which did not allowed to use APIs except HudsonRock
OSINT-TECHNOLOGIES ee977a6
Corrected minor cosmetical issue
OSINT-TECHNOLOGIES b7dbd0a
Added snapshotting_ui_mark usage in HTML report
OSINT-TECHNOLOGIES a00a101
Added snapshotting_ui_mark usage in HTML report
OSINT-TECHNOLOGIES 12a40f0
Fixed "dirty API key" problem for VirusTotal API (added key clean pro…
OSINT-TECHNOLOGIES 887c99c
Fixed "dirty API key" problem for SecurityTrails API
OSINT-TECHNOLOGIES 3a7e0d5
Cleaned-up VirusTotal API output
OSINT-TECHNOLOGIES 3b20787
Update README.md
OSINT-TECHNOLOGIES 39020cb
Changed output's visual design
OSINT-TECHNOLOGIES 20c16c6
Changed output's visual design
OSINT-TECHNOLOGIES 9020e66
Unified reporting data from VirusTotal API in one variable
OSINT-TECHNOLOGIES 2714654
Unified reporting data from VirusTotal API in one variable
OSINT-TECHNOLOGIES 5e3f9dd
Unified reporting data from VirusTotal API in one variable
OSINT-TECHNOLOGIES 09bbcc3
Update dpulse.py
OSINT-TECHNOLOGIES c4da16c
Update api_securitytrails.py
OSINT-TECHNOLOGIES 8f45809
Changed SecurityTrails output's visual design
OSINT-TECHNOLOGIES 0c64940
Unified output of SecurityTrails API in one variable
OSINT-TECHNOLOGIES c6868ea
Unified output of SecurityTrails API in one variable
OSINT-TECHNOLOGIES 7e54d86
Unified output of SecurityTrails API in one variable
OSINT-TECHNOLOGIES 884ee19
Update dpulse.py
OSINT-TECHNOLOGIES ce9fe7c
Disabled SI variant selection (PageSearch SI end of life)
OSINT-TECHNOLOGIES 70f54b6
Update README.md
OSINT-TECHNOLOGIES 758086f
Delete docs/dpulse-docs/docs/pagesearch_sitemap.md
OSINT-TECHNOLOGIES 9aa3e23
Deleted PageSearch Sitemap Inspection part from docs
OSINT-TECHNOLOGIES bcbf6ff
Removed PageSearch Sitemap Inspection info from docs
OSINT-TECHNOLOGIES 37a0af1
Update README.md
OSINT-TECHNOLOGIES 0a69006
Deactivated PageSearch SI module usage
OSINT-TECHNOLOGIES f589077
Removed PageSearch SI module usage
OSINT-TECHNOLOGIES 0455cdb
Removed PageSearch Sitemap Inspection module
OSINT-TECHNOLOGIES 9ad3fb3
Removed PageSearch Sitemap Inspection results from HTML template
OSINT-TECHNOLOGIES ab48989
Temporarily disabled XLSX reporting selection
OSINT-TECHNOLOGIES 574e546
Merge branch 'main' into rolling
OSINT-TECHNOLOGIES File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,150 @@ | ||
| import requests | ||
| from colorama import Fore, Style | ||
| import re | ||
|
|
||
| def hudsonrock_html_prep(formatted_output): | ||
| formatted_output = re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', formatted_output) | ||
| start_marker = "=== HUDSONROCK API REPORT ===" | ||
| end_marker = "[+] Email Data:" | ||
| start_index = formatted_output.find(start_marker) | ||
| end_index = formatted_output.find(end_marker) | ||
| if start_index != -1 and end_index != -1: | ||
| formatted_output = formatted_output[:start_index] + formatted_output[end_index:] | ||
| return formatted_output | ||
|
|
||
| def api_hudsonrock_get(email=None, username=None, domain=None, ip=None): | ||
| base_url = "https://cavalier.hudsonrock.com/api/json/v2/osint-tools/" | ||
| results = {} | ||
|
|
||
| def make_request(url): | ||
| try: | ||
| response = requests.get(url) | ||
| response.raise_for_status() | ||
| return response.json() | ||
| except requests.RequestException as e: | ||
| return {'error': str(e)} | ||
|
|
||
| if email: | ||
| email_url = f"{base_url}search-by-email?email={email}" | ||
| results['email'] = make_request(email_url) | ||
|
|
||
| if username: | ||
| username_url = f"{base_url}search-by-username?username={username}" | ||
| results['username'] = make_request(username_url) | ||
|
|
||
| if domain: | ||
| domain_url = f"{base_url}search-by-domain?domain={domain}" | ||
| results['domain'] = make_request(domain_url) | ||
|
|
||
| urls_by_domain_url = f"{base_url}urls-by-domain?domain={domain}" | ||
| results['urls_by_domain'] = make_request(urls_by_domain_url) | ||
|
|
||
| if ip: | ||
| ip_url = f"{base_url}search-by-ip?ip={ip}" | ||
| results['ip'] = make_request(ip_url) | ||
|
|
||
| return results | ||
|
|
||
|
|
||
| def api_hudsonrock_check(domain, ip, email, username): | ||
| results = api_hudsonrock_get(email, username, domain, ip) | ||
| formatted_output = Fore.LIGHTBLUE_EX + "\n=== HUDSONROCK API REPORT ===\n" + Style.RESET_ALL | ||
| formatted_output += f"\n{Fore.LIGHTBLUE_EX}[+] Provided Data:{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Domain:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{domain}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}IP:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{ip}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}E-mail:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{email}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Username:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{username}{Style.RESET_ALL}\n" | ||
|
|
||
| def format_section(title, data): | ||
| nonlocal formatted_output | ||
| formatted_output += f"\n{Fore.LIGHTBLUE_EX}[+] {title}:{Style.RESET_ALL}\n" | ||
| if 'error' in data: | ||
| formatted_output += f"{Fore.RED}Error appeared when trying to get results for {title} requests. Probably given data is incorrect.{Style.RESET_ALL}\n" | ||
| return | ||
|
|
||
| if title == 'Email Data': | ||
| formatted_output += f"{Fore.GREEN}Message:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{data.get('message', 'No message available')}{Style.RESET_ALL}\n" | ||
| for i, stealer in enumerate(data.get('stealers', []), 1): | ||
| formatted_output += f"\n{Fore.GREEN}--- STEALER {i} ---{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Computer Name:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('computer_name', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}OS:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('operating_system', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Date Compromised:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('date_compromised', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Malware Path:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('malware_path', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}IP:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('ip', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Top Passwords:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{', '.join(stealer.get('top_passwords', []))}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Top Logins:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{', '.join(stealer.get('top_logins', []))}{Style.RESET_ALL}\n" | ||
|
|
||
| elif title == 'Username Data': | ||
| formatted_output += f"{Fore.GREEN}Message:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{data.get('message', 'No message available')}{Style.RESET_ALL}\n" | ||
| for i, stealer in enumerate(data.get('stealers', []), 1): | ||
| formatted_output += f"\n{Fore.GREEN}--- STEALER {i} ---{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Stealer Family:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('stealer_family', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Computer Name:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('computer_name', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}OS:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('operating_system', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Date Compromised:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('date_compromised', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Malware Path:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('malware_path', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}IP:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('ip', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Top Passwords:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{', '.join(stealer.get('top_passwords', []))}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Top Logins:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{', '.join(stealer.get('top_logins', []))}{Style.RESET_ALL}\n" | ||
|
|
||
| elif title == 'Domain Data': | ||
| formatted_output += f"{Fore.GREEN}Total Entries:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{data.get('total', 0)}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Total Stealers:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{data.get('totalStealers', 0)}{Style.RESET_ALL}\n" | ||
| formatted_output += f"\n{Fore.GREEN}Sample Employee URLs:{Style.RESET_ALL}\n" | ||
| employee_urls = data.get('data', {}).get('employees_urls', []) | ||
| if employee_urls: | ||
| for url_data in employee_urls[:10]: | ||
| formatted_output += f"{Fore.GREEN}Type:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('type', 'N/A')}{Style.RESET_ALL}" | ||
| formatted_output += f" {Fore.GREEN}| URL:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('url', 'N/A')}{Style.RESET_ALL}" | ||
| formatted_output += f" {Fore.GREEN}| Occurrence:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('occurrence', 'N/A')}{Style.RESET_ALL}\n" | ||
| else: | ||
| formatted_output += f"{Fore.RED}No employee URLs available.{Style.RESET_ALL}\n" | ||
|
|
||
| elif title == 'Attack Surface Data': | ||
| formatted_output += f"{Fore.GREEN}Message:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{data.get('message', 'No message available')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"\n{Fore.GREEN}Sample Employee URLs:{Style.RESET_ALL}\n" | ||
| employees = data.get('data', {}).get('employees_urls', []) | ||
| if employees: | ||
| for url_data in employees[:10]: | ||
| formatted_output += f"{Fore.GREEN}Type:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('type', 'N/A')}{Style.RESET_ALL}" | ||
| formatted_output += f" {Fore.GREEN}| URL:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('url', 'N/A')}{Style.RESET_ALL}" | ||
| formatted_output += f" {Fore.GREEN}| Occurrence:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('occurrence', 'N/A')}{Style.RESET_ALL}\n" | ||
| else: | ||
| formatted_output += f"{Fore.RED}No employee URLs available.{Style.RESET_ALL}\n" | ||
| formatted_output += f"\n{Fore.GREEN}Sample Client URLs:{Style.RESET_ALL}\n" | ||
| clients = data.get('data', {}).get('clients_urls', []) | ||
| if clients: | ||
| for url_data in clients[:10]: | ||
| formatted_output += f"{Fore.GREEN}Type:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('type', 'N/A')}{Style.RESET_ALL}" | ||
| formatted_output += f" {Fore.GREEN}| URL:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('url', 'N/A')}{Style.RESET_ALL}" | ||
| formatted_output += f" {Fore.GREEN}| Occurrence:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{url_data.get('occurrence', 'N/A')}{Style.RESET_ALL}\n" | ||
| else: | ||
| formatted_output += f"{Fore.LIGHTCYAN_EX}No client URLs available.{Style.RESET_ALL}\n" | ||
|
|
||
| elif title == 'IP Data': | ||
| formatted_output += f"{Fore.GREEN}Message:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{data.get('message', 'No message available')}{Style.RESET_ALL}\n" | ||
| if data.get('stealers'): | ||
| for i, stealer in enumerate(data.get('stealers', []), 1): | ||
| formatted_output += f"\n{Fore.GREEN}--- STEALER {i} ---{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Computer Name:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('computer_name', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}OS:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('operating_system', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Date Compromised:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('date_compromised', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Malware Path:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('malware_path', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}IP:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{stealer.get('ip', 'Not Found')}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Top Passwords:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{', '.join(stealer.get('top_passwords', []))}{Style.RESET_ALL}\n" | ||
| formatted_output += f"{Fore.GREEN}Top Logins:{Style.RESET_ALL} {Fore.LIGHTCYAN_EX}{', '.join(stealer.get('top_logins', []))}{Style.RESET_ALL}\n" | ||
| formatted_output += "\n" | ||
|
|
||
| if 'email' in results: | ||
| format_section('Email Data', results['email']) | ||
| if 'username' in results: | ||
| format_section('Username Data', results['username']) | ||
| if 'domain' in results: | ||
| format_section('Domain Data', results['domain']) | ||
| if 'urls_by_domain' in results: | ||
| format_section('Attack Surface Data', results['urls_by_domain']) | ||
| if 'ip' in results: | ||
| format_section('IP Data', results['ip']) | ||
|
|
||
| print(formatted_output) | ||
| return formatted_output | ||
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.