This program is an advanced Python-based website fingerprinting tool designed to analyze and identify technologies, frameworks, CMS (Content Management Systems), servers, and other components used by a target website. It is inspired by tools like WhatWeb but enhanced with more plugins, aggressive scanning options, multi-threading for efficiency, and additional features like DNS/WHOIS lookups, SSL certificate analysis, content hashing, and content security header evaluation. The tool operates ethically, emphasizing that it should only be used for security research, permitted penetration testing, or educational purposes—unauthorized scanning may violate laws or terms of service.
Key features include:
- Passive Detection: Analyzes HTTP responses, headers, and page content to detect CMS (e.g., WordPress, Joomla, Drupal), programming languages (e.g., PHP, Java), frameworks (e.g., React, Angular, Vue.js), databases, CDNs, analytics tools, and more using pattern matching and scoring for confidence levels.
- Aggressive Scanning: Probes common paths and plugin-specific endpoints to uncover hidden details (e.g., admin panels, config files) at varying levels of intrusiveness.
- Additional Analysis: Computes content hashes (MD5, SHA1, SHA256), extracts meta info, cookies, DNS records, SSL details, WHOIS data, network info (IP address), and basic content stats (word count, links, scripts, forms).
- Output Formats: Supports text (default), JSON, YAML, XML, or CSV for results.
- Customization: Allows verbose logging, custom User-Agent, proxies, cookies, headers, thread limits, timeouts, and redirect handling.
- Plugins: Modular with over 20 detection plugins for comprehensive coverage, including e-commerce platforms (Shopify, Magento) and cloud services (AWS).
- Ethical Safeguards: Includes warnings in the code about obtaining permission before use.
The program uses libraries like requests, BeautifulSoup, dns.resolver, cryptography, whois, and others for its functionality. It runs as a command-line script and can process single URLs or lists from files.
To run the program, ensure you have Python 3 installed (tested with Python 3.12.3 or similar) and the required dependencies (e.g., requests, bs4, dnspython, cryptography, python-whois, etc.—install via pip install <package> if missing). Save the script as a file (e.g., adv_web_fingerprinter.py), then execute it from the command line using python3 adv_web_fingerprinter.py [options] <target> (use sudo if needed for privileges, but it's not typically required).
The program uses command-line arguments parsed via argparse. Below, I describe every single command-line option (flag/argument), including its purpose, type, whether it's required or optional, default value (if any), and an example usage. The basic syntax is:
python3 adv_web_fingerprinter.py [options] target-
target (positional argument):
- Description: The target URL to scan (e.g.,
https://example.com) or a file path containing a list of URLs (one per line). This is the main input for the scan. - Type: String.
- Required: Yes.
- Default: None.
- Example:
(scans a single URL) or
python3 adv_web_fingerprinter.py https://example.com
(scans URLs from a file).python3 adv_web_fingerprinter.py targets.txt
- Description: The target URL to scan (e.g.,
-
-v, --verbose:
- Description: Enables verbose logging, which outputs detailed info, warnings, errors, and success messages during the scan (e.g., plugin failures, request statuses). Useful for debugging or monitoring progress.
- Type: Flag (boolean—no value needed; presence enables it).
- Required: Optional.
- Default: Disabled.
- Example:
(runs with verbose output).
python3 adv_web_fingerprinter.py -v https://example.com
-
-a, --aggression:
- Description: Sets the aggression level for scanning (0-3). Higher levels perform more intrusive probes:
- 0: No aggressive scanning (passive only).
- 1: Probes common paths (e.g., /admin, /robots.txt).
- 2+: Includes plugin-specific aggressive detections (e.g., WordPress-specific paths like /wp-login.php).
- Use cautiously, as higher levels increase requests and may alert site owners.
- Type: Integer (choices: 0, 1, 2, 3).
- Required: Optional.
- Default: 1.
- Example:
(maximum aggression for deeper probing).
python3 adv_web_fingerprinter.py -a 3 https://example.com
- Description: Sets the aggression level for scanning (0-3). Higher levels perform more intrusive probes:
-
-t, --threads:
- Description: Sets the maximum number of threads for concurrent operations (e.g., aggressive path probing). Higher values speed up scans but may overwhelm the target or your system.
- Type: Integer.
- Required: Optional.
- Default: 20.
- Example:
(limits to 10 threads).
python3 adv_web_fingerprinter.py -t 10 https://example.com
-
--timeout:
- Description: Sets the request timeout in seconds for HTTP operations. Useful for slow sites or networks.
- Type: Integer.
- Required: Optional.
- Default: 15.
- Example:
(30-second timeout).
python3 adv_web_fingerprinter.py --timeout 30 https://example.com
-
-u, --user-agent:
- Description: Specifies a custom User-Agent string for HTTP requests (overrides the default 'Mozilla/5.0 (compatible; AdvancedFingerprinter/3.0)'). Helps mimic browsers or avoid detection.
- Type: String.
- Required: Optional.
- Default: None (uses default).
- Example:
python3 adv_web_fingerprinter.py -u "MyCustomAgent/1.0" https://example.com
-
-p, --proxy:
- Description: Sets a proxy URL for all requests (e.g., for anonymity or routing). Supports HTTP/HTTPS proxies.
- Type: String (e.g., 'http://proxy:port').
- Required: Optional.
- Default: None.
- Example:
python3 adv_web_fingerprinter.py -p "http://localhost:8080" https://example.com
-
-c, --cookies:
- Description: Provides cookies as a semicolon-separated string (e.g., 'name=value; name2=value2'). These are added to requests, useful for authenticated scans.
- Type: String.
- Required: Optional.
- Default: None.
- Example:
python3 adv_web_fingerprinter.py -c "session_id=abc123; user=admin" https://example.com
-
-H, --headers:
- Description: Adds custom HTTP headers as space-separated key:value pairs (multiple can be provided). Overrides or adds to default headers.
- Type: List of strings (nargs='*'; e.g., 'Header1: value1' 'Header2: value2').
- Required: Optional.
- Default: None.
- Example:
python3 adv_web_fingerprinter.py -H "Authorization: Bearer token" "Accept: application/json" https://example.com
-
-r, --no-redirects:
- Description: Disables following HTTP redirects (by default, redirects are followed). Useful for analyzing initial responses.
- Type: Flag (boolean—presence disables redirects).
- Required: Optional.
- Default: Follow redirects (enabled).
- Example:
(does not follow redirects).
python3 adv_web_fingerprinter.py -r https://example.com
-
-f, --format:
- Description: Specifies the output format for scan results.
- 'text': Human-readable plain text (default).
- 'json': JSON-structured output.
- 'yaml': YAML format.
- 'xml': XML format.
- 'csv': Flattened CSV (key,value pairs).
- Type: String (choices: 'text', 'json', 'yaml', 'xml', 'csv').
- Required: Optional.
- Default: 'text'.
- Example:
(outputs in JSON).
python3 adv_web_fingerprinter.py -f json https://example.com
- Description: Specifies the output format for scan results.
-
-o, --output:
- Description: Specifies a file to save the output to (instead of printing to console). The file will be overwritten if it exists.
- Type: String (file path).
- Required: Optional.
- Default: None (prints to console).
- Example:
(saves output to results.txt).
python3 adv_web_fingerprinter.py -o results.txt https://example.com
A comprehensive example using multiple options:
sudo python3 adv_web_fingerprinter.py -v -a 3 -t 15 --timeout 20 -u "CustomUA" -p "http://proxy:8080" -c "auth=token" -H "Custom-Header: value" -r -f json -o scan_results.json https://example.comThis runs a verbose, highly aggressive scan with custom settings and saves JSON output to a file.
If you encounter errors (e.g., missing libraries), install them via pip.
Important Ethical Notice: This tool is intended solely for ethical and legal purposes, such as authorized security assessments or educational demonstrations. Unauthorized use, including scanning websites without explicit permission from the owners, may constitute a violation of computer fraud and abuse laws (e.g., CFAA in the US), privacy regulations (e.g., GDPR in Europe), or website terms of service. Always obtain written consent before performing any scans, respect robots.txt directives, and avoid actions that could disrupt services or invade privacy. Misuse can lead to legal consequences, IP bans, or ethical breaches. Use responsibly and promote cybersecurity best practices.