reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
Shell bug-bountybugbountybugbounty-tooldnshackingnucleiosintpenetration-testingpentestpentest-toolpentestingreconreconnaissancescannersecuritysecurity-toolssubdomainsubdomain-enumerationvulnerabilities
QOL improvements + some new features
six2dez0048f357dd01
diff --git a/README.md b/README.mdindex 4b98357..7153cc7 100644--- a/README.md+++ b/README.md@@ -1,200 +1,209 @@--<h1 align="center">- <br>- <a href="https://github.com/six2dez/reconftw"><img src="https://github.com/six2dez/reconftw/blob/main/images/banner.png" alt="reconftw"></a>- <br>- reconFTW- <br>-</h1>--<p align="center">- <a href="https://github.com/six2dez/reconftw/releases/tag/v3.1">- <img src="https://img.shields.io/badge/release-v3.1-green">- </a>- </a>- <a href="https://opensource.org/licenses/MIT">- <img src="https://img.shields.io/badge/License-MIT-yellow.svg">- </a>- <a href="https://twitter.com/Six2dez1">- <img src="https://img.shields.io/badge/twitter-%40Six2dez1-blue">- </a>- <a href="https://github.com/six2dez/reconftw/issues?q=is%3Aissue+is%3Aclosed">- <img src="https://img.shields.io/github/issues-closed-raw/six2dez/reconftw.svg">- </a>- <a href="https://github.com/six2dez/reconftw/wiki">- <img src="https://img.shields.io/badge/doc-wiki-blue.svg">- </a>- <a href="https://t.me/joinchat/H5bAaw3YbzzmI5co">- <img src="https://img.shields.io/badge/[email protected]">- </a>- <a href="https://discord.gg/R5DdXVEdTy">- <img src="https://img.shields.io/discord/1048623782912340038.svg?logo=discord">- </a>-</p>--**reconFTW** is a powerful automated reconnaissance tool designed for security researchers and penetration testers. It streamlines the process of gathering intelligence on a target by performing subdomain enumeration, vulnerability scanning, OSINT and more. With a modular design, extensive configuration options, and support for distributed scanning via AX Framework, reconFTW is built to deliver comprehensive results efficiently.--reconFTW leverages a wide range of techniques, including passive and active subdomain discovery, web vulnerability checks (e.g., XSS, SSRF, SQLi), OSINT, directory fuzzing, port scanning and screenshotting. It integrates with cutting-edge tools and APIs to maximize coverage and accuracy, ensuring you stay ahead in your reconnaissance efforts.--**Key Features:**--- Comprehensive subdomain enumeration (passive, bruteforce, permutations, certificate transparency, etc.)-- Vulnerability scanning for XSS, SSRF, SQLi, LFI, SSTI, and more-- OSINT for emails, metadata, API leaks, and third-party misconfigurations-- Distributed scanning with AX Framework for faster execution-- Customizable workflows with a detailed configuration file-- Integration with Faraday for reporting and visualization-- Support for Docker, Terraform and Ansible deployments--**Disclaimer:** Usage of reconFTW for attacking targets without prior consent is illegal. It is the user's responsibility to obey all applicable laws. The developers assume no liability for misuse or damage caused by this tool. Use responsibly.-------## π Table of Contents--- [π Table of Contents](#-table-of-contents)-- [β¨ Features](#-features)- - [OSINT](#osint)- - [Subdomains](#subdomains)- - [Hosts](#hosts)- - [Web Analysis](#web-analysis)- - [Vulnerability Checks](#vulnerability-checks)- - [Extras](#extras)-- [πΏ Installation](#-installation)- - [Local Installation (PC/VPS/VM)](#local-installation-pcvpsvm)- - [Docker](#docker)- - [Terraform + Ansible](#terraform--ansible)-- [βοΈ Configuration](#οΈ-configuration)-- [π Usage](#-usage)- - [Target Options](#target-options)- - [Mode Options](#mode-options)- - [General Options](#general-options)- - [Example Usage](#example-usage)-- [βοΈ Ax Framework Support (previously Axiom)](#οΈ-ax-framework-support-previously-axiom)-- [π» Faraday Support](#-faraday-support)-- [π§ AI Integration](#-ai-integration)-- [ποΈ Data Management](#οΈ-data-management)- - [Makefile](#makefile)- - [Manual](#manual)-- [Mindmap/Workflow](#mindmapworkflow)-- [Sample video](#sample-video)-- [π€ How to Contribute](#-how-to-contribute)-- [β Need Help?](#-need-help)-- [π Support This Project](#-support-this-project)-- [π Thanks](#-thanks)-- [π License](#-license)-- [β Star History](#-star-history)-------## β¨ Features--reconFTW is packed with features to make reconnaissance thorough and efficient. Below is a detailed breakdown of its capabilities, updated to reflect the latest functionality in the script and configuration.--### OSINT--- **Domain Information**: WHOIS lookup for domain registration details ([whois](https://github.com/rfc1036/whois)).-- **Email and Password Leaks**: Searches for leaked emails and credentials ([emailfinder](https://github.com/Josue87/EmailFinder) and [LeakSearch](https://github.com/JoelGMSec/LeakSearch)).-- **Microsoft 365/Azure Mapping**: Identifies Microsoft 365 and Azure tenants ([msftrecon](https://github.com/Arcanum-Sec/msftrecon)).-- **Metadata Extraction**: Extracts metadata from indexed office documents ([metagoofil](https://github.com/opsdisk/metagoofil)).-- **API Leaks**: Detects exposed APIs in public sources ([porch-pirate](https://github.com/MandConsultingGroup/porch-pirate) and [SwaggerSpy](https://github.com/UndeadSec/SwaggerSpy)).-- **Google Dorking**: Automated Google dork queries for sensitive information ([dorks_hunter](https://github.com/six2dez/dorks_hunter) and [xnldorker](https://github.com/xnl-h4ck3r/xnldorker)).-- **GitHub Analysis**: Scans GitHub organizations for repositories and secrets ([enumerepo](https://github.com/trickest/enumerepo), [trufflehog](https://github.com/trufflesecurity/trufflehog) and [gitleaks](https://github.com/gitleaks/gitleaks)).-- **Third-Party Misconfigurations**: Identifies misconfigured third-party services ([misconfig-mapper](https://github.com/intigriti/misconfig-mapper)).-- **Spoofable Domains**: Checks for domains vulnerable to spoofing ([spoofcheck](https://github.com/MattKeeley/Spoofy)).--### Subdomains--- **Passive Enumeration**: Uses APIs and public sources for subdomain discovery ([subfinder](https://github.com/projectdiscovery/subfinder) and [github-subdomains](https://github.com/gwen001/github-subdomains)).-- **Certificate Transparency**: Queries certificate transparency logs ([crt](https://github.com/cemulus/crt)).-- **NOERROR Discovery**: Identifies subdomains with DNS NOERROR responses ([dnsx](https://github.com/projectdiscovery/dnsx), more info [here](https://www.securesystems.de/blog/enhancing-subdomain-enumeration-ents-and-noerror/)).-- **Bruteforce**: Performs DNS bruteforcing with customizable wordlists ([puredns](https://github.com/d3mondev/puredns) and custom wordlists).-- **Permutations**: Generates subdomain permutations using AI, regex and tools ([Gotator](https://github.com/Josue87/gotator), [ripgen](https://github.com/resyncgg/ripgen), [regulator](https://github.com/cramppet/regulator) and [subwiz](https://github.com/hadriansecurity/subwiz)).-- **Web Scraping**: Extracts subdomains from web crawling and JS files ([katana](https://github.com/projectdiscovery/katana)).-- **DNS Records**: Resolves DNS records for subdomains ([dnsx](https://github.com/projectdiscovery/dnsx)).-- **Google Analytics**: Identifies subdomains via Analytics IDs ([AnalyticsRelationships](https://github.com/Josue87/AnalyticsRelationships)).-- **TLS Handshake**: Discovers subdomains via TLS ports ([tlsx](https://github.com/projectdiscovery/tlsx)).-- **Recursive Search**: Performs recursive passive or bruteforce enumeration combined ([dsieve](https://github.com/trickest/dsieve)).-- **Subdomain Takeover**: Detects vulnerable subdomains ([nuclei](https://github.com/projectdiscovery/nuclei) and [dnstake](https://github.com/pwnesia/dnstake)).-- **DNS Zone Transfer**: Checks for misconfigured DNS zone transfers ([dig](https://linux.die.net/man/1/dig)).-- **Cloud Buckets**: Identifies misconfigured S3 buckets ([S3Scanner](https://github.com/sa7mon/S3Scanner) and [CloudHunter](https://github.com/belane/CloudHunter)).-- **Reverse IP Lookup**: Discovers subdomains via IP ranges ([hakip2host](https://github.com/hakluke/hakip2host)).--### Hosts--- **IP Information**: Retrieves geolocation and WHOIS data ([ipinfo](https://www.ipinfo.io/)).-- **CDN Detection**: Identifies IPs behind CDNs ([cdncheck](https://github.com/projectdiscovery/cdncheck)).-- **WAF Detection**: Detects Web Application Firewalls ([wafw00f](https://github.com/EnableSecurity/wafw00f)).-- **Port Scanning**: Active scanning with [nmap](https://github.com/nmap/nmap) and passive scanning with [smap](https://github.com/s0md3v/Smap).-- **Service Vulnerabilities**: Checks for vulnerabilities in open ports ([vulners](https://github.com/vulnersCom/nmap-vulners)).-- **Password Spraying**: Attempts password spraying on identified services ([brutespray](https://github.com/x90skysn3k/brutespray)).-- **Geolocation**: Maps IP addresses to geographic locations ([ipinfo](https://www.ipinfo.io/)).--### Web Analysis--- **Web Probing**: Detects live web servers on standard and uncommon ports (([httpx](https://github.com/projectdiscovery/httpx))).-- **Screenshots**: Captures screenshots of web pages ([nuclei](https://github.com/projectdiscovery/nuclei)).-- **Virtual Host Fuzzing**: Identifies virtual hosts by fuzzing HTTP headers ([VhostFinder](https://github.com/wdahlenburg/VhostFinder)).-- **CMS Detection**: Identifies content management systems ([CMSeeK](https://github.com/Tuhinshubhra/CMSeeK)).-- **URL Extraction**: Collects URLs passively and actively ([urlfinder](https://github.com/projectdiscovery/urlfinder), [katana](https://github.com/projectdiscovery/katana), [github-endpoints](https://gist.github.com/six2dez/d1d516b606557526e9a78d7dd49cacd3) and [JSA](https://github.com/w9w/JSA)).-- **URL Pattern Analysis**: Classifies URLs using patterns ([urless](https://github.com/xnl-h4ck3r/urless), [gf](https://github.com/tomnomnom/gf) and [gf-patterns](https://github.com/1ndianl33t/Gf-Patterns)).-- **Favicon Analysis**: Discovers real IPs behind favicons ([fav-up](https://github.com/pielco11/fav-up)).-- **JavaScript Analysis**: Extracts secrets and endpoints from JS files ([subjs](https://github.com/lc/subjs), [JSA](https://github.com/w9w/JSA), [xnLinkFinder](https://github.com/xnl-h4ck3r/xnLinkFinder), [getjswords](https://github.com/m4ll0k/BBTz), [mantra](https://github.com/MrEmpy/mantra), [jsluice](https://github.com/BishopFox/jsluice)).-- **Source Map Extraction**: Retrieves sensitive data from JavaScript source maps ([sourcemapper](https://github.com/denandz/sourcemapper)).-- **Fuzzing**: Performs directory and parameter fuzzing ([ffuf](https://github.com/ffuf/ffuf)).-- **File Extension Sorting**: Organizes URLs by file extensions.-- **Wordlist Generation**: Creates custom wordlists for fuzzing.-- **Password Dictionary**: Generates password dictionaries ([pydictor](https://github.com/LandGrey/pydictor)).-- **IIS Shortname Scanning**: Detects IIS shortname vulnerabilities ([shortscan](https://github.com/bitquark/shortscan) and [sns](https://github.com/sw33tLie/sns)).--### Vulnerability Checks--- **CVEs**: Checks for CVE and common vulnerabilites [nuclei](https://github.com/projectdiscovery/nuclei)-- **XSS**: Tests for cross-site scripting vulnerabilities ([dalfox](https://github.com/hahwul/dalfox)).-- **CORS**: Identifies CORS misconfigurations ([Corsy](https://github.com/s0md3v/Corsy)).-- **SSL/TLS**: Checks for SSL/TLS misconfigurations ([testssl](https://github.com/drwetter/testssl.sh)).-- **Open Redirects**: Detects open redirect vulnerabilities ([Oralyzer](https://github.com/r0075h3ll/Oralyzer)).-- **SSRF**: Tests for server-side request forgery ([interactsh](https://github.com/projectdiscovery/interactsh) and param values with [ffuf](https://github.com/ffuf/ffuf)).-- **CRLF**: Checks for CRLF injection vulnerabilities ([crlfuzz](https://github.com/dwisiswant0/crlfuzz)).-- **LFI**: Tests for local file inclusion via fuzzing ([ffuf](https://github.com/ffuf/ffuf)).-- **SSTI**: Detects server-side template injection ([ffuf](https://github.com/ffuf/ffuf)).-- **SQLi**: Tests for SQL injection ([SQLMap](https://github.com/sqlmapproject/sqlmap) and [ghauri](https://github.com/r0oth3x49/ghauri)).-- **Broken Links**: Identifies broken links on web pages ([katana](https://github.com/projectdiscovery/katana)).-- **Command Injection**: Tests for command injection vulnerabilities ([commix](https://github.com/commixproject/commix)).-- **Prototype Pollution**: Detects JavaScript prototype pollution ([ppmap](https://github.com/kleiton0x00/ppmap)).-- **HTTP Request Smuggling**: Checks for request smuggling vulnerabilities ([smuggler](https://github.com/defparam/smuggler)).-- **Web Cache**: Identifies web cache vulnerabilities ([Web-Cache-Vulnerability-Scanner](https://github.com/Hackmanit/Web-Cache-Vulnerability-Scanner)).-- **4XX Bypassing**: Attempts to bypass 4XX responses ([nomore403](https://github.com/devploit/nomore403)).-- **Parameter Fuzzing**: Fuzzes URL parameters for vulnerabilities ([nuclei](https://github.com/projectdiscovery/nuclei)).--### Extras--- **Multithreading**: Optimizes performance ([Interlace](https://github.com/codingo/Interlace)).-- **Custom Resolvers**: Generates DNS resolvers ([dnsvalidator](https://github.com/vortexau/dnsvalidator)).-- **Docker Support**: Official Docker image on [DockerHub](https://hub.docker.com/r/six2dez/reconftw).-- **AWS Deployment**: Deploys via Terraform and Ansible.-- **IP/CIDR Support**: Scans IP ranges and CIDR blocks.-- **Scan Resumption**: Resumes scans from the last completed step.-- **Custom Output**: Saves results to a user-defined directory.-- **Diff Mode**: Highlights new findings in subsequent scans.-- **Scope Filtering**: Supports in-scope and out-of-scope lists ([inscope](https://github.com/tomnomnom/hacks/tree/master/inscope)).-- **Notifications**: Sends alerts via Slack, Discord, or Telegram ([notify](https://github.com/projectdiscovery/notify)).-- **Result Zipping**: Compresses and sends results.-- **Faraday Integration**: Exports results to [Faraday](https://github.com/infobyte/faraday) for reporting .-- **AI Report Generation**: Generates reports using local AI models ([reconftw_ai](https://github.com/six2dez/reconftw_ai)).-- **ARM Support**: Compatible with Raspberry Pi and ARM architectures (including MacOS MX).------++<h1 align="center">+ <br>+ <a href="https://github.com/six2dez/reconftw"><img src="https://github.com/six2dez/reconftw/blob/main/images/banner.png" alt="reconftw"></a>+ <br>+ reconFTW+ <br>+</h1>++<p align="center">+ <a href="https://github.com/six2dez/reconftw/releases/tag/v3.1">+ <img src="https://img.shields.io/badge/release-v3.1-green">+ </a>+ </a>+ <a href="https://opensource.org/licenses/MIT">+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg">+ </a>+ <a href="https://twitter.com/Six2dez1">+ <img src="https://img.shields.io/badge/twitter-%40Six2dez1-blue">+ </a>+ <a href="https://github.com/six2dez/reconftw/issues?q=is%3Aissue+is%3Aclosed">+ <img src="https://img.shields.io/github/issues-closed-raw/six2dez/reconftw.svg">+ </a>+ <a href="https://github.com/six2dez/reconftw/wiki">+ <img src="https://img.shields.io/badge/doc-wiki-blue.svg">+ </a>+ <a href="https://t.me/joinchat/H5bAaw3YbzzmI5co">+ <img src="https://img.shields.io/badge/[email protected]">+ </a>+ <a href="https://discord.gg/R5DdXVEdTy">+ <img src="https://img.shields.io/discord/1048623782912340038.svg?logo=discord">+ </a>+</p>++**reconFTW** is a powerful automated reconnaissance tool designed for security researchers and penetration testers. It streamlines the process of gathering intelligence on a target by performing subdomain enumeration, vulnerability scanning, OSINT and more. With a modular design, extensive configuration options, and support for distributed scanning via AX Framework, reconFTW is built to deliver comprehensive results efficiently.++reconFTW leverages a wide range of techniques, including passive and active subdomain discovery, web vulnerability checks (e.g., XSS, SSRF, SQLi), OSINT, directory fuzzing, port scanning and screenshotting. It integrates with cutting-edge tools and APIs to maximize coverage and accuracy, ensuring you stay ahead in your reconnaissance efforts.++**Key Features:**++- Comprehensive subdomain enumeration (passive, bruteforce, permutations, certificate transparency, etc.)+- Vulnerability scanning for XSS, SSRF, SQLi, LFI, SSTI, and more+- OSINT for emails, metadata, API leaks, and third-party misconfigurations+- Distributed scanning with AX Framework for faster execution+- Customizable workflows with a detailed configuration file+- Integration with Faraday for reporting and visualization+- Support for Docker, Terraform and Ansible deployments++**Disclaimer:** Usage of reconFTW for attacking targets without prior consent is illegal. It is the user's responsibility to obey all applicable laws. The developers assume no liability for misuse or damage caused by this tool. Use responsibly.++---++## π Table of Contents++- [π Table of Contents](#-table-of-contents)+- [β¨ Features](#-features)+ - [OSINT](#osint)+ - [Subdomains](#subdomains)+ - [Hosts](#hosts)+ - [Web Analysis](#web-analysis)+ - [Vulnerability Checks](#vulnerability-checks)+ - [Extras](#extras)+- [πΏ Installation](#-installation)+ - [Local Installation (PC/VPS/VM)](#local-installation-pcvpsvm)+ - [Docker](#docker)+ - [Terraform + Ansible](#terraform--ansible)+- [βοΈ Configuration](#οΈ-configuration)+- [π Usage](#-usage)+ - [Target Options](#target-options)+ - [Mode Options](#mode-options)+ - [General Options](#general-options)+ - [Example Usage](#example-usage)+- [βοΈ Ax Framework Support (previously Axiom)](#οΈ-ax-framework-support-previously-axiom)+- [π» Faraday Support](#-faraday-support)+- [π§ AI Integration](#-ai-integration)+- [ποΈ Data Management](#οΈ-data-management)+ - [Makefile](#makefile)+ - [Manual](#manual)+- [Mindmap/Workflow](#mindmapworkflow)+- [Sample video](#sample-video)+- [π€ How to Contribute](#-how-to-contribute)+- [β Need Help?](#-need-help)+- [π Support This Project](#-support-this-project)+- [π Thanks](#-thanks)+- [π License](#-license)+- [β Star History](#-star-history)++---++## β¨ Features++reconFTW is packed with features to make reconnaissance thorough and efficient. Below is a detailed breakdown of its capabilities, updated to reflect the latest functionality in the script and configuration.++### OSINT++- **Domain Information**: WHOIS lookup for domain registration details ([whois](https://github.com/rfc1036/whois)).+- **Email and Password Leaks**: Searches for leaked emails and credentials ([emailfinder](https://github.com/Josue87/EmailFinder) and [LeakSearch](https://github.com/JoelGMSec/LeakSearch)).+- **Microsoft 365/Azure Mapping**: Identifies Microsoft 365 and Azure tenants ([msftrecon](https://github.com/Arcanum-Sec/msftrecon)).+- **Metadata Extraction**: Extracts metadata from indexed office documents ([metagoofil](https://github.com/opsdisk/metagoofil)).+- **API Leaks**: Detects exposed APIs in public sources ([porch-pirate](https://github.com/MandConsultingGroup/porch-pirate) and [SwaggerSpy](https://github.com/UndeadSec/SwaggerSpy)).+- **Google Dorking**: Automated Google dork queries for sensitive information ([dorks_hunter](https://github.com/six2dez/dorks_hunter) and [xnldorker](https://github.com/xnl-h4ck3r/xnldorker)).+- **GitHub Analysis**: Scans GitHub organizations for repositories and secrets ([enumerepo](https://github.com/trickest/enumerepo), [trufflehog](https://github.com/trufflesecurity/trufflehog) and [gitleaks](https://github.com/gitleaks/gitleaks)).+- **Third-Party Misconfigurations**: Identifies misconfigured third-party services ([misconfig-mapper](https://github.com/intigriti/misconfig-mapper)).+- **Mail Hygiene**: Reviews SPF/DMARC configuration to flag spoofing or deliverability issues.+- **Cloud Storage Enumeration**: Surveys buckets across major providers for exposure ([cloud_enum](https://github.com/initstring/cloud_enum)).+- **Spoofable Domains**: Checks for domains vulnerable to spoofing ([spoofcheck](https://github.com/MattKeeley/Spoofy)).++### Subdomains++- **Passive Enumeration**: Uses APIs and public sources for subdomain discovery ([subfinder](https://github.com/projectdiscovery/subfinder) and [github-subdomains](https://github.com/gwen001/github-subdomains)).+- **Certificate Transparency**: Queries certificate transparency logs ([crt](https://github.com/cemulus/crt)).+- **NOERROR Discovery**: Identifies subdomains with DNS NOERROR responses ([dnsx](https://github.com/projectdiscovery/dnsx), more info [here](https://www.securesystems.de/blog/enhancing-subdomain-enumeration-ents-and-noerror/)).+- **Bruteforce**: Performs DNS bruteforcing with customizable wordlists ([puredns](https://github.com/d3mondev/puredns) and custom wordlists).+- **Permutations**: Generates subdomain permutations using AI, regex and tools ([Gotator](https://github.com/Josue87/gotator), [ripgen](https://github.com/resyncgg/ripgen), [regulator](https://github.com/cramppet/regulator) and [subwiz](https://github.com/hadriansecurity/subwiz)).+- **Web Scraping**: Extracts subdomains from web crawling and JS files ([katana](https://github.com/projectdiscovery/katana)).+- **DNS Records**: Resolves DNS records for subdomains ([dnsx](https://github.com/projectdiscovery/dnsx)).+- **Google Analytics**: Identifies subdomains via Analytics IDs ([AnalyticsRelationships](https://github.com/Josue87/AnalyticsRelationships)).+- **TLS Handshake**: Discovers subdomains via TLS ports ([tlsx](https://github.com/projectdiscovery/tlsx)).+- **Recursive Search**: Performs recursive passive or bruteforce enumeration combined ([dsieve](https://github.com/trickest/dsieve)).+- **Subdomain Takeover**: Detects vulnerable subdomains ([nuclei](https://github.com/projectdiscovery/nuclei) and [dnstake](https://github.com/pwnesia/dnstake)).+- **DNS Zone Transfer**: Checks for misconfigured DNS zone transfers ([dig](https://linux.die.net/man/1/dig)).+- **Cloud Buckets**: Identifies misconfigured S3 buckets ([S3Scanner](https://github.com/sa7mon/S3Scanner) and [CloudHunter](https://github.com/belane/CloudHunter)).+- **Reverse IP Lookup**: Discovers subdomains via IP ranges ([hakip2host](https://github.com/hakluke/hakip2host)).++### Hosts++- **IP Information**: Retrieves geolocation and WHOIS data ([ipinfo](https://www.ipinfo.io/)).+- **CDN Detection**: Identifies IPs behind CDNs ([cdncheck](https://github.com/projectdiscovery/cdncheck)).+- **WAF Detection**: Detects Web Application Firewalls ([wafw00f](https://github.com/EnableSecurity/wafw00f)).+- **Port Scanning**: Active scanning with [nmap](https://github.com/nmap/nmap) and passive scanning with [smap](https://github.com/s0md3v/Smap).+- **Service Vulnerabilities**: Checks for vulnerabilities in open ports ([vulners](https://github.com/vulnersCom/nmap-vulners)).+- **Password Spraying**: Attempts password spraying on identified services ([brutespray](https://github.com/x90skysn3k/brutespray)).+- **Geolocation**: Maps IP addresses to geographic locations ([ipinfo](https://www.ipinfo.io/)).+- **IPv6 Discovery**: Optionally enumerates and scans discovered IPv6 targets when `IPV6_SCAN` is enabled.++### Web Analysis++- **Web Probing**: Detects live web servers on standard and uncommon ports (([httpx](https://github.com/projectdiscovery/httpx))).+- **Screenshots**: Captures screenshots of web pages ([nuclei](https://github.com/projectdiscovery/nuclei)).+- **Virtual Host Fuzzing**: Identifies virtual hosts by fuzzing HTTP headers ([VhostFinder](https://github.com/wdahlenburg/VhostFinder)).+- **CMS Detection**: Identifies content management systems ([CMSeeK](https://github.com/Tuhinshubhra/CMSeeK)).+- **URL Extraction**: Collects URLs passively and actively ([urlfinder](https://github.com/projectdiscovery/urlfinder), [katana](https://github.com/projectdiscovery/katana), [github-endpoints](https://gist.github.com/six2dez/d1d516b606557526e9a78d7dd49cacd3) and [JSA](https://github.com/w9w/JSA)).+- **URL Pattern Analysis**: Classifies URLs using patterns ([urless](https://github.com/xnl-h4ck3r/urless), [gf](https://github.com/tomnomnom/gf) and [gf-patterns](https://github.com/1ndianl33t/Gf-Patterns)).+- **Favicon Analysis**: Discovers real IPs behind favicons ([fav-up](https://github.com/pielco11/fav-up)).+- **JavaScript Analysis**: Extracts secrets and endpoints from JS files ([subjs](https://github.com/lc/subjs), [JSA](https://github.com/w9w/JSA), [xnLinkFinder](https://github.com/xnl-h4ck3r/xnLinkFinder), [getjswords](https://github.com/m4ll0k/BBTz), [mantra](https://github.com/MrEmpy/mantra), [jsluice](https://github.com/BishopFox/jsluice)).+- **Source Map Extraction**: Retrieves sensitive data from JavaScript source maps ([sourcemapper](https://github.com/denandz/sourcemapper)).+- **GraphQL Detection**: Discovers GraphQL endpoints with nuclei and optionally performs in-depth introspection ([GQLSpection](https://github.com/doyensec/GQLSpection)).+- **Parameter Discovery**: Bruteforces hidden parameters on endpoints ([arjun](https://github.com/s0md3v/Arjun)).+- **WebSocket Auditing**: Validates upgrade handshakes and origin handling on `ws://` and `wss://` endpoints.+- **gRPC Reflection**: Probes common gRPC ports for exposed service reflection ([grpcurl](https://github.com/fullstorydev/grpcurl)).+- **Fuzzing**: Performs directory and parameter fuzzing ([ffuf](https://github.com/ffuf/ffuf)).+- **File Extension Sorting**: Organizes URLs by file extensions.+- **Wordlist Generation**: Creates custom wordlists for fuzzing.+- **Password Dictionary**: Generates password dictionaries ([pydictor](https://github.com/LandGrey/pydictor)).+- **IIS Shortname Scanning**: Detects IIS shortname vulnerabilities ([shortscan](https://github.com/bitquark/shortscan) and [sns](https://github.com/sw33tLie/sns)).++### Vulnerability Checks++- **CVEs**: Checks for CVE and common vulnerabilites [nuclei](https://github.com/projectdiscovery/nuclei)+- **XSS**: Tests for cross-site scripting vulnerabilities ([dalfox](https://github.com/hahwul/dalfox)).+- **CORS**: Identifies CORS misconfigurations ([Corsy](https://github.com/s0md3v/Corsy)).+- **SSL/TLS**: Checks for SSL/TLS misconfigurations ([testssl](https://github.com/drwetter/testssl.sh)).+- **Open Redirects**: Detects open redirect vulnerabilities ([Oralyzer](https://github.com/r0075h3ll/Oralyzer)).+- **SSRF**: Tests for server-side request forgery ([interactsh](https://github.com/projectdiscovery/interactsh) and param values with [ffuf](https://github.com/ffuf/ffuf)).+- **CRLF**: Checks for CRLF injection vulnerabilities ([crlfuzz](https://github.com/dwisiswant0/crlfuzz)).+- **LFI**: Tests for local file inclusion via fuzzing ([ffuf](https://github.com/ffuf/ffuf)).+- **SSTI**: Detects server-side template injection ([ffuf](https://github.com/ffuf/ffuf)).+- **SQLi**: Tests for SQL injection ([SQLMap](https://github.com/sqlmapproject/sqlmap) and [ghauri](https://github.com/r0oth3x49/ghauri)).+- **Broken Links**: Identifies broken links on web pages ([katana](https://github.com/projectdiscovery/katana)).+- **Command Injection**: Tests for command injection vulnerabilities ([commix](https://github.com/commixproject/commix)).+- **Prototype Pollution**: Detects JavaScript prototype pollution ([ppmap](https://github.com/kleiton0x00/ppmap)).+- **HTTP Request Smuggling**: Checks for request smuggling vulnerabilities ([smuggler](https://github.com/defparam/smuggler)).+- **Web Cache**: Identifies web cache vulnerabilities ([Web-Cache-Vulnerability-Scanner](https://github.com/Hackmanit/Web-Cache-Vulnerability-Scanner)).+- **4XX Bypassing**: Attempts to bypass 4XX responses ([nomore403](https://github.com/devploit/nomore403)).+- **Parameter Fuzzing**: Fuzzes URL parameters for vulnerabilities ([nuclei](https://github.com/projectdiscovery/nuclei)).++### Extras++- **Multithreading**: Optimizes performance ([Interlace](https://github.com/codingo/Interlace)).+- **Custom Resolvers**: Generates DNS resolvers ([dnsvalidator](https://github.com/vortexau/dnsvalidator)).+- **Docker Support**: Official Docker image on [DockerHub](https://hub.docker.com/r/six2dez/reconftw).+- **AWS Deployment**: Deploys via Terraform and Ansible.+- **IP/CIDR Support**: Scans IP ranges and CIDR blocks.+- **Scan Resumption**: Resumes scans from the last completed step.+- **Custom Output**: Saves results to a user-defined directory.+- **Diff Mode**: Highlights new findings in subsequent scans.+- **Scope Filtering**: Supports in-scope and out-of-scope lists ([inscope](https://github.com/tomnomnom/hacks/tree/master/inscope)).+- **Notifications**: Sends alerts via Slack, Discord, or Telegram ([notify](https://github.com/projectdiscovery/notify)).+- **Result Zipping**: Compresses and sends results.+- **Faraday Integration**: Exports results to [Faraday](https://github.com/infobyte/faraday) for reporting .+- **AI Report Generation**: Generates reports using local AI models ([reconftw_ai](https://github.com/six2dez/reconftw_ai)).+- **Quick Rescan Mode**: Skips heavy stages automatically when no new assets are discovered (`--quick-rescan` / `QUICK_RESCAN`).+- **Asset Store**: Appends findings to `assets.jsonl` for downstream automation when `ASSET_STORE` is enabled.+- **ARM Support**: Compatible with Raspberry Pi and ARM architectures (including MacOS MX).++---+## πΏ Installation-+reconFTW supports multiple installation methods to suit different environments. Ensure you have sufficient disk space (at least 10 GB recommended) and a stable internet connection.### Quickstart1) Clone and install-```bash+```yamlgit clone https://github.com/six2dez/reconftwcd reconftw./install.sh --verbose@@ -206,72 +215,75 @@ cd reconftw./reconftw.sh -d example.com -r```-3) Minimal run (fast profile, fewer deps)+3) Minimal run (passive-only footprint)```bash-./reconftw.sh -d example.com --profile fast+./reconftw.sh -d example.com -p```--### Local Installation (PC/VPS/VM)--1. **Prerequisites**:-- - **Golang**: Latest version (`install_golang` enabled by default in `reconftw.cfg`).- - **System Permissions**: If not running as root, configure sudo to avoid prompts:- ```bash- sudo echo "${USERNAME} ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers.d/reconFTW- ```--2. **Steps**:-- ```bash- git clone https://github.com/six2dez/reconftw- cd reconftw- ./install.sh- ./reconftw.sh -d target.com -r- ```--3. **Notes**:- - The `install.sh` script installs dependencies, tools, and configures paths (`GOROOT`, `GOPATH`, `PATH`).- - Set `install_golang=false` in `reconftw.cfg` if Golang is already configured.- - Check the [Installation Guide](https://github.com/six2dez/reconftw/wiki/0.-Installation-Guide) for detailed instructions.-++> Tip: re-run `./install.sh --tools` later to refresh the toolchain without reinstalling system packages.++### Local Installation (PC/VPS/VM)++1. **Prerequisites**:++ - **Golang**: Latest version (`install_golang` enabled by default in `reconftw.cfg`).+ - **System Permissions**: If not running as root, configure sudo to avoid prompts:+ ```bash+ sudo echo "${USERNAME} ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers.d/reconFTW+ ```++2. **Steps**:++ ```bash+ git clone https://github.com/six2dez/reconftw+ cd reconftw+ ./install.sh+ ./reconftw.sh -d target.com -r+ ```++3. **Notes**:+- The `install.sh` script installs dependencies, tools, and configures paths (`GOROOT`, `GOPATH`, `PATH`).+- Set `install_golang=false` in `reconftw.cfg` if Golang is already configured.+- For existing setups, run `./install.sh --tools` to refresh Go binaries, pipx packages, and repositories without touching system packages.+- Check the [Installation Guide](https://github.com/six2dez/reconftw/wiki/0.-Installation-Guide) for detailed instructions.+### Docker--1. **Pull the Image**:-- ```bash- docker pull six2dez/reconftw:main- ```--2. **Run the Container**:-- ```bash- docker run -it --rm \- -v "${PWD}/OutputFolder/:/reconftw/Recon/" \- six2dez/reconftw:main -d example.com -r- ```--3. **View Results**:-- - Results are saved in the `OutputFolder` directory on the host (not inside the container).--4. **Customization**:- - Modify the Docker image or build your own; see the [Docker Guide](https://github.com/six2dez/reconftw/wiki/4.-Docker).--### Terraform + Ansible--- Deploy reconFTW on AWS using Terraform and Ansible.-- Follow the guide in [Terraform/README.md](Terraform/README.md) for setup instructions.------++1. **Pull the Image**:++ ```bash+ docker pull six2dez/reconftw:main+ ```++2. **Run the Container**:++ ```bash+ docker run -it --rm \+ -v "${PWD}/OutputFolder/:/reconftw/Recon/" \+ six2dez/reconftw:main -d example.com -r+ ```++3. **View Results**:++ - Results are saved in the `OutputFolder` directory on the host (not inside the container).++4. **Customization**:+ - Modify the Docker image or build your own; see the [Docker Guide](https://github.com/six2dez/reconftw/wiki/4.-Docker).++### Terraform + Ansible++- Deploy reconFTW on AWS using Terraform and Ansible.+- Follow the guide in [Terraform/README.md](Terraform/README.md) for setup instructions.++---+## π οΈ Troubleshooting--- Bash 4+ on macOS: The scripts auto-relaunch under Homebrew Bash. If you see a message about Bash < 4, run `brew install bash`, open a new terminal, and re-run `./install.sh`.-- timeout on macOS: macOS provides `gtimeout` via `brew install coreutils`. The scripts now detect and use it automatically.-- Network hiccups: Installers hide most command output. If something fails, re-run with `upgrade_tools=true` in `reconftw.cfg` or install the missing tool manually (the error will name it).-- GOPATH binaries: Binaries are copied to `/usr/local/bin`. If you prefer not to, ensure `~/go/bin` is in your `PATH`.++- Bash 4+ on macOS: The scripts auto-relaunch under Homebrew Bash. If you see a message about Bash < 4, run `brew install bash`, open a new terminal, and re-run `./install.sh`.+- timeout on macOS: macOS provides `gtimeout` via `brew install coreutils`. The scripts now detect and use it automatically.+- Network hiccups: Installers hide most command output. If something fails, re-run with `upgrade_tools=true` in `reconftw.cfg`, execute `./install.sh --tools`, or install the missing tool manually (the error will name it).+- GOPATH binaries: Binaries are copied to `/usr/local/bin`. If you prefer not to, ensure `~/go/bin` is in your `PATH`.- Nuclei templates: If templates werenβt cloned, remove `~/nuclei-templates` and re-run `./install.sh`.## π API Checklist (Optional)@@ -290,527 +302,586 @@ cd reconftw- Network: stable connection during installation and updates- OS: Linux/macOS with Bash β₯ 4- Extras: `shellcheck` and `shfmt` (optional) for `make lint`/`make fmt`--## βοΈ Configuration--The `reconftw.cfg` file controls the entire execution of reconFTW. It allows fine-grained customization of:--- **Tool Paths**: Set paths for tools, resolvers, and wordlists (`tools`, `resolvers`, `fuzz_wordlist`).-- **API Keys**: Configure keys for Shodan, WHOISXML, etc. (uncomment and set in `reconftw.cfg`).-- **Scanning Modes**: Enable/disable modules (e.g., `OSINT`, `SUBDOMAINS_GENERAL`, `VULNS_GENERAL`).-- **Performance**: Adjust threads, rate limits, and timeouts (e.g., `FFUF_THREADS`, `HTTPX_RATELIMIT`).-- **Notifications**: Set up Slack, Discord, or Telegram notifications (`NOTIFY_CONFIG`).-- **Axiom**: Configure distributed scanning (`AXIOM_FLEET_NAME`, `AXIOM_FLEET_COUNT`).-- **AI Reporting**: Select AI model and report format (`AI_MODEL`, `AI_REPORT_TYPE`).--**Example Configuration**:--```yaml-#############################################-# reconFTW config file #-#############################################--# General values-tools=$HOME/Tools # Path installed tools-SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" # Get current script's path-profile_shell=".$(basename $(echo $SHELL))rc" # Get current shell profile-reconftw_version=$(git rev-parse --abbrev-ref HEAD)-$(git describe --tags) # Fetch current reconftw version-generate_resolvers=false # Generate custom resolvers with dnsvalidator-update_resolvers=true # Fetch and rewrite resolvers from trickest/resolvers before DNS resolution-resolvers_url="https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt"-resolvers_trusted_url="https://gist.githubusercontent.com/six2dez/ae9ed7e5c786461868abd3f2344401b6/raw/trusted_resolvers.txt"-fuzzing_remote_list="https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt" # Used to send to axiom(if used) on fuzzing-proxy_url="http://127.0.0.1:8080/" # Proxy url-install_golang=true # Set it to false if you already have Golang configured and ready-upgrade_tools=true-upgrade_before_running=false # Upgrade tools before running-#dir_output=/custom/output/path--# Golang Vars (Comment or change on your own)-export GOROOT=/usr/local/go-export GOPATH=$HOME/go-export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH--# Rust Vars (Comment or change on your own)-export PATH="$HOME/.cargo/bin:$PATH"--# Tools config files-#NOTIFY_CONFIG=~/.config/notify/provider-config.yaml # No need to define-GITHUB_TOKENS=${tools}/.github_tokens-GITLAB_TOKENS=${tools}/.gitlab_tokens-#CUSTOM_CONFIG=custom_config_path.txt # In case you use a custom config file, uncomment this line and set your files path--# APIs/TOKENS - Uncomment the lines you want removing the '#' at the beginning of the line-#SHODAN_API_KEY="XXXXXXXXXXXXX"-#WHOISXML_API="XXXXXXXXXX"-#XSS_SERVER="XXXXXXXXXXXXXXXXX"-#COLLAB_SERVER="XXXXXXXXXXXXXXXXX"-#slack_channel="XXXXXXXX"-#slack_auth="xoXX-XXX-XXX-XXX"--# File descriptors-DEBUG_STD="&>/dev/null" # Skips STD output on installer-DEBUG_ERROR="2>/dev/null" # Skips ERR output on installer--# Osint-OSINT=true # Enable or disable the whole OSINT module-GOOGLE_DORKS=true-GITHUB_DORKS=true-GITHUB_REPOS=true-METADATA=true # Fetch metadata from indexed office documents-EMAILS=true # Fetch emails from differents sites-DOMAIN_INFO=true # whois info-IP_INFO=true # Reverse IP search, geolocation and whois-API_LEAKS=true # Check for API leaks-THIRD_PARTIES=true # Check for 3rd parties misconfigs-SPOOF=true # Check spoofable domains-METAFINDER_LIMIT=20 # Max 250--# Subdomains-SUBDOMAINS_GENERAL=true # Enable or disable the whole Subdomains module-SUBPASSIVE=true # Passive subdomains search-SUBCRT=true # crtsh search-CTR_LIMIT=999999 # Limit the number of results-SUBNOERROR=false # Check DNS NOERROR response and BF on them-SUBANALYTICS=true # Google Analytics search-SUBBRUTE=true # DNS bruteforcing-SUBSCRAPING=true # Subdomains extraction from web crawling-SUBPERMUTE=true # DNS permutations-SUBIAPERMUTE=true # Permutations by IA analysis-SUBREGEXPERMUTE=true # Permutations by regex analysis-PERMUTATIONS_OPTION=gotator # The alternative is "ripgen" (faster, not deeper)-GOTATOR_FLAGS=" -depth 1 -numbers 3 -mindup -adv -md" # Flags for gotator-SUBTAKEOVER=true # Check subdomain takeovers, false by default cuz nuclei already check this-SUB_RECURSIVE_PASSIVE=false # Uses a lot of API keys queries-DEEP_RECURSIVE_PASSIVE=10 # Number of top subdomains for recursion-SUB_RECURSIVE_BRUTE=false # Needs big disk space and time to resolve-ZONETRANSFER=true # Check zone transfer-S3BUCKETS=true # Check S3 buckets misconfigs-REVERSE_IP=false # Check reverse IP subdomain search (set True if your target is CIDR/IP)-TLS_PORTS="21,22,25,80,110,135,143,261,271,324,443,448,465,563,614,631,636,664,684,695,832,853,854,990,993,989,992,994,995,1129,1131,1184,2083,2087,2089,2096,2221,2252,2376,2381,2478,2479,2482,2484,2679,2762,3077,3078,3183,3191,3220,3269,3306,3410,3424,3471,3496,3509,3529,3539,3535,3660,36611,3713,3747,3766,3864,3885,3995,3896,4031,4036,4062,4064,4081,4083,4116,4335,4336,4536,4590,4740,4843,4849,5443,5007,5061,5321,5349,5671,5783,5868,5986,5989,5990,6209,6251,6443,6513,6514,6619,6697,6771,7202,7443,7673,7674,7677,7775,8243,8443,8991,8989,9089,9295,9318,9443,9444,9614,9802,10161,10162,11751,12013,12109,14143,15002,16995,41230,16993,20003"-INSCOPE=false # Uses inscope tool to filter the scope, requires .scope file in reconftw folder--# Web detection-WEBPROBESIMPLE=true # Web probing on 80/443-WEBPROBEFULL=true # Web probing in a large port list-WEBSCREENSHOT=true # Webs screenshooting-VIRTUALHOSTS=false # Check virtualhosts by fuzzing HOST header-UNCOMMON_PORTS_WEB="81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3001,3002,3003,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9092,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55440,55672"--# Host-FAVICON=true # Check Favicon domain discovery-PORTSCANNER=true # Enable or disable the whole Port scanner module-GEO_INFO=true # Fetch Geolocalization info-PORTSCAN_PASSIVE=true # Port scanner with Shodan-PORTSCAN_ACTIVE=true # Port scanner with nmap-PORTSCAN_ACTIVE_OPTIONS="--top-ports 200 -sV -n -Pn --open --max-retries 2 --script vulners"-CDN_IP=true # Check which IPs belongs to CDN--# Web analysis-WAF_DETECTION=true # Detect WAFs-NUCLEICHECK=true # Enable or disable nuclei-NUCLEI_TEMPLATES_PATH="$HOME/nuclei-templates" # Set nuclei templates path-NUCLEI_SEVERITY="info,low,medium,high,critical" # Set templates criticity-NUCLEI_EXTRA_ARGS="" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"-#NUCLEI_EXTRA_ARGS="-etags openssh,ssl -eid node-express-dev-env,keycloak-xss,CVE-2023-24044,CVE-2021-20323,header-sql,header-reflection" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"-NUCLEI_FLAGS="-silent -retries 2" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"-NUCLEI_FLAGS_JS="-silent -tags exposure,token -severity info,low,medium,high,critical" # Additional nuclei extra flags for js secrets-URL_CHECK=true # Enable or disable URL collection-URL_CHECK_PASSIVE=true # Search for urls, passive methods from Archive, OTX, CommonCrawl, etc-URL_CHECK_ACTIVE=true # Search for urls by crawling the websites-URL_GF=true # Url patterns classification-URL_EXT=true # Returns a list of files divided by extension-JSCHECKS=true # JS analysis-FUZZ=true # Web fuzzing-IIS_SHORTNAME=true-CMS_SCANNER=true # CMS scanner-WORDLIST=true # Wordlist generation-ROBOTSWORDLIST=true # Check historic disallow entries on waybackMachine-PASSWORD_DICT=true # Generate password dictionary-PASSWORD_MIN_LENGTH=5 # Min password length-PASSWORD_MAX_LENGTH=14 # Max password length-CLOUDHUNTER_PERMUTATION=NORMAL # Options: DEEP (very slow), NORMAL (slow), NONE-NUCLEI_FUZZING_TEMPLATES_PATH="${tools}/fuzzing-templates" # Set nuclei templates path--# Vulns-VULNS_GENERAL=false # Enable or disable the vulnerability module (very intrusive and slow)-XSS=true # Check for xss with dalfox-CORS=true # CORS misconfigs-TEST_SSL=true # SSL misconfigs-OPEN_REDIRECT=true # Check open redirects-SSRF_CHECKS=true # SSRF checks-CRLF_CHECKS=true # CRLF checks-LFI=true # LFI by fuzzing-SSTI=true # SSTI by fuzzing-SQLI=true # Check SQLI-SQLMAP=true # Check SQLI with sqlmap-GHAURI=false # Check SQLI with ghauri-BROKENLINKS=true # Check for brokenlinks-SPRAY=true # Performs password spraying-COMM_INJ=true # Check for command injections with commix-PROTO_POLLUTION=true # Check for prototype pollution flaws-SMUGGLING=true # Check for HTTP request smuggling flaws-WEBCACHE=true # Check for Web Cache issues-BYPASSER4XX=true # Check for 4XX bypasses-FUZZPARAMS=true # Fuzz parameters values--# Extra features-NOTIFICATION=false # Notification for every function-SOFT_NOTIFICATION=false # Only for start/end-DEEP=false # DEEP mode, really slow and don't care about the number of results-DEEP_LIMIT=500 # First limit to not run unless you run DEEP-DEEP_LIMIT2=1500 # Second limit to not run unless you run DEEP-DIFF=false # Diff function, run every module over an already scanned target, printing only new findings (but save everything)-REMOVETMP=false # Delete temporary files after execution (to free up space)-REMOVELOG=false # Delete logs after execution-PROXY=false # Send to proxy the websites found-SENDZIPNOTIFY=false # Send to zip the results (over notify)-PRESERVE=true # set to true to avoid deleting the .called_fn files on really large scans-FFUF_FLAGS=" -mc all -fc 404 -sf -noninteractive -of json" # Ffuf flags-HTTPX_FLAGS=" -follow-redirects -random-agent -status-code -silent -title -web-server -tech-detect -location -content-length" # Httpx flags for simple web probing--# HTTP options-HEADER="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" # Default header--# Threads-FFUF_THREADS=40-HTTPX_THREADS=50-HTTPX_UNCOMMONPORTS_THREADS=100-KATANA_THREADS=20-BRUTESPRAY_THREADS=20-BRUTESPRAY_CONCURRENCE=10-DNSTAKE_THREADS=100-DALFOX_THREADS=200-PUREDNS_PUBLIC_LIMIT=0 # Set between 2000 - 10000 if your router blows up, 0 means unlimited-PUREDNS_TRUSTED_LIMIT=400-PUREDNS_WILDCARDTEST_LIMIT=30-PUREDNS_WILDCARDBATCH_LIMIT=1500000-RESOLVE_DOMAINS_THREADS=150-DNSVALIDATOR_THREADS=200-INTERLACE_THREADS=10-TLSX_THREADS=1000-XNLINKFINDER_DEPTH=3--# Rate limits-HTTPX_RATELIMIT=150-NUCLEI_RATELIMIT=150-FFUF_RATELIMIT=0--# Timeouts-SUBFINDER_ENUM_TIMEOUT=180 # Minutes-CMSSCAN_TIMEOUT=3600 # Seconds-FFUF_MAXTIME=900 # Seconds-HTTPX_TIMEOUT=10 # Seconds-HTTPX_UNCOMMONPORTS_TIMEOUT=10 # Seconds-PERMUTATIONS_LIMIT=21474836480 # Bytes, default is 20 GB--# lists-fuzz_wordlist=${tools}/fuzz_wordlist.txt-lfi_wordlist=${tools}/lfi_wordlist.txt-ssti_wordlist=${tools}/ssti_wordlist.txt-subs_wordlist=${tools}/subdomains.txt-subs_wordlist_big=${tools}/subdomains_n0kovo_big.txt-resolvers=${tools}/resolvers.txt-resolvers_trusted=${tools}/resolvers_trusted.txt--# Axiom Fleet-# Will not start a new fleet if one exist w/ same name and size (or larger)-# AXIOM=false Uncomment only to overwrite command line flags-AXIOM_FLEET_LAUNCH=true # Enable or disable spin up a new fleet, if false it will use the current fleet with the AXIOM_FLEET_NAME prefix-AXIOM_FLEET_NAME="reconFTW" # Fleet's prefix name-AXIOM_FLEET_COUNT=10 # Fleet's number-AXIOM_FLEET_REGIONS="eu-central" # Fleet's region-AXIOM_FLEET_SHUTDOWN=true # # Enable or disable delete the fleet after the execution-# This is a script on your reconftw host that might prep things your way...-#AXIOM_POST_START="~/Tools/axiom_config.sh" # Useful to send your config files to the fleet-AXIOM_EXTRA_ARGS="" # Leave empty if you don't want to add extra arguments-#AXIOM_EXTRA_ARGS=" --rm-logs" # Example--# Faraday-Server-FARADAY=false # Enable or disable Faraday integration-FARADAY_SERVER="http://localhost:5985" # Faraday server address-FARADAY_USER="faraday" # Faraday user-FARADAY_PASS="FARADAY_PASSWORD" # Faraday password-FARADAY_WORKSPACE="reconftw" # Faraday workspace--# AI-AI_MODEL="llama3:8b" # Model to use-AI_REPORT_TYPE="md" # Report type to use (md, txt)-AI_REPORT_PROFILE="bughunter" # Report profile to use (executive, brief, or bughunter)--# TERM COLORS-bred='\033[1;31m'-bblue='\033[1;34m'-bgreen='\033[1;32m'-byellow='\033[1;33m'-red='\033[0;31m'-blue='\033[0;34m'-green='\033[0;32m'-yellow='\033[0;33m'-reset='\033[0m'-```--**Full Details**: See the [Configuration Guide](https://github.com/six2dez/reconftw/wiki/3.-Configuration-file).-------## π Usage--reconFTW supports multiple modes and options for flexible reconnaissance. Use the `-h` flag to view the help menu.--### Target Options--| Flag | Description |-| ---- | ------------------------------------------------------------ |-| `-d` | Single target domain (e.g., `example.com`) |-| `-l` | File with list of target domains (one per line) |-| `-m` | Multi-domain target (e.g., company name for related domains) |-| `-x` | Exclude subdomains (out-of-scope list) |-| `-i` | Include subdomains (in-scope list) |--### Mode Options--| Flag | Description |-| ---- | --------------------------------------------------------------------- |-| `-r` | **Recon**: Full reconnaissance without active attacks |-| `-s` | **Subdomains**: Subdomain enumeration, web probing, and takeovers |-| `-p` | **Passive**: Passive reconnaissance only |-| `-a` | **All**: Full reconnaissance plus active vulnerability checks |-| `-w` | **Web**: Vulnerability checks on specific web targets |-| `-n` | **OSINT**: OSINT scan without subdomain enumeration or attacks |-| `-z` | **Zen**: Lightweight recon with basic checks and some vulnerabilities |-| `-c` | **Custom**: Run a specific function (requires additional arguments) |-| `-h` | Show help menu |--### General Options--| Flag | Description |-| --------------- | ---------------------------------------------- |-| `--deep` | Enable deep scanning (slower, VPS recommended) |-| `-f` | Custom configuration file path |-| `-o` | Output directory for results |-| `-v` | Enable Axiom distributed scanning |-| `-q` | Set rate limit (requests per second) |-| `-y` | Enables AI results analysis |-| `--check-tools` | Exit if required tools are missing |--### Example Usage--1. **Full Recon on a Single Target**:-- ```bash- ./reconftw.sh -d target.com -r- ```--2. **Recon on Multiple Targets**:-- ```bash- ./reconftw.sh -l targets.txt -r -o /path/to/output/- ```--3. **Deep Recon (VPS Recommended)**:-- ```bash- ./reconftw.sh -d target.com -r --deep- ```--4. **Multi-Domain Recon**:-- ```bash- ./reconftw.sh -m company -l domains.txt -r- ```--5. **Axiom Integration**:-- ```bash- ./reconftw.sh -d target.com -r -v- ```--6. **Full Recon with Attacks (YOLO Mode)**:-- ```bash- ./reconftw.sh -d target.com -a- ```--7. **Show Help**:- ```bash- ./reconftw.sh -h- ```--**Full Guide**: See the [Usage Guide](https://github.com/six2dez/reconftw/wiki/2.-Usage-Guide).-------## βοΈ Ax Framework Support (previously Axiom)--reconFTW integrates with [Ax](https://github.com/attacksurge/ax) for distributed scanning, reducing execution time by distributing tasks across multiple cloud instances.--- **Setup**: Select `reconftw` as the provisioner during Axiom configuration.-- **Fleet Management**: Automatically create and destroy fleets (`AXIOM_FLEET_LAUNCH`, `AXIOM_FLEET_SHUTDOWN`) or use an existing fleet.-- **Configuration**: Set fleet size, region, and name in `reconftw.cfg` (`AXIOM_FLEET_COUNT`, `AXIOM_FLEET_REGIONS`, `AXIOM_FLEET_NAME`).--**Example**:--```bash-./reconftw.sh -d target.com -r -v-```--**Details**: See the [Axiom Guide](https://github.com/six2dez/reconftw/wiki/5.-Axiom-version) and official [Ax Docs](https://ax.attacksurge.com/).-------## π» Faraday Support--reconFTW integrates with [Faraday](https://faradaysec.com/) for web-based reporting and vulnerability management.--- **Setup**: Install Faraday, authenticate via `faraday-cli`, and configure the workspace in `reconftw.cfg` (`FARADAY_SERVER`, `FARADAY_USER`, `FARADAY_PASS`, `FARADAY_WORKSPACE`).-- **Usage**: Enable with `FARADAY=true` in `reconftw.cfg`.-------## π§ AI Integration--reconFTW uses AI to generate detailed reports from scan results with the tool [reconftw_ai](https://github.com/six2dez/reconftw_ai).--- **Model**: Configurable AI model (e.g., `llama3:8b` via `AI_MODEL`).-- **Report Types**: Markdown or plain text (`AI_REPORT_TYPE`).-- **Profiles**: Executive, brief, or bug hunter (`AI_REPORT_PROFILE`).--**Example**:--```yaml-AI_MODEL="llama3:8b"-AI_REPORT_TYPE="md"-AI_REPORT_PROFILE="bughunter"-```-------## ποΈ Data Management--Manage scan data and API keys securely using a private repository.--### Makefile--Use the provided `Makefile` for easy repository management (requires [GitHub CLI](https://cli.github.com/)).--1. **Bootstrap**:-- ```bash- export PRIV_REPO="$HOME/reconftw-data"- make bootstrap- ```--2. **Sync with Upstream**:-- ```bash- make sync- ```--3. **Upload Data**:- ```bash- make upload- ```--### Manual--1. Create a private repository on GitHub/GitLab.-2. Clone and configure:-- ```bash- git clone https://github.com/yourusername/reconftw-data- cd reconftw-data- git commit --allow-empty -m "Initial commit"- git remote add upstream https://github.com/six2dez/reconftw- git fetch upstream- git rebase upstream/main master- ```--3. **Upload Changes**:-- ```bash- git add .- git commit -m "Data upload"- git push origin master- ```--4. **Update Tool**:- ```bash- git fetch upstream- git rebase upstream/main master- ```-------## Mindmap/Workflow---------## Sample video---------## π€ How to Contribute--Contributions are welcome! You can help by:--- **Reporting Issues**: Submit bugs or feature requests via [GitHub Issues](https://github.com/six2dez/reconftw/issues/new/choose).-- **Submitting Pull Requests**: Contribute code improvements to the [dev branch](https://github.com/six2dez/reconftw/tree/dev).--**Guidelines**: Follow the [Code of Conduct](CODE_OF_CONDUCT.md).-------## β Need Help?--- **Wiki**: Explore the [reconFTW Wiki](https://github.com/six2dez/reconftw/wiki).-- **FAQ**: Check the [FAQ](https://github.com/six2dez/reconftw/wiki/7.-FAQs).-- **Community**: Join the [Discord server](https://discord.gg/R5DdXVEdTy) or [Telegram group](https://t.me/joinchat/TO_R8NYFhhbmI5co).-------## π Support This Project--Support reconFTWβs development through:--- **Buy Me a Coffee**: [buymeacoffee.com/six2dez](https://www.buymeacoffee.com/six2dez)--[<img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png">](https://www.buymeacoffee.com/six2dez)--- **DigitalOcean Referral**: [Referral Link](https://www.digitalocean.com/?refcode=f362a6e193a1&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)--<a href="https://www.digitalocean.com/?refcode=f362a6e193a1&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg" alt="DigitalOcean Referral Badge" /></a>--- **GitHub Sponsorship**: [github.com/sponsors/six2dez](https://github.com/sponsors/six2dez)-------## π Thanks--Special thanks to the following services for supporting reconFTW:--- [C99](https://api.c99.nl/)-- [CIRCL](https://www.circl.lu/)-- [NetworksDB](https://networksdb.io/)-- [ipinfo](https://ipinfo.io/)-- [hackertarget](https://hackertarget.com/)-- [Censys](https://censys.io/)-- [Fofa](https://fofa.info/)-- [intelx](https://intelx.io/)-- [Whoxy](https://www.whoxy.com/)-------## π License--reconFTW is licensed under the [MIT License](LICENSE).-------## β Star History--[](https://www.star-history.com/#six2dez/reconftw&Date)++## βοΈ Configuration++The `reconftw.cfg` file controls the entire execution of reconFTW. It allows fine-grained customization of:++- **Tool Paths**: Set paths for tools, resolvers, and wordlists (`tools`, `resolvers`, `fuzz_wordlist`).+- **API Keys**: Configure keys for Shodan, WHOISXML, etc. (uncomment and set in `reconftw.cfg`).+- **Scanning Modes**: Enable/disable modules (e.g., `OSINT`, `SUBDOMAINS_GENERAL`, `VULNS_GENERAL`).+- **Performance**: Adjust threads, rate limits, and timeouts (e.g., `FFUF_THREADS`, `HTTPX_RATELIMIT`).+- **Notifications**: Set up Slack, Discord, or Telegram notifications (`NOTIFY_CONFIG`).+- **Axiom**: Configure distributed scanning (`AXIOM_FLEET_NAME`, `AXIOM_FLEET_COUNT`).+- **AI Reporting**: Select AI model and report format (`AI_MODEL`, `AI_REPORT_TYPE`).+- **Advanced Web Checks**: Toggle GraphQL introspection, parameter discovery, WebSocket testing, gRPC probing, and IPv6 scanning.+- **Automation & Data**: Control quick rescan heuristics, asset logging, chunk sizes, and hotlists (`QUICK_RESCAN`, `ASSET_STORE`, `CHUNK_LIMIT`, `HOTLIST_TOP`).++**Example Configuration**:++```bash+#############################################+# reconFTW config file #+#############################################++# General values+tools=$HOME/Tools # Path installed tools+SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" # Get current script's path+_detected_shell="${SHELL:-/bin/bash}"+profile_shell=".$(basename "${_detected_shell}")rc" # Get current shell profile+if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then+ reconftw_version="$(git rev-parse --abbrev-ref HEAD)-$(git describe --tags 2>/dev/null || git rev-parse --short HEAD)"+else+ reconftw_version="standalone"+fi # Fetch current reconftw version+generate_resolvers=false # Generate custom resolvers with dnsvalidator+update_resolvers=true # Fetch and rewrite resolvers from trickest/resolvers before DNS resolution+resolvers_url="https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt"+resolvers_trusted_url="https://gist.githubusercontent.com/six2dez/ae9ed7e5c786461868abd3f2344401b6/raw/trusted_resolvers.txt"+fuzzing_remote_list="https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt" # Used to send to axiom(if used) on fuzzing+proxy_url="http://127.0.0.1:8080/" # Proxy url+install_golang=true # Set it to false if you already have Golang configured and ready+upgrade_tools=true+upgrade_before_running=false # Upgrade tools before running+#dir_output=/custom/output/path++# Golang Vars (Comment or change on your own)+export GOROOT="${GOROOT:-/usr/local/go}"+export GOPATH="${GOPATH:-$HOME/go}"+case ":${PATH}:" in+ *":$GOPATH/bin:"*) ;;+ *) PATH="$GOPATH/bin:$PATH" ;;+esac+case ":${PATH}:" in+ *":$GOROOT/bin:"*) ;;+ *) PATH="$GOROOT/bin:$PATH" ;;+esac+case ":${PATH}:" in+ *":$HOME/.local/bin:"*) ;;+ *) PATH="$HOME/.local/bin:$PATH" ;;+esac+export PATH++# Rust Vars (Comment or change on your own)+export PATH="$HOME/.cargo/bin:$PATH"++# Tools config files+#NOTIFY_CONFIG=~/.config/notify/provider-config.yaml # No need to define+GITHUB_TOKENS=${tools}/.github_tokens+GITLAB_TOKENS=${tools}/.gitlab_tokens+#CUSTOM_CONFIG=custom_config_path.txt # In case you use a custom config file, uncomment this line and set your files path++# APIs/TOKENS - Uncomment the lines you want removing the '#' at the beginning of the line+#SHODAN_API_KEY="XXXXXXXXXXXXX"+#WHOISXML_API="XXXXXXXXXX"+#XSS_SERVER="XXXXXXXXXXXXXXXXX"+#COLLAB_SERVER="XXXXXXXXXXXXXXXXX"+#slack_channel="XXXXXXXX"+#slack_auth="xoXX-XXX-XXX-XXX"++# File descriptors+DEBUG_STD="&>/dev/null" # Skips STD output on installer+DEBUG_ERROR="2>/dev/null" # Skips ERR output on installer++# Osint+OSINT=true # Enable or disable the whole OSINT module+GOOGLE_DORKS=true+GITHUB_DORKS=true+GITHUB_REPOS=true+METADATA=true # Fetch metadata from indexed office documents+EMAILS=true # Fetch emails from differents sites+DOMAIN_INFO=true # whois info+IP_INFO=true # Reverse IP search, geolocation and whois+API_LEAKS=true # Check for API leaks+THIRD_PARTIES=true # Check for 3rd parties misconfigs+SPOOF=true # Check spoofable domains+METAFINDER_LIMIT=20 # Max 250+MAIL_HYGIENE=true # Check DMARC/SPF records+CLOUD_ENUM=true # Enumerate cloud storage across providers with cloud_enum++# Subdomains+SUBDOMAINS_GENERAL=true # Enable or disable the whole Subdomains module+SUBPASSIVE=true # Passive subdomains search+SUBCRT=true # crtsh search+CTR_LIMIT=999999 # Limit the number of results+SUBNOERROR=false # Check DNS NOERROR response and BF on them+SUBANALYTICS=true # Google Analytics search+SUBBRUTE=true # DNS bruteforcing+SUBSCRAPING=true # Subdomains extraction from web crawling+SUBPERMUTE=true # DNS permutations+SUBIAPERMUTE=true # Permutations by IA analysis+SUBREGEXPERMUTE=true # Permutations by regex analysis+PERMUTATIONS_OPTION=gotator # The alternative is "ripgen" (faster, not deeper)+GOTATOR_FLAGS=" -depth 1 -numbers 3 -mindup -adv -md" # Flags for gotator+SUBTAKEOVER=true # Check subdomain takeovers, false by default cuz nuclei already check this+SUB_RECURSIVE_PASSIVE=false # Uses a lot of API keys queries+DEEP_RECURSIVE_PASSIVE=10 # Number of top subdomains for recursion+SUB_RECURSIVE_BRUTE=false # Needs big disk space and time to resolve+ZONETRANSFER=true # Check zone transfer+S3BUCKETS=true # Check S3 buckets misconfigs+REVERSE_IP=false # Check reverse IP subdomain search (set True if your target is CIDR/IP)+TLS_PORTS="21,22,25,80,110,135,143,261,271,324,443,448,465,563,614,631,636,664,684,695,832,853,854,990,993,989,992,994,995,1129,1131,1184,2083,2087,2089,2096,2221,2252,2376,2381,2478,2479,2482,2484,2679,2762,3077,3078,3183,3191,3220,3269,3306,3410,3424,3471,3496,3509,3529,3539,3535,3660,36611,3713,3747,3766,3864,3885,3995,3896,4031,4036,4062,4064,4081,4083,4116,4335,4336,4536,4590,4740,4843,4849,5443,5007,5061,5321,5349,5671,5783,5868,5986,5989,5990,6209,6251,6443,6513,6514,6619,6697,6771,7202,7443,7673,7674,7677,7775,8243,8443,8991,8989,9089,9295,9318,9443,9444,9614,9802,10161,10162,11751,12013,12109,14143,15002,16995,41230,16993,20003"+INSCOPE=false # Uses inscope tool to filter the scope, requires .scope file in reconftw folder++# Web detection+WEBPROBESIMPLE=true # Web probing on 80/443+WEBPROBEFULL=true # Web probing in a large port list+WEBSCREENSHOT=true # Webs screenshooting+VIRTUALHOSTS=false # Check virtualhosts by fuzzing HOST header+UNCOMMON_PORTS_WEB="81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3001,3002,3003,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9092,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55440,55672"++# Host+FAVICON=true # Check Favicon domain discovery+PORTSCANNER=true # Enable or disable the whole Port scanner module+GEO_INFO=true # Fetch Geolocalization info+PORTSCAN_PASSIVE=true # Port scanner with Shodan+PORTSCAN_ACTIVE=true # Port scanner with nmap+PORTSCAN_ACTIVE_OPTIONS="--top-ports 200 -sV -n -Pn --open --max-retries 2 --script vulners"+CDN_IP=true # Check which IPs belongs to CDN++# Web analysis+WAF_DETECTION=true # Detect WAFs+NUCLEICHECK=true # Enable or disable nuclei+NUCLEI_TEMPLATES_PATH="$HOME/nuclei-templates" # Set nuclei templates path+NUCLEI_SEVERITY="info,low,medium,high,critical" # Set templates criticity+NUCLEI_EXTRA_ARGS="" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"+#NUCLEI_EXTRA_ARGS="-etags openssh,ssl -eid node-express-dev-env,keycloak-xss,CVE-2023-24044,CVE-2021-20323,header-sql,header-reflection" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"+NUCLEI_FLAGS="-silent -retries 2" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"+NUCLEI_FLAGS_JS="-silent -tags exposure,token -severity info,low,medium,high,critical" # Additional nuclei extra flags for js secrets+URL_CHECK=true # Enable or disable URL collection+URL_CHECK_PASSIVE=true # Search for urls, passive methods from Archive, OTX, CommonCrawl, etc+URL_CHECK_ACTIVE=true # Search for urls by crawling the websites+URL_GF=true # Url patterns classification+URL_EXT=true # Returns a list of files divided by extension+JSCHECKS=true # JS analysis+FUZZ=true # Web fuzzing+IIS_SHORTNAME=true+CMS_SCANNER=true # CMS scanner+WORDLIST=true # Wordlist generation+ROBOTSWORDLIST=true # Check historic disallow entries on waybackMachine+PASSWORD_DICT=true # Generate password dictionary+PASSWORD_MIN_LENGTH=5 # Min password length+PASSWORD_MAX_LENGTH=14 # Max password length+CLOUDHUNTER_PERMUTATION=NORMAL # Options: DEEP (very slow), NORMAL (slow), NONE+NUCLEI_FUZZING_TEMPLATES_PATH="${tools}/fuzzing-templates" # Set nuclei templates path++# Vulns+VULNS_GENERAL=false # Enable or disable the vulnerability module (very intrusive and slow)+XSS=true # Check for xss with dalfox+CORS=true # CORS misconfigs+TEST_SSL=true # SSL misconfigs+OPEN_REDIRECT=true # Check open redirects+SSRF_CHECKS=true # SSRF checks+CRLF_CHECKS=true # CRLF checks+LFI=true # LFI by fuzzing+SSTI=true # SSTI by fuzzing+SQLI=true # Check SQLI+SQLMAP=true # Check SQLI with sqlmap+GHAURI=false # Check SQLI with ghauri+BROKENLINKS=true # Check for brokenlinks+SPRAY=true # Performs password spraying+COMM_INJ=true # Check for command injections with commix+PROTO_POLLUTION=true # Check for prototype pollution flaws+SMUGGLING=true # Check for HTTP request smuggling flaws+WEBCACHE=true # Check for Web Cache issues+BYPASSER4XX=true # Check for 4XX bypasses+FUZZPARAMS=true # Fuzz parameters values++# Extra features+NOTIFICATION=false # Notification for every function+SOFT_NOTIFICATION=false # Only for start/end+DEEP=false # DEEP mode, really slow and don't care about the number of results+DEEP_LIMIT=500 # First limit to not run unless you run DEEP+DEEP_LIMIT2=1500 # Second limit to not run unless you run DEEP+DIFF=false # Diff function, run every module over an already scanned target, printing only new findings (but save everything)+REMOVETMP=false # Delete temporary files after execution (to free up space)+REMOVELOG=false # Delete logs after execution+PROXY=false # Send to proxy the websites found+SENDZIPNOTIFY=false # Send to zip the results (over notify)+PRESERVE=true # set to true to avoid deleting the .called_fn files on really large scans+FFUF_FLAGS=" -mc all -fc 404 -sf -noninteractive -of json" # Ffuf flags+HTTPX_FLAGS=" -follow-redirects -random-agent -status-code -silent -title -web-server -tech-detect -location -content-length" # Httpx flags for simple web probing++# HTTP options+HEADER="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" # Default header++# Threads+FFUF_THREADS=40+HTTPX_THREADS=50+HTTPX_UNCOMMONPORTS_THREADS=100+KATANA_THREADS=20+BRUTESPRAY_THREADS=20+BRUTESPRAY_CONCURRENCE=10+DNSTAKE_THREADS=100+DALFOX_THREADS=200+PUREDNS_PUBLIC_LIMIT=0 # Set between 2000 - 10000 if your router blows up, 0 means unlimited+PUREDNS_TRUSTED_LIMIT=400+PUREDNS_WILDCARDTEST_LIMIT=30+PUREDNS_WILDCARDBATCH_LIMIT=1500000+RESOLVE_DOMAINS_THREADS=150+DNSVALIDATOR_THREADS=200+INTERLACE_THREADS=10+TLSX_THREADS=1000+XNLINKFINDER_DEPTH=3++# Rate limits+HTTPX_RATELIMIT=150+NUCLEI_RATELIMIT=150+FFUF_RATELIMIT=0++# Timeouts+SUBFINDER_ENUM_TIMEOUT=180 # Minutes+CMSSCAN_TIMEOUT=3600 # Seconds+FFUF_MAXTIME=900 # Seconds+HTTPX_TIMEOUT=10 # Seconds+HTTPX_UNCOMMONPORTS_TIMEOUT=10 # Seconds+PERMUTATIONS_LIMIT=21474836480 # Bytes, default is 20 GB++# lists+fuzz_wordlist=${tools}/fuzz_wordlist.txt+lfi_wordlist=${tools}/lfi_wordlist.txt+ssti_wordlist=${tools}/ssti_wordlist.txt+subs_wordlist=${tools}/subdomains.txt+subs_wordlist_big=${tools}/subdomains_n0kovo_big.txt+resolvers=${tools}/resolvers.txt+resolvers_trusted=${tools}/resolvers_trusted.txt++# Axiom Fleet+# Will not start a new fleet if one exist w/ same name and size (or larger)+# AXIOM=false Uncomment only to overwrite command line flags+AXIOM_FLEET_LAUNCH=true # Enable or disable spin up a new fleet, if false it will use the current fleet with the AXIOM_FLEET_NAME prefix+AXIOM_FLEET_NAME="reconFTW" # Fleet's prefix name+AXIOM_FLEET_COUNT=10 # Fleet's number+AXIOM_FLEET_REGIONS="eu-central" # Fleet's region+AXIOM_FLEET_SHUTDOWN=true # # Enable or disable delete the fleet after the execution+# This is a script on your reconftw host that might prep things your way...+#AXIOM_POST_START="~/Tools/axiom_config.sh" # Useful to send your config files to the fleet+AXIOM_EXTRA_ARGS="" # Leave empty if you don't want to add extra arguments+#AXIOM_EXTRA_ARGS=" --rm-logs" # Example++# Faraday-Server+FARADAY=false # Enable or disable Faraday integration+FARADAY_SERVER="http://localhost:5985" # Faraday server address+FARADAY_USER="faraday" # Faraday user+FARADAY_PASS="FARADAY_PASSWORD" # Faraday password+FARADAY_WORKSPACE="reconftw" # Faraday workspace++# AI+AI_MODEL="llama3:8b" # Model to use+AI_REPORT_TYPE="md" # Report type to use (md, txt)+AI_REPORT_PROFILE="bughunter" # Report profile to use (executive, brief, or bughunter)++# API & Advanced Web Checks+GRAPHQL_CHECK=true # Detect GraphQL endpoints and introspection+GQLSPECTION=false # Run GQLSpection deep introspection on detected GraphQL endpoints (heavier)+PARAM_DISCOVERY=true # Parameter discovery with arjun+GRPC_SCAN=false # Attempt basic gRPC reflection on common ports++# IPv6+IPV6_SCAN=true # Attempt IPv6 discovery/portscan where addresses exist++# Wordlists / threads for new modules+ARJUN_THREADS=10++# Data & Automation+ASSET_STORE=true # Append assets/findings to assets.jsonl+QUICK_RESCAN=false # Skip heavy steps if no new subdomains/webs+CHUNK_LIMIT=2000 # Split very large lists into chunks (urls, webs)+HOTLIST_TOP=50 # Number of top risky assets to highlight++# Performance+RESOLVER_IQ=false # Prefer fast/healthy resolvers (experimental)++# Intrusive controls (keep false by default)+INTRUSIVE=false # Enable intrusive cloud write/CORS tests (dangerous)++# Estimated durations for skipped heavy modules (seconds)+TIME_EST_NUCLEI=600+TIME_EST_FUZZ=900+TIME_EST_URLCHECKS=300+TIME_EST_JSCHECKS=300+TIME_EST_API=300+TIME_EST_GQL=180+TIME_EST_PARAM=240+TIME_EST_GRPC=120+TIME_EST_IIS=60++# TERM COLORS+bred='\033[1;31m'+bblue='\033[1;34m'+bgreen='\033[1;32m'+byellow='\033[1;33m'+red='\033[0;31m'+blue='\033[0;34m'+green='\033[0;32m'+yellow='\033[0;33m'+reset='\033[0m'+```++**Full Details**: See the [Configuration Guide](https://github.com/six2dez/reconftw/wiki/3.-Configuration-file).++---++## π Usage++reconFTW supports multiple modes and options for flexible reconnaissance. Use the `-h` flag to view the help menu.++### Target Options++| Flag | Description |+| ---- | ------------------------------------------------------------ |+| `-d` | Single target domain (e.g., `example.com`) |+| `-l` | File with list of target domains (one per line) |+| `-m` | Multi-domain target (e.g., company name for related domains) |+| `-x` | Exclude subdomains (out-of-scope list) |+| `-i` | Include subdomains (in-scope list) |++### Mode Options++| Flag | Description |+| ---- | --------------------------------------------------------------------- |+| `-r` | **Recon**: Full reconnaissance without active attacks |+| `-s` | **Subdomains**: Subdomain enumeration, web probing, and takeovers |+| `-p` | **Passive**: Passive reconnaissance only |+| `-a` | **All**: Full reconnaissance plus active vulnerability checks |+| `-w` | **Web**: Vulnerability checks on specific web targets |+| `-n` | **OSINT**: OSINT scan without subdomain enumeration or attacks |+| `-z` | **Zen**: Lightweight recon with basic checks and some vulnerabilities |+| `-c` | **Custom**: Run a specific function (requires additional arguments) |+| `-h` | Show help menu |++### General Options++| Flag | Description |+| --------------- | ---------------------------------------------- |+| `--deep` | Enable deep scanning (slower, VPS recommended) |+| `-f` | Custom configuration file path |+| `-o` | Output directory for results |+| `-v` | Enable Axiom distributed scanning |+| `-q` | Set rate limit (requests per second) |+| `-y` | Enables AI results analysis |+| `--check-tools` | Exit if required tools are missing |+| `--quick-rescan` | Skip heavy modules when no new subs/webs are found |++### Example Usage++1. **Full Recon on a Single Target**:++ ```bash+ ./reconftw.sh -d target.com -r+ ```++2. **Recon on Multiple Targets**:++ ```bash+ ./reconftw.sh -l targets.txt -r -o /path/to/output/+ ```++3. **Deep Recon (VPS Recommended)**:++ ```bash+ ./reconftw.sh -d target.com -r --deep+ ```++4. **Multi-Domain Recon**:++ ```bash+ ./reconftw.sh -m company -l domains.txt -r+ ```++5. **Axiom Integration**:++ ```bash+ ./reconftw.sh -d target.com -r -v+ ```++6. **Full Recon with Attacks (YOLO Mode)**:++ ```bash+ ./reconftw.sh -d target.com -a+ ```++7. **Show Help**:+ ```bash+ ./reconftw.sh -h+ ```++**Full Guide**: See the [Usage Guide](https://github.com/six2dez/reconftw/wiki/2.-Usage-Guide).++---++## βοΈ Ax Framework Support (previously Axiom)++reconFTW integrates with [Ax](https://github.com/attacksurge/ax) for distributed scanning, reducing execution time by distributing tasks across multiple cloud instances.++- **Setup**: Select `reconftw` as the provisioner during Axiom configuration.+- **Fleet Management**: Automatically create and destroy fleets (`AXIOM_FLEET_LAUNCH`, `AXIOM_FLEET_SHUTDOWN`) or use an existing fleet.+- **Configuration**: Set fleet size, region, and name in `reconftw.cfg` (`AXIOM_FLEET_COUNT`, `AXIOM_FLEET_REGIONS`, `AXIOM_FLEET_NAME`).++**Example**:++```bash+./reconftw.sh -d target.com -r -v+```++**Details**: See the [Axiom Guide](https://github.com/six2dez/reconftw/wiki/5.-Axiom-version) and official [Ax Docs](https://ax.attacksurge.com/).++---++## π» Faraday Support++reconFTW integrates with [Faraday](https://faradaysec.com/) for web-based reporting and vulnerability management.++- **Setup**: Install Faraday, authenticate via `faraday-cli`, and configure the workspace in `reconftw.cfg` (`FARADAY_SERVER`, `FARADAY_USER`, `FARADAY_PASS`, `FARADAY_WORKSPACE`).+- **Usage**: Enable with `FARADAY=true` in `reconftw.cfg`.++---++## π§ AI Integration++reconFTW uses AI to generate detailed reports from scan results with the tool [reconftw_ai](https://github.com/six2dez/reconftw_ai).++- **Model**: Configurable AI model (e.g., `llama3:8b` via `AI_MODEL`).+- **Report Types**: Markdown or plain text (`AI_REPORT_TYPE`).+- **Profiles**: Executive, brief, or bug hunter (`AI_REPORT_PROFILE`).++**Example**:++```yaml+AI_MODEL="llama3:8b"+AI_REPORT_TYPE="md"+AI_REPORT_PROFILE="bughunter"+```++---++## ποΈ Data Management++Manage scan data and API keys securely using a private repository.++When `ASSET_STORE=true`, reconFTW aggregates key findings into `assets.jsonl` during each run, making it easy to sync only actionable deltas to your private repo.++### Makefile++Use the provided `Makefile` for easy repository management (requires [GitHub CLI](https://cli.github.com/)).++1. **Bootstrap**:++ ```bash+ export PRIV_REPO="$HOME/reconftw-data"+ make bootstrap+ ```++2. **Sync with Upstream**:++ ```bash+ make sync+ ```++3. **Upload Data**:+ ```bash+ make upload+ ```++### Manual++1. Create a private repository on GitHub/GitLab.+2. Clone and configure:++ ```bash+ git clone https://github.com/yourusername/reconftw-data+ cd reconftw-data+ git commit --allow-empty -m "Initial commit"+ git remote add upstream https://github.com/six2dez/reconftw+ git fetch upstream+ git rebase upstream/main master+ ```++3. **Upload Changes**:++ ```bash+ git add .+ git commit -m "Data upload"+ git push origin master+ ```++4. **Update Tool**:+ ```bash+ git fetch upstream+ git rebase upstream/main master+ ```++---++## Mindmap/Workflow++++---++## Sample video++++---++## π€ How to Contribute++Contributions are welcome! You can help by:++- **Reporting Issues**: Submit bugs or feature requests via [GitHub Issues](https://github.com/six2dez/reconftw/issues/new/choose).+- **Submitting Pull Requests**: Contribute code improvements to the [dev branch](https://github.com/six2dez/reconftw/tree/dev).++**Guidelines**: Follow the [Code of Conduct](CODE_OF_CONDUCT.md).++---++## β Need Help?++- **Wiki**: Explore the [reconFTW Wiki](https://github.com/six2dez/reconftw/wiki).+- **FAQ**: Check the [FAQ](https://github.com/six2dez/reconftw/wiki/7.-FAQs).+- **Community**: Join the [Discord server](https://discord.gg/R5DdXVEdTy) or [Telegram group](https://t.me/joinchat/TO_R8NYFhhbmI5co).++---++## π Support This Project++Support reconFTWβs development through:++- **Buy Me a Coffee**: [buymeacoffee.com/six2dez](https://www.buymeacoffee.com/six2dez)++[<img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png">](https://www.buymeacoffee.com/six2dez)++- **DigitalOcean Referral**: [Referral Link](https://www.digitalocean.com/?refcode=f362a6e193a1&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)++<a href="https://www.digitalocean.com/?refcode=f362a6e193a1&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg" alt="DigitalOcean Referral Badge" /></a>++- **GitHub Sponsorship**: [github.com/sponsors/six2dez](https://github.com/sponsors/six2dez)++---++## π Thanks++Special thanks to the following services for supporting reconFTW:++- [C99](https://api.c99.nl/)+- [CIRCL](https://www.circl.lu/)+- [NetworksDB](https://networksdb.io/)+- [ipinfo](https://ipinfo.io/)+- [hackertarget](https://hackertarget.com/)+- [Censys](https://censys.io/)+- [Fofa](https://fofa.info/)+- [intelx](https://intelx.io/)+- [Whoxy](https://www.whoxy.com/)++---++## π License++reconFTW is licensed under the [MIT License](LICENSE).++---++## β Star History++[](https://www.star-history.com/#six2dez/reconftw&Date)diff --git a/install.sh b/install.shindex 4983bcd..87ee709 100755--- a/install.sh+++ b/install.sh@@ -7,16 +7,16 @@ set +eIFS=$'\n\t'# Detect if the script is being run in MacOS with Homebrew Bash-if [[ "$OSTYPE" == "darwin"* && "$BASH" != "/opt/homebrew/bin/bash" ]]; then- exec /opt/homebrew/bin/bash "$0" "$@"+if [[ $OSTYPE == "darwin"* && $BASH != "/opt/homebrew/bin/bash" ]]; then+ exec /opt/homebrew/bin/bash "$0" "$@"fi# Load main configurationCONFIG_FILE="./reconftw.cfg"if [[ ! -f $CONFIG_FILE ]]; then- printf "%b[!] Config file reconftw.cfg not found.%b\n" "$bred" "$reset"- exit 1+ printf "%b[!] Config file reconftw.cfg not found.%b\n" "$bred" "$reset"+ exit 1fisource "$CONFIG_FILE"@@ -33,89 +33,159 @@ IS_MAC=$([[ $OSTYPE == "darwin"* ]] && echo "True" || echo "False")# timeout/gtimeout compatibilityif command -v timeout >/dev/null 2>&1; then- TIMEOUT_CMD="timeout"+ TIMEOUT_CMD="timeout"elif command -v gtimeout >/dev/null 2>&1; then- TIMEOUT_CMD="gtimeout"+ TIMEOUT_CMD="gtimeout"else- TIMEOUT_CMD=""+ TIMEOUT_CMD=""fi# Globals for CLI overridesFORCE_UPDATE=${FORCE_UPDATE:-false}VERBOSE=${VERBOSE:-false}-LOGFILE=${LOGFILE:-}+LOGFILE=${LOGFILE-}DRY_RUN=${DRY_RUN:-false}+TOOLS_ONLY=${TOOLS_ONLY:-false}# If LOGFILE provided via env/flag, tee all output-if [[ -n "${LOGFILE}" ]]; then- exec > >(tee -a "${LOGFILE}") 2>&1+if [[ -n ${LOGFILE} ]]; then+ exec > >(tee -a "${LOGFILE}") 2>&1fi# Helper: run with timeout seconds if availablerun_to() {- local secs=$1; shift || true- if [[ -n "$TIMEOUT_CMD" ]]; then "$TIMEOUT_CMD" "$secs" "$@"; else "$@"; fi+ local secs=$1+ shift || true+ if [[ -n $TIMEOUT_CMD ]]; then "$TIMEOUT_CMD" "$secs" "$@"; else "$@"; fi}# Helper: optionally dry-runrun_cmd() {- if [[ "$DRY_RUN" == "true" ]]; then- printf "%s\n" "[DRY-RUN] $*"; return 0- fi- "$@"+ if [[ $DRY_RUN == "true" ]]; then+ printf "%s\n" "[DRY-RUN] $*"+ return 0+ fi+ "$@"}# Helper: quiet run (respect VERBOSE)q() {- if [[ "$DRY_RUN" == "true" ]]; then printf "%s\n" "[DRY-RUN] $*"; return 0; fi- if [[ "$VERBOSE" == "true" ]]; then "$@"; else { "$@"; } &>/dev/null; fi+ if [[ $DRY_RUN == "true" ]]; then+ printf "%s\n" "[DRY-RUN] $*"+ return 0+ fi+ if [[ $VERBOSE == "true" ]]; then "$@"; else { "$@"; } &>/dev/null; fi}# Helper: quiet run with timeoutq_to() {- local secs=$1; shift || true- if [[ "$DRY_RUN" == "true" ]]; then printf "%s\n" "[DRY-RUN] (to ${secs}) $*"; return 0; fi- if [[ -n "$TIMEOUT_CMD" ]]; then- if [[ "$VERBOSE" == "true" ]]; then "$TIMEOUT_CMD" "$secs" "$@"; else { "$TIMEOUT_CMD" "$secs" "$@"; } &>/dev/null; fi- else- if [[ "$VERBOSE" == "true" ]]; then "$@"; else { "$@"; } &>/dev/null; fi- fi+ local secs=$1+ shift || true+ if [[ $DRY_RUN == "true" ]]; then+ printf "%s\n" "[DRY-RUN] (to ${secs}) $*"+ return 0+ fi+ if [[ -n $TIMEOUT_CMD ]]; then+ if [[ $VERBOSE == "true" ]]; then "$TIMEOUT_CMD" "$secs" "$@"; else { "$TIMEOUT_CMD" "$secs" "$@"; } &>/dev/null; fi+ else+ if [[ $VERBOSE == "true" ]]; then "$@"; else { "$@"; } &>/dev/null; fi+ fi}# Helper: retry with linear backoffretry() {- local attempts=$1; local delay=$2; shift 2- local n=0- until "$@"; do- n=$((n+1))- if (( n >= attempts )); then return 1; fi- sleep $((delay*n))- done+ local attempts=$1+ local delay=$2+ shift 2+ local n=0+ until "$@"; do+ n=$((n + 1))+ if ((n >= attempts)); then return 1; fi+ sleep $((delay * n))+ done+}++ensure_git_dir() {+ local _path="$1"+ if [[ -d "$_path" && ! -d "$_path/.git" ]]; then+ rm -rf "$_path" 2>/dev/null || true+ fi}# Non-fatal error trap: log and continuetrap 'rc=$?; ts=$(date +"%Y-%m-%d %H:%M:%S"); cmd=${BASH_COMMAND}; loc_ln=${BASH_LINENO[0]:-0}; msg="[$ts] install.sh ERR($rc) @ line ${loc_ln} :: ${cmd}"; if [[ -n "${LOGFILE:-}" ]]; then echo "$msg" >>"$LOGFILE"; else echo "$msg" >&2; fi' ERR+# -------------------------------+# Minimal UI helpers (classic style)+# -------------------------------++header() { printf "%bRunning: %s%b\n" "$bblue" "$1" "$reset"; }+msg_run() { printf "%b%s%b\n" "$yellow" "$1" "$reset"; }+msg_ok() { printf "%b%s%b\n" "$yellow" "$1" "$reset"; }+msg_warn() { printf "%b%s%b\n" "$yellow" "$1" "$reset"; }+msg_err() { printf "%b%s%b\n" "$red" "$1" "$reset"; }++# Progress helper (simple spinner output)+progress_update() { :; }+with_spinner() {+ local _msg="$1"+ shift+ if [[ $DRY_RUN == "true" ]]; then+ printf "%s\n" "[DRY-RUN] ${_msg}"+ printf "%s\n" "[DRY-RUN] $*"+ return 0+ fi+ if [[ $VERBOSE == "true" ]]; then+ [[ -n $_msg ]] && printf "%s\n" "$_msg"+ "$@"+ return $?+ fi+ local spinner="|/-\\"+ local spinner_len=4+ local i=0+ [[ -n $_msg ]] && printf "%s " "$_msg"+ "$@" &+ local cmd_pid=$!+ while kill -0 "$cmd_pid" 2>/dev/null; do+ printf "\r%s %s" "$_msg" "${spinner:i:1}"+ i=$(((i + 1) % spinner_len))+ sleep 0.1+ done+ wait "$cmd_pid"+ local exit_code=$?+ if [[ $exit_code -eq 0 ]]; then+ printf "\r%s done\n" "$_msg"+ else+ printf "\r%s failed\n" "$_msg"+ fi+ return $exit_code+}++# Keep arrays defined for potential later use, but classic UI prints a short summary only+declare -a INST_GO_OK INST_GO_SKIP INST_GO_FAIL+declare -a INST_PX_OK INST_PX_SKIP INST_PX_FAIL+declare -a REPOS_CLONED REPOS_SKIPPED REPOS_FAIL+# Basic network precheckcheck_network() {- printf "%bRunning: Network precheck%b\n" "$bblue" "$reset"- # Silence successful output; show message only on failure. Use q_to to respect --verbose.- if ! q_to 5 bash -lc 'getent hosts github.com >/dev/null 2>&1 || dig +short github.com >/dev/null 2>&1 || nslookup github.com >/dev/null 2>&1'; then- printf "%b[!] DNS resolution for github.com failed. Check your network.%b\n" "$bred" "$reset"- fi- if ! q_to 10 curl -I -s https://github.com >/dev/null 2>&1; then- printf "%b[!] HTTPS connectivity to github.com failed. Installer may fail.%b\n" "$yellow" "$reset"- fi+ printf "%bRunning: Network precheck%b\n" "$bblue" "$reset"+ # Silence successful output; show message only on failure. Use q_to to respect --verbose.+ if ! q_to 5 bash -lc 'getent hosts github.com >/dev/null 2>&1 || dig +short github.com >/dev/null 2>&1 || nslookup github.com >/dev/null 2>&1'; then+ printf "%b[!] DNS resolution for github.com failed. Check your network.%b\n" "$bred" "$reset"+ fi+ if ! q_to 10 curl -I -s https://github.com >/dev/null 2>&1; then+ printf "%b[!] HTTPS connectivity to github.com failed. Installer may fail.%b\n" "$yellow" "$reset"+ fi}# Check Bash versionBASH_VERSION_NUM=$(bash --version | awk 'NR==1{print $4}' | cut -d'.' -f1)if [[ $BASH_VERSION_NUM -lt 4 ]]; then- printf "%bYour Bash version is lower than 4, please update.%b\n" "$bred" "$reset"- if [[ $IS_MAC == "True" ]]; then- printf "%bFor macOS, run 'brew install bash' and rerun the installer in a new terminal.%b\n" "$yellow" "$reset"- fi- exit 1+ printf "%bYour Bash version is lower than 4, please update.%b\n" "$bred" "$reset"+ if [[ $IS_MAC == "True" ]]; then+ printf "%bFor macOS, run 'brew install bash' and rerun the installer in a new terminal.%b\n" "$yellow" "$reset"+ fi+ exit 1fi# Declare Go tools and their installation commands@@ -169,6 +239,7 @@ declare -A gotools=(["csprecon"]="go install github.com/edoardottt/csprecon/cmd/csprecon@latest"["VhostFinder"]="go install -v github.com/wdahlenburg/VhostFinder@latest"["misconfig-mapper"]="go install github.com/intigriti/misconfig-mapper/cmd/misconfig-mapper@latest"+ ["grpcurl"]="go install -v github.com/fullstorydev/grpcurl/cmd/grpcurl@latest")# Declare pipx tools and their paths@@ -184,6 +255,9 @@ declare -A pipxtools=(["porch-pirate"]="MandConsultingGroup/porch-pirate"["p1radup"]="iambouali/p1radup"["subwiz"]="hadriansecurity/subwiz"+ ["arjun"]="s0md3v/Arjun"+ ["gqlspection"]="doyensec/GQLSpection"+ ["cloud_enum"]="initstring/cloud_enum")# Declare repositories and their paths@@ -243,39 +317,56 @@ EOF# Function to install Go toolsfunction install_tools() {- printf "%bRunning: Installing Golang tools (%d)%b\n\n" "$bblue" "${#gotools[@]}" "$reset"+ header "Installing Golang tools (${#gotools[@]})"local go_step=0local failed_tools=()+ local total_go=${#gotools[@]}+ local go_ok=0 go_skip=0 go_fail=0for gotool in "${!gotools[@]}"; do((++go_step))if [[ $upgrade_tools == "false" ]]; thenif command -v "$gotool" &>/dev/null; then- printf "[%bSKIPPING%b] %s already installed at %s\n" "$yellow" "$reset" "$gotool" "$(command -v "$gotool")"+ INST_GO_SKIP+=("$gotool")+ ((++go_skip))+ progress_update "Go tools" "$go_step" "$total_go" "$go_ok" "$go_skip" "$go_fail"+ [[ $COMPACT != "true" ]] && msg_warn "[$go_step/$total_go] ${CLR_CYAN}${gotool}${RESET} already installed"continuefifi- # Install the Go tool (guard against set -e by using if)+ # Install the Go toolif q bash -lc "${gotools[$gotool]}"; then- printf "%b%s installed (%d/%d)%b\n" "$yellow" "$gotool" "$go_step" "${#gotools[@]}" "$reset"+ INST_GO_OK+=("$gotool")+ ((++go_ok))+ progress_update "Go tools" "$go_step" "$total_go" "$go_ok" "$go_skip" "$go_fail"+ [[ $COMPACT != "true" ]] && msg_ok "[$go_step/$total_go] ${CLR_CYAN}${gotool}${RESET} installed"else- printf "%bUnable to install %s, try manually (%d/%d)%b\n" "$red" "$gotool" "$go_step" "${#gotools[@]}" "$reset"failed_tools+=("$gotool")+ INST_GO_FAIL+=("$gotool")+ ((++go_fail))double_check=true+ progress_update "Go tools" "$go_step" "$total_go" "$go_ok" "$go_skip" "$go_fail"+ msg_err "[$go_step/$total_go] ${CLR_CYAN}${gotool}${RESET} failed"fidone+ [[ $COMPACT == "true" && $IS_TTY -eq 1 ]] && printf "\n"- printf "\n%bRunning: Installing pipx tools (%d)%b\n\n" "$bblue" "${#pipxtools[@]}" "$reset"+ header "Installing pipx tools (${#pipxtools[@]})"local pipx_step=0local failed_pipx_tools=()+ local total_px=${#pipxtools[@]}+ local px_ok=0 px_skip=0 px_fail=0for pipxtool in "${!pipxtools[@]}"; do((++pipx_step))if [[ $upgrade_tools == "false" ]]; thenif command -v "$pipxtool" &>/dev/null; then- printf "[%bSKIPPING%b] %s already installed at %s\n" "$yellow" "$reset" "$pipxtool" "$(command -v "$pipxtool")"+ INST_PX_SKIP+=("$pipxtool")+ ((++px_skip))+ progress_update "pipx tools" "$pipx_step" "$total_px" "$px_ok" "$px_skip" "$px_fail"+ [[ $COMPACT != "true" ]] && msg_warn "[$pipx_step/$total_px] ${CLR_CYAN}${pipxtool}${RESET} already installed"continuefifi@@ -284,9 +375,12 @@ function install_tools() {q pipx install "git+https://github.com/${pipxtools[$pipxtool]}"exit_status=$?if [[ $exit_status -ne 0 ]]; then- printf "%bFailed to install %s, try manually (%d/%d)%b\n" "$red" "$pipxtool" "$pipx_step" "${#pipxtools[@]}" "$reset"failed_pipx_tools+=("$pipxtool")+ INST_PX_FAIL+=("$pipxtool")+ ((++px_fail))double_check=true+ progress_update "pipx tools" "$pipx_step" "$total_px" "$px_ok" "$px_skip" "$px_fail"+ msg_err "[$pipx_step/$total_px] ${CLR_CYAN}${pipxtool}${RESET} install failed"continuefi@@ -294,63 +388,86 @@ function install_tools() {q pipx upgrade "${pipxtool}"exit_status=$?if [[ $exit_status -ne 0 ]]; then- printf "%bFailed to upgrade %s, try manually (%d/%d)%b\n" "$red" "$pipxtool" "$pipx_step" "${#pipxtools[@]}" "$reset"failed_pipx_tools+=("$pipxtool")+ INST_PX_FAIL+=("$pipxtool")+ ((++px_fail))double_check=true+ progress_update "pipx tools" "$pipx_step" "$total_px" "$px_ok" "$px_skip" "$px_fail"+ msg_err "[$pipx_step/$total_px] ${CLR_CYAN}${pipxtool}${RESET} upgrade failed"continuefi- printf "%b%s installed (%d/%d)%b\n" "$yellow" "$pipxtool" "$pipx_step" "${#pipxtools[@]}" "$reset"+ INST_PX_OK+=("$pipxtool")+ ((++px_ok))+ progress_update "pipx tools" "$pipx_step" "$total_px" "$px_ok" "$px_skip" "$px_fail"+ [[ $COMPACT != "true" ]] && msg_ok "[$pipx_step/$total_px] ${CLR_CYAN}${pipxtool}${RESET} ready"done+ [[ $COMPACT == "true" && $IS_TTY -eq 1 ]] && printf "\n"- printf "\n%bRunning: Installing repositories (%d)%b\n\n" "$bblue" "${#repos[@]}" "$reset"+ header "Installing repositories (${#repos[@]})"local repos_step=0local failed_repos=()+ local total_repo=${#repos[@]}+ local repo_ok=0 repo_skip=0 repo_fail=0for repo in "${!repos[@]}"; do((++repos_step))if [[ $upgrade_tools == "false" ]]; thenif [[ -d "${dir}/${repo}" ]]; then- printf "[%bSKIPPING%b] Repository %s already cloned in %s\n" "$yellow" "$reset" "$repo" "${dir}/${repo}"+ REPOS_SKIPPED+=("$repo")+ ((++repo_skip))+ progress_update "repos" "$repos_step" "$total_repo" "$repo_ok" "$repo_skip" "$repo_fail"+ [[ $COMPACT != "true" ]] && msg_warn "[$repos_step/$total_repo] $repo already present at ${dir}/${repo}"continuefifi- # Clone the repository- if [[ ! -d "${dir}/${repo}" || -z "$(ls -A "${dir}/${repo}")" ]]; then- if retry 3 3 q_to 180 git clone --filter="blob:none" "https://github.com/${repos[$repo]}" "${dir}/${repo}"; then- exit_status=0- else- exit_status=$?- fi- if [[ $exit_status -ne 0 ]]; then- printf "%bUnable to clone repository %s%b\n" "$red" "$repo" "$reset"- failed_repos+=("$repo")- double_check=true- continue- fi- fi+ # Clone the repository+ if [[ ! -d "${dir}/${repo}" || -z "$(ls -A "${dir}/${repo}")" ]]; then+ msg_run "[$repos_step/${#repos[@]}] $repo (clone)"+ if retry 3 3 q_to 180 git clone --filter="blob:none" "https://github.com/${repos[$repo]}" "${dir}/${repo}"; then+ exit_status=0+ else+ exit_status=$?+ fi+ if [[ $exit_status -ne 0 ]]; then+ msg_err "[$repos_step/$total_repo] $repo clone failed"+ failed_repos+=("$repo")+ REPOS_FAIL+=("$repo")+ ((++repo_fail))+ double_check=true+ continue+ fi+ REPOS_CLONED+=("$repo")+ ((++repo_ok))+ progress_update "repos" "$repos_step" "$total_repo" "$repo_ok" "$repo_skip" "$repo_fail"+ fi# Navigate to the repository directorycd "${dir}/${repo}" || {- printf "%bFailed to navigate to directory '%s'%b\n" "$red" "${dir}/${repo}" "$reset"+ msg_err "[$repos_step/$total_repo] $repo: cannot enter ${dir}/${repo}"failed_repos+=("$repo")+ REPOS_FAIL+=("$repo")+ ((++repo_fail))double_check=truecontinue}# Pull the latest changes- if retry 3 3 q_to 60 git pull; then- exit_status=0- else- exit_status=$?- fi- if [[ $exit_status -ne 0 ]]; then- printf "%bFailed to pull updates for repository %s%b\n" "$red" "$repo" "$reset"- failed_repos+=("$repo")- double_check=true- continue- fi+ msg_run "[$repos_step/${#repos[@]}] $repo (pull)"+ if retry 3 3 q_to 60 git pull; then+ exit_status=0+ else+ exit_status=$?+ fi+ if [[ $exit_status -ne 0 ]]; then+ msg_err "[$repos_step/$total_repo] $repo pull failed"+ failed_repos+=("$repo")+ REPOS_FAIL+=("$repo")+ ((++repo_fail))+ double_check=true+ continue+ fi# Install requirements inside a virtual environmentif [[ -s "requirements.txt" ]]; then@@ -360,8 +477,10 @@ function install_tools() {# shellcheck disable=SC1091source venv/bin/activateif ! pip3 install --upgrade -r requirements.txt &>/dev/null; then- printf "%bFailed to install Python requirements for %s%b\n" "$red" "$repo" "$reset"+ msg_err "[$repos_step/$total_repo] $repo: pip requirements failed"failed_repos+=("$repo")+ REPOS_FAIL+=("$repo")+ ((++repo_fail))double_check=truefiif [ "$repo" = "dorks_hunter" ]; then@@ -409,12 +528,13 @@ function install_tools() {# Return to the main directorycd "$dir" || {- printf "%bFailed to navigate back to directory '%s'.%b\n" "$red" "$dir" "$reset"+ msg_err "Failed to navigate back to directory '$dir'"exit 1}- printf "%b%s installed (%d/%d)%b\n" "$yellow" "$repo" "$repos_step" "${#repos[@]}" "$reset"+ msg_ok "[$repos_step/$total_repo] $repo ready"done+ [[ $COMPACT == "true" && $IS_TTY -eq 1 ]] && printf "\n"# Notify and ensure subfinder is installed twice (as per original script)# Guard with command checks to avoid aborting under set -e@@ -447,123 +567,172 @@ function reset_git_proxies() {# Function to check for updatesfunction check_updates() {- printf "%bRunning: Looking for new reconFTW version%b\n" "$bblue" "$reset"-- if { [[ -n "$TIMEOUT_CMD" ]] && $TIMEOUT_CMD 10 git fetch; } || git fetch; then- BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "HEAD")- HEADHASH=$(git rev-parse HEAD 2>/dev/null || true)- # Skip auto-update if no upstream (detached HEAD or no tracking branch)- if ! git rev-parse --abbrev-ref --symbolic-full-name @{u} >/dev/null 2>&1; then- printf "%bNo upstream configured (detached HEAD). Skipping auto-update.%b\n" "$yellow" "$reset"- return 0+ printf "%bRunning: Looking for new reconFTW version%b\n" "$bblue" "$reset"++ if { [[ -n $TIMEOUT_CMD ]] && $TIMEOUT_CMD 10 git fetch; } || git fetch; then+ BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "HEAD")+ HEADHASH=$(git rev-parse HEAD 2>/dev/null || true)+ # Skip auto-update if no upstream (detached HEAD or no tracking branch)+ if ! git rev-parse --abbrev-ref --symbolic-full-name @{u} >/dev/null 2>&1; then+ printf "%bNo upstream configured (detached HEAD). Skipping auto-update.%b\n" "$yellow" "$reset"+ return 0+ fi+ UPSTREAMHASH=$(git rev-parse "@{u}")++ if [[ $HEADHASH != "$UPSTREAMHASH" ]]; then+ if git status --porcelain | grep -q .; then+ if [[ $FORCE_UPDATE == "true" ]]; then+ printf "%bLocal changes detected; forcing update.%b\n" "$yellow" "$reset"+ else+ printf "%bLocal changes detected. Skipping auto-update. Re-run with --force-update to override.%b\n" "$yellow" "$reset"+ return 0+ fi+ fi+ printf "%bA new version is available. Updating...%b\n" "$yellow" "$reset"+ if git status --porcelain | grep -q 'reconftw.cfg$'; then+ mv reconftw.cfg reconftw.cfg_bck+ printf "%breconftw.cfg has been backed up to reconftw.cfg_bck%b\n" "$yellow" "$reset"+ fi+ git reset --hard &>/dev/null+ run_to 60 git pull &>/dev/null+ printf "%bUpdated! Running the new installer version...%b\n" "$bgreen" "$reset"+ else+ printf "%breconFTW is already up to date!%b\n" "$bgreen" "$reset"+ fi+ else+ printf "\n%b[!] Unable to check for updates.%b\n" "$bred" "$reset"+ fi+}++# Function to install Golang+function install_golang_version() {+ local version="go1.25.3"+ local latest_version+ latest_version=$(curl -s https://go.dev/VERSION?m=text | head -1 || echo "go1.20.7")+ if [[ $latest_version == g* ]]; then+ version="$latest_version"+ fi++ printf "%bRunning: Installing/Updating Golang(%s) %b\n" "$bblue" "$version" "$reset"++ if [[ $install_golang == "true" ]]; then+ local current_version=""+ if command -v go &>/dev/null; then+ current_version="$(go version | awk '{print $3}')"fi- UPSTREAMHASH=$(git rev-parse "@{u}")- if [[ $HEADHASH != "$UPSTREAMHASH" ]]; then- if git status --porcelain | grep -q .; then- if [[ "$FORCE_UPDATE" == "true" ]]; then- printf "%bLocal changes detected; forcing update.%b\n" "$yellow" "$reset"+ if [[ -n $current_version && $version == "$current_version" ]]; then+ printf "%bGolang is already installed and up to date.%b\n" "$bgreen" "$reset"+ else+ local archive_suffix=""++ case "$ARCH" in+ arm64 | aarch64)+ if [[ $IS_MAC == "True" ]]; then+ archive_suffix="darwin-arm64"else- printf "%bLocal changes detected. Skipping auto-update. Re-run with --force-update to override.%b\n" "$yellow" "$reset"- return 0+ archive_suffix="linux-arm64"fi+ ;;+ armv6l | armv7l)+ archive_suffix="linux-armv6l"+ ;;+ amd64 | x86_64)+ if [[ $IS_MAC == "True" ]]; then+ archive_suffix="darwin-amd64"+ else+ archive_suffix="linux-amd64"+ fi+ ;;+ *)+ msg_err "[!] Unsupported architecture. Please install go manually."+ return 1+ ;;+ esac++ local archive_url="https://dl.google.com/go/${version}.${archive_suffix}.tar.gz"+ local archive_path="/tmp/${version}.${archive_suffix}.tar.gz"++ if ! wget "$archive_url" -O "$archive_path" &>/dev/null; then+ msg_err "[!] Failed to download Golang archive from ${archive_url}"+ return 1fi- printf "%bA new version is available. Updating...%b\n" "$yellow" "$reset"- if git status --porcelain | grep -q 'reconftw.cfg$'; then- mv reconftw.cfg reconftw.cfg_bck- printf "%breconftw.cfg has been backed up to reconftw.cfg_bck%b\n" "$yellow" "$reset"++ local tmp_unpack+ tmp_unpack=$(mktemp -d 2>/dev/null || mktemp -d -t goinstall)+ if ! tar -C "$tmp_unpack" -xzf "$archive_path" &>/dev/null; then+ msg_err "[!] Failed to extract ${archive_path}"+ rm -rf "$tmp_unpack"+ return 1fi- git reset --hard &>/dev/null- run_to 60 git pull &>/dev/null- printf "%bUpdated! Running the new installer version...%b\n" "$bgreen" "$reset"- else- printf "%breconFTW is already up to date!%b\n" "$bgreen" "$reset"- fi- else- printf "\n%b[!] Unable to check for updates.%b\n" "$bred" "$reset"- fi-}-# Function to install Golang-function install_golang_version() {- local version="go1.20.7"- local latest_version- latest_version=$(curl -s https://go.dev/VERSION?m=text | head -1 || echo "go1.20.7")- if [[ $latest_version == g* ]]; then- version="$latest_version"- fi+ if [[ ! -d "${tmp_unpack}/go" ]]; then+ msg_err "[!] Extracted archive missing 'go' directory"+ rm -rf "$tmp_unpack"+ return 1+ fi- printf "%bRunning: Installing/Updating Golang(%s) %b\n" "$bblue" "$version" "$reset"+ local go_backup=""+ if [[ -d /usr/local/go ]]; then+ go_backup="/usr/local/go.reconftw.$(date +%s)"+ if ! $SUDO mv /usr/local/go "$go_backup" &>/dev/null; then+ msg_warn "[!] Unable to backup existing /usr/local/go; attempting in-place overwrite."+ go_backup=""+ if ! ($SUDO rm -rf /usr/local/go &>/dev/null); then+ msg_warn "[!] Failed to remove existing /usr/local/go; installation may overwrite partially."+ fi+ fi+ fi+ if ! $SUDO mv "${tmp_unpack}/go" /usr/local/go; then+ msg_err "[!] Failed to move Golang into /usr/local/go"+ if [[ -n $go_backup && -d $go_backup ]]; then+ $SUDO mv "$go_backup" /usr/local/go &>/dev/null || msg_warn "[!] Unable to restore previous Golang installation from backup."+ fi+ rm -rf "$tmp_unpack"+ return 1+ fi+ if [[ -n $go_backup ]]; then+ $SUDO rm -rf "$go_backup" &>/dev/null+ fi- if [[ $install_golang == "true" ]]; then- if command -v go &>/dev/null && [[ $version == "$(go version | awk '{print $3}')" ]]; then- printf "%bGolang is already installed and up to date.%b\n" "$bgreen" "$reset"- else- $SUDO rm -rf /usr/local/go &>/dev/null || true+ rm -rf "$tmp_unpack"+ rm -f "$archive_path" 2>/dev/null- case "$ARCH" in- arm64 | aarch64)- if [[ $IS_MAC == "True" ]]; then- wget "https://dl.google.com/go/${version}.darwin-arm64.tar.gz" -O "/tmp/${version}.darwin-arm64.tar.gz" &>/dev/null- $SUDO tar -C /usr/local -xzf "/tmp/${version}.darwin-arm64.tar.gz" &>/dev/null- else- wget "https://dl.google.com/go/${version}.linux-arm64.tar.gz" -O "/tmp/${version}.linux-arm64.tar.gz" &>/dev/null- $SUDO tar -C /usr/local -xzf "/tmp/${version}.linux-arm64.tar.gz" &>/dev/null- fi- ;;- armv6l | armv7l)- wget "https://dl.google.com/go/${version}.linux-armv6l.tar.gz" -O "/tmp/${version}.linux-armv6l.tar.gz" &>/dev/null- $SUDO tar -C /usr/local -xzf "/tmp/${version}.linux-armv6l.tar.gz" &>/dev/null- ;;- amd64 | x86_64)- if [[ $IS_MAC == "True" ]]; then- wget "https://dl.google.com/go/${version}.darwin-amd64.tar.gz" -O "/tmp/${version}.darwin-amd64.tar.gz" &>/dev/null- $SUDO tar -C /usr/local -xzf "/tmp/${version}.darwin-amd64.tar.gz" &>/dev/null- else- wget "https://dl.google.com/go/${version}.linux-amd64.tar.gz" -O "/tmp/${version}.linux-amd64.tar.gz" &>/dev/null- $SUDO tar -C /usr/local -xzf "/tmp/${version}.linux-amd64.tar.gz" &>/dev/null- fi- ;;- *)- printf "%b[!] Unsupported architecture. Please install go manually.%b\n" "$bred" "$reset"- exit 1- ;;- esac-- $SUDO ln -sf /usr/local/go/bin/go /usr/local/bin/ 2>/dev/null- export GOROOT=/usr/local/go- export GOPATH="${HOME}/go"- export PATH="$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH"-- # Append Go environment variables to shell profile- cat <<EOF >>${HOME}/"${profile_shell}"--# Golang environment variables-export GOROOT=/usr/local/go-export GOPATH=\$HOME/go-export PATH=\$GOPATH/bin:\$GOROOT/bin:\$HOME/.local/bin:\$PATH-EOF- fi- else- printf "%bGolang will not be configured according to the user's preferences (install_golang=false in reconftw.cfg).%b\n" "$byellow" "$reset"- fi+ $SUDO ln -sf /usr/local/go/bin/go /usr/local/bin/ 2>/dev/null+ fi- # Validate Go environment variables- if [[ -z ${GOPATH-} ]]; then- printf "%bGOPATH environment variable not detected. Add Golang environment variables to your \$HOME/.bashrc or \$HOME/.zshrc:%b\n" "$bred" "$reset"- printf "export GOROOT=/usr/local/go\n"- printf 'export GOPATH=$HOME/go\n'- printf 'export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH\n\n'- exit 1- fi+ export GOROOT=/usr/local/go+ export GOPATH="${HOME}/go"+ export PATH="$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH"++ if [[ -n ${profile_shell:-} ]]; then+ local profile_path="${HOME}/${profile_shell}"+ local marker="# Golang environment variables (reconFTW)"+ if ! grep -Fq "$marker" "$profile_path" 2>/dev/null; then+ {+ printf '\n%s\n' "$marker"+ printf 'export GOROOT=/usr/local/go\n'+ printf 'export GOPATH=$HOME/go\n'+ printf 'export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH\n'+ } >>"$profile_path"+ fi+ fi+ else+ msg_warn "Golang will not be configured according to the user's preferences (install_golang=false in reconftw.cfg)."+ fi- if [[ -z ${GOROOT-} ]]; then- printf "%bGOROOT environment variable not detected. Add Golang environment variables to your \$HOME/.bashrc or \$HOME/.zshrc:%b\n" "$bred" "$reset"- printf "export GOROOT=/usr/local/go\n"- printf 'export GOPATH=$HOME/go\n'- printf 'export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH\n\n'- exit 1- fi+ if ! command -v go &>/dev/null; then+ msg_err "[!] Go binary not found in PATH. Please install Go or enable install_golang in reconftw.cfg."+ return 1+ fi++ local detected_gopath detected_goroot+ detected_gopath="${GOPATH:-$(go env GOPATH 2>/dev/null || true)}"+ detected_goroot="${GOROOT:-$(go env GOROOT 2>/dev/null || true)}"++ if [[ -z $detected_gopath || -z $detected_goroot ]]; then+ msg_warn "Go environment variables not fully configured. Ensure GOPATH and GOROOT are set or available via 'go env'."+ fi}# Function to install system packages based on OS@@ -580,7 +749,7 @@ function install_system_packages() {elif [[ -f /etc/os-release ]]; theninstall_yum # Assuming RedHat-basedelse- printf "%b[!] Unsupported OS. Please install dependencies manually.%b\n" "$bred" "$reset"+ printf "%b[!] Unsupported OS. Please install dependencies manually.%b\n" "$bred" "$reset"exit 1fi}@@ -603,16 +772,16 @@ function install_apt() {# Function to install required packages for macOSfunction install_brew() {- if command -v brew &>/dev/null; then- printf "%bbrew is already installed.%b\n" "$bgreen" "$reset"- else- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- fi- brew update &>/dev/null- brew install --formula bash coreutils gnu-getopt gnu-sed python pipx massdns jq gcc cmake ruby git curl wget zip pv bind whois nmap lynx medusa shodan &>/dev/null- brew install rustup &>/dev/null- rustup-init -y &>/dev/null- cargo install ripgen &>/dev/null+ if command -v brew &>/dev/null; then+ printf "%bbrew is already installed.%b\n" "$bgreen" "$reset"+ else+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"+ fi+ brew update &>/dev/null+ brew install --formula bash coreutils gnu-getopt gnu-sed python pipx massdns jq gcc cmake ruby git curl wget zip pv bind whois nmap lynx medusa shodan &>/dev/null+ brew install rustup &>/dev/null+ rustup-init -y &>/dev/null+ cargo install ripgen &>/dev/null}# Function to install required packages for RedHat-based systems@@ -623,8 +792,8 @@ function install_yum() {$SUDO yum install -y python3 python3-pip gcc cmake ruby git curl libpcap whois wget pipx zip pv bind-utils openssl-devel libffi-devel libxml2-devel libxslt-devel zlib-devel nmap jq lynx medusa xorg-x11-server-xvfb &>/dev/null# Ensure Python >= 3.7 on yum-based systems- if ! python3 - <<-'PYCHK' &>/dev/null; then- import sys; raise SystemExit(0 if sys.version_info >= (3,7) else 1)+ if ! python3 - <<-'PYCHK' &>/dev/null; then+ import sys; raise SystemExit(0 if sys.version_info >= (3,7) else 1)PYCHK# Try DNF/YUM module streams (EL8+/EL9+) for newer Python@@ -643,22 +812,22 @@ function install_yum() {fi# EL7 fallback via IUS (best-effort)- REL_VER=$( (cat /etc/redhat-release 2>/dev/null || cat /etc/centos-release 2>/dev/null) || true )- if [[ "$REL_VER" == *" 7."* ]]; then+ REL_VER=$( (cat /etc/redhat-release 2>/dev/null || cat /etc/centos-release 2>/dev/null) || true)+ if [[ $REL_VER == *" 7."* ]]; then$SUDO yum install -y https://repo.ius.io/ius-release-el7.rpm &>/dev/null || true$SUDO yum install -y python37u python37u-pip python37u-devel &>/dev/null || truefi# If python3.9/3.8/3.7 binaries exist, prefer the newest by creating a higher-priority symlink- if ! python3 - <<-'PYCHK' &>/dev/null; then- import sys; raise SystemExit(0 if sys.version_info >= (3,7) else 1)- PYCHK+ if ! python3 - <<-'PYCHK' &>/dev/null; then+ import sys; raise SystemExit(0 if sys.version_info >= (3,7) else 1)+ PYCHKNEW_PY=""for cand in /usr/bin/python3.11 /usr/bin/python3.10 /usr/bin/python3.9 /usr/bin/python3.8 /usr/bin/python3.7; do- [[ -x "$cand" ]] && NEW_PY="$cand" && break+ [[ -x $cand ]] && NEW_PY="$cand" && breakdone- if [[ -n "$NEW_PY" ]]; then+ if [[ -n $NEW_PY ]]; then$SUDO ln -sf "$NEW_PY" /usr/local/bin/python3 2>/dev/null || trueexport PATH="/usr/local/bin:$PATH"fi@@ -694,20 +863,31 @@ function install_pacman() {# Function to perform initial setupfunction initial_setup() {- banner- reset_git_proxies-- printf "%bRunning: Checking for updates%b\n" "$bblue" "$reset"- check_updates-- printf "%bRunning: Installing system packages%b\n" "$bblue" "$reset"- install_system_packages-- check_network-- install_golang_version+ banner+ reset_git_proxies++ if [[ $TOOLS_ONLY == "true" ]]; then+ header "Tools-only mode"+ with_spinner "Installing/validating Golang" install_golang_version+ mkdir -p ${HOME}/.gf+ mkdir -p "$tools"+ mkdir -p ${HOME}/.config/notify/+ mkdir -p ${HOME}/.config/nuclei/+ touch "${dir}/.github_tokens"+ touch "${dir}/.gitlab_tokens"++ q pipx ensurepath+ export PATH="${HOME}/.local/bin:${PATH}"++ install_tools+ return+ fi- printf "%bRunning: Installing Python requirements%b\n" "$bblue" "$reset"+ header "Install/Update"+ with_spinner "Checking for updates" check_updates+ with_spinner "Installing system packages" install_system_packages+ check_network+ with_spinner "Installing/validating Golang" install_golang_versionmkdir -p ${HOME}/.gfmkdir -p "$tools"mkdir -p ${HOME}/.config/notify/@@ -715,120 +895,135 @@ function initial_setup() {touch "${dir}/.github_tokens"touch "${dir}/.gitlab_tokens"- q pipx ensurepath- # Ensure $HOME/.local/bin is available now even if profile isn't sourced- export PATH="${HOME}/.local/bin:${PATH}"- # Do not source user shell profiles here to avoid errors like 'PS1: unbound variable'- # in non-interactive shells with 'set -u'. PATH for this process is already updated.+ q pipx ensurepath+ # Ensure $HOME/.local/bin is available now even if profile isn't sourced+ export PATH="${HOME}/.local/bin:${PATH}"+ # Do not source user shell profiles here to avoid errors like 'PS1: unbound variable'+ # in non-interactive shells with 'set -u'. PATH for this process is already updated.install_tools-# Repositories with special configurations- printf "%b\nRunning: Configuring special repositories%b\n" "$bblue" "$reset"+ # Repositories with special configurations+ header "Configuring special repositories"- # Nuclei Templates (opt-out with MANAGE_NUCLEI_TEMPLATES=false)- MANAGE_NUCLEI_TEMPLATES=${MANAGE_NUCLEI_TEMPLATES:-true}- if [[ "$MANAGE_NUCLEI_TEMPLATES" == "true" ]]; then- if [[ ! -d ${NUCLEI_TEMPLATES_PATH} ]]; then- q mkdir -p "${NUCLEI_TEMPLATES_PATH}"- retry 3 3 q_to 300 git clone https://github.com/projectdiscovery/nuclei-templates "${NUCLEI_TEMPLATES_PATH}" || true- else- retry 3 3 q_to 120 git -C "${NUCLEI_TEMPLATES_PATH}" pull || true- fi- if [[ ! -d ${NUCLEI_TEMPLATES_PATH}/extra_templates ]]; then- retry 3 3 q_to 120 git clone https://github.com/projectdiscovery/fuzzing-templates "${NUCLEI_TEMPLATES_PATH}/extra_templates" || true- else- retry 3 3 q_to 60 git -C "${NUCLEI_TEMPLATES_PATH}/extra_templates" pull || true- fi- if [[ ! -d ${NUCLEI_FUZZING_TEMPLATES_PATH} ]]; then- q mkdir -p ${NUCLEI_FUZZING_TEMPLATES_PATH}- retry 3 3 q_to 120 git clone https://github.com/projectdiscovery/fuzzing-templates "${NUCLEI_FUZZING_TEMPLATES_PATH}" || true- else- retry 3 3 q_to 60 git -C "${NUCLEI_FUZZING_TEMPLATES_PATH}" pull || true- fi- fi- nuclei -update-templates -update-template-dir "${NUCLEI_TEMPLATES_PATH}" >/dev/null 2>&1 || true+ # Nuclei Templates (opt-out with MANAGE_NUCLEI_TEMPLATES=false)+ MANAGE_NUCLEI_TEMPLATES=${MANAGE_NUCLEI_TEMPLATES:-true}+ if [[ $MANAGE_NUCLEI_TEMPLATES == "true" ]]; then+ ensure_git_dir "${NUCLEI_TEMPLATES_PATH}"+ if [[ ! -d ${NUCLEI_TEMPLATES_PATH} ]]; then+ q mkdir -p "${NUCLEI_TEMPLATES_PATH}"+ with_spinner "Cloning nuclei-templates" retry 3 3 q_to 300 git clone https://github.com/projectdiscovery/nuclei-templates "${NUCLEI_TEMPLATES_PATH}" || true+ else+ with_spinner "Updating nuclei-templates" retry 3 3 q_to 120 git -C "${NUCLEI_TEMPLATES_PATH}" pull || true+ fi+ ensure_git_dir "${NUCLEI_TEMPLATES_PATH}/extra_templates"+ if [[ ! -d ${NUCLEI_TEMPLATES_PATH}/extra_templates ]]; then+ with_spinner "Cloning extra fuzzing-templates" retry 3 3 q_to 120 git clone https://github.com/projectdiscovery/fuzzing-templates "${NUCLEI_TEMPLATES_PATH}/extra_templates" || true+ else+ with_spinner "Updating extra fuzzing-templates" retry 3 3 q_to 60 git -C "${NUCLEI_TEMPLATES_PATH}/extra_templates" pull || true+ fi+ ensure_git_dir "${NUCLEI_FUZZING_TEMPLATES_PATH}"+ if [[ ! -d ${NUCLEI_FUZZING_TEMPLATES_PATH} ]]; then+ q mkdir -p ${NUCLEI_FUZZING_TEMPLATES_PATH}+ with_spinner "Cloning fuzzing-templates" retry 3 3 q_to 120 git clone https://github.com/projectdiscovery/fuzzing-templates "${NUCLEI_FUZZING_TEMPLATES_PATH}" || true+ else+ with_spinner "Updating fuzzing-templates" retry 3 3 q_to 60 git -C "${NUCLEI_FUZZING_TEMPLATES_PATH}" pull || true+ fi+ fi+ with_spinner "Nuclei template update" nuclei -update-templates -update-template-dir "${NUCLEI_TEMPLATES_PATH}" >/dev/null 2>&1 || true# sqlmap+ ensure_git_dir "${dir}/sqlmap"if [[ ! -d "${dir}/sqlmap" ]]; then#printf "${yellow}Cloning sqlmap...${reset}\n"- if ! retry 3 3 q_to 120 git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git "${dir}/sqlmap"; then true; fi+ if ! retry 3 3 q_to 120 git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git "${dir}/sqlmap"; then true; fielse#printf "${yellow}Updating sqlmap...${reset}\n"- if ! retry 3 3 q_to 60 git -C "${dir}/sqlmap" pull; then true; fi+ if ! retry 3 3 q_to 60 git -C "${dir}/sqlmap" pull; then true; fifi# massdns+ ensure_git_dir "${dir}/massdns"if [[ ! -d "${dir}/massdns" ]]; then#printf "${yellow}Cloning and compiling massdns...${reset}\n"- if ! retry 3 3 q_to 120 git clone https://github.com/blechschmidt/massdns.git "${dir}/massdns"; then true; fi+ if ! retry 3 3 q_to 120 git clone https://github.com/blechschmidt/massdns.git "${dir}/massdns"; then true; fiq make -C "${dir}/massdns"strip -s "${dir}/massdns/bin/massdns" 2>/dev/null$SUDO cp "${dir}/massdns/bin/massdns" /usr/local/bin/ 2>/dev/nullelse#printf "${yellow}Updating massdns...${reset}\n"- if ! retry 3 3 q_to 60 git -C "${dir}/massdns" pull; then true; fi+ if ! retry 3 3 q_to 60 git -C "${dir}/massdns" pull; then true; fifi# gf patterns-if [[ ! -d "$HOME/.gf" ]]; then+ if [[ ! -d "$HOME/.gf" ]]; then#printf "${yellow}Installing gf patterns...${reset}\n"- if ! retry 3 3 q_to 120 git clone https://github.com/tomnomnom/gf.git "${dir}/gf"; then true; fi- cp -r "${dir}/gf/examples" ~/.gf 2>/dev/null || true- if ! retry 3 3 q_to 120 git clone https://github.com/1ndianl33t/Gf-Patterns "${dir}/Gf-Patterns"; then true; fi- cp "${dir}/Gf-Patterns"/*.json ~/.gf/ 2>/dev/null || true+ ensure_git_dir "${dir}/gf"+ if ! retry 3 3 q_to 120 git clone https://github.com/tomnomnom/gf.git "${dir}/gf"; then true; fi+ cp -r "${dir}/gf/examples" ~/.gf 2>/dev/null || true+ ensure_git_dir "${dir}/Gf-Patterns"+ if ! retry 3 3 q_to 120 git clone https://github.com/1ndianl33t/Gf-Patterns "${dir}/Gf-Patterns"; then true; fi+ cp "${dir}/Gf-Patterns"/*.json ~/.gf/ 2>/dev/null || trueelse#printf "${yellow}Updating gf patterns...${reset}\n"- if ! retry 3 3 q_to 60 git -C "${dir}/Gf-Patterns" pull; then true; fi+ ensure_git_dir "${dir}/Gf-Patterns"+ if ! retry 3 3 q_to 60 git -C "${dir}/Gf-Patterns" pull; then true; fifi- printf "\n%bRunning: Downloading required files%b\n" "$bblue" "$reset"+ header "Downloading required files"mkdir -p ${HOME}/.config/notify# Download required files with error handlingdeclare -A downloads=(- ["notify_provider_config"]="https://gist.githubusercontent.com/six2dez/23a996bca189a11e88251367e6583053/raw ${HOME}/.config/notify/provider-config.yaml"- ["getjswords"]="https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py ${tools}/getjswords.py"- ["subdomains_huge"]="https://raw.githubusercontent.com/n0kovo/n0kovo_subdomains/main/n0kovo_subdomains_huge.txt ${subs_wordlist_big}"- ["trusted_resolvers"]="https://gist.githubusercontent.com/six2dez/ae9ed7e5c786461868abd3f2344401b6/raw ${resolvers_trusted}"- ["resolvers"]="https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt ${resolvers}"- ["subs_wordlist"]="https://gist.github.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw ${subs_wordlist}"- ["permutations_list"]="https://gist.github.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw ${tools}/permutations_list.txt"- ["fuzz_wordlist"]="https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt ${fuzz_wordlist}"- ["lfi_wordlist"]="https://gist.githubusercontent.com/six2dez/a89a0c7861d49bb61a09822d272d5395/raw ${lfi_wordlist}"- ["ssti_wordlist"]="https://gist.githubusercontent.com/six2dez/ab5277b11da7369bf4e9db72b49ad3c1/raw ${ssti_wordlist}"- ["headers_inject"]="https://gist.github.com/six2dez/d62ab8f8ffd28e1c206d401081d977ae/raw ${tools}/headers_inject.txt"- ["axiom_config"]="https://gist.githubusercontent.com/six2dez/6e2d9f4932fd38d84610eb851014b26e/raw ${tools}/axiom_config.sh"+ ["notify_provider_config"]="https://gist.githubusercontent.com/six2dez/23a996bca189a11e88251367e6583053/raw ${HOME}/.config/notify/provider-config.yaml"+ ["getjswords"]="https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py ${tools}/getjswords.py"+ ["subdomains_huge"]="https://raw.githubusercontent.com/n0kovo/n0kovo_subdomains/main/n0kovo_subdomains_huge.txt ${subs_wordlist_big}"+ ["trusted_resolvers"]="https://gist.githubusercontent.com/six2dez/ae9ed7e5c786461868abd3f2344401b6/raw ${resolvers_trusted}"+ ["resolvers"]="https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt ${resolvers}"+ ["subs_wordlist"]="https://gist.github.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw ${subs_wordlist}"+ ["permutations_list"]="https://gist.github.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw ${tools}/permutations_list.txt"+ ["fuzz_wordlist"]="https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt ${fuzz_wordlist}"+ ["lfi_wordlist"]="https://gist.githubusercontent.com/six2dez/a89a0c7861d49bb61a09822d272d5395/raw ${lfi_wordlist}"+ ["ssti_wordlist"]="https://gist.githubusercontent.com/six2dez/ab5277b11da7369bf4e9db72b49ad3c1/raw ${ssti_wordlist}"+ ["headers_inject"]="https://gist.github.com/six2dez/d62ab8f8ffd28e1c206d401081d977ae/raw ${tools}/headers_inject.txt"+ ["axiom_config"]="https://gist.githubusercontent.com/six2dez/6e2d9f4932fd38d84610eb851014b26e/raw ${tools}/axiom_config.sh"["jsluice_patterns"]="https://gist.githubusercontent.com/six2dez/2aafa8dc2b682bb0081684e71900e747/raw ${tools}/jsluice_patterns.json")-+for key in "${!downloads[@]}"; do- url="${downloads[$key]% *}"- destination="${downloads[$key]#* }"-- # Skip download if provider-config.yaml already exists- if [[ "$key" == "notify_provider_config" && -f "$destination" ]]; then- printf "[%bSKIPPING%b] %s as it already exists at %s.\n" "$yellow" "$reset" "$key" "$destination"- continue- fi-- retry 3 3 q_to 120 wget -q -O "$destination" "$url" || {- printf "%b[!] Failed to download %s from %s.%b\n" "$red" "$key" "$url" "$reset"- continue- }+ url="${downloads[$key]% *}"+ destination="${downloads[$key]#* }"++ # Skip download if provider-config.yaml already exists+ if [[ $key == "notify_provider_config" && -f $destination ]]; then+ printf "[%bSKIPPING%b] %s as it already exists at %s.\n" "$yellow" "$reset" "$key" "$destination"+ continue+ fi++ # Ensure destination directory exists+ mkdir -p "$(dirname "$destination")" 2>/dev/null || true++ if with_spinner "Fetching $key" retry 3 3 q_to 120 wget -q -O "$destination" "$url"; then+ :+ else+ msg_err "Failed to download $key from $url"+ continue+ fidone+ # (removed) kiterunner routes tarball handling+# Make axiom_config.sh executablechmod +x "${tools}/axiom_config.sh" || {printf "%b[!] Failed to make axiom_config.sh executable.%b\n" "$red" "$reset"}- printf "%bRunning: Performing last configurations%b\n" "$bblue" "$reset"+ header "Final configuration"# Update resolvers if generate_resolvers is trueif [[ $generate_resolvers == true ]]; thenif [[ ! -s $resolvers || $(find "$resolvers" -mtime +1 -print) ]]; then- printf "%bChecking resolvers lists...\nAccurate resolvers are the key to great results.\nThis may take around 10 minutes if it's not updated.%b\n" "$yellow" "$reset"+ printf "%bChecking resolvers lists...\nAccurate resolvers are the key to great results.\nThis may take around 10 minutes if it's not updated.%b\n" "$yellow" "$reset"rm -f "$resolvers" &>/dev/nulldnsvalidator -tL https://public-dns.info/nameservers.txt -threads "$DNSVALIDATOR_THREADS" -o "$resolvers" &>/dev/nulldnsvalidator -tL https://raw.githubusercontent.com/blechschmidt/massdns/master/lists/resolvers.txt -threads "$DNSVALIDATOR_THREADS" -o tmp_resolvers &>/dev/null@@ -840,7 +1035,7 @@ if [[ ! -d "$HOME/.gf" ]]; then[[ ! -s $resolvers ]] && wget -q -O "$resolvers" https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt[[ ! -s $resolvers_trusted ]] && wget -q -O "$resolvers_trusted" https://gist.githubusercontent.com/six2dez/ae9ed7e5c786461868abd3f2344401b6/raw/trusted_resolvers.txt- printf "%bResolvers updated.%b\n" "$yellow" "$reset"+ printf "%bResolvers updated.%b\n" "$yellow" "$reset"figenerate_resolvers=falseelse@@ -856,15 +1051,27 @@ if [[ ! -d "$HOME/.gf" ]]; thenfind "${GOPATH}/bin" -type f -perm -u+x -exec strip -s {} \; 2>/dev/null || truefind "${GOPATH}/bin" -type f -perm -u+x -exec $SUDO cp {} /usr/local/bin/ \; 2>/dev/null || true- # Final reminders- printf "%bRemember to set your API keys:\n- subfinder (%s/.config/subfinder/provider-config.yaml)\n- GitHub (%s/Tools/.github_tokens)\n- GitLab (%s/Tools/.gitlab_tokens)\n- SSRF Server (COLLAB_SERVER in reconftw.cfg or env var)\n- Blind XSS Server (XSS_SERVER in reconftw.cfg or env var)\n- notify (%s/.config/notify/provider-config.yaml)\n- WHOISXML API (WHOISXML_API in reconftw.cfg or env var)\n%b\n" "$yellow" "$HOME" "$HOME" "$HOME" "$HOME" "$reset"- printf "%bFinished!%b\n" "$bgreen" "$reset"- printf "%b#######################################################################%b\n" "$bgreen" "$reset"+ # Final reminders (classic output)+ local final_reminder+ final_reminder="$(cat <<EOF+Remember to set your API keys:+- subfinder (${HOME}/.config/subfinder/provider-config.yaml)+- GitHub (${HOME}/Tools/.github_tokens)+- GitLab (${HOME}/Tools/.gitlab_tokens)+- SSRF Server (COLLAB_SERVER in reconftw.cfg or env var)+- Blind XSS Server (XSS_SERVER in reconftw.cfg or env var)+- notify (${HOME}/.config/notify/provider-config.yaml)+- WHOISXML API (WHOISXML_API in reconftw.cfg or env var)+EOF+)"+ printf "%b%s%b\n" "$yellow" "$final_reminder" "$reset"+ printf "%bFinished!%b\n" "$bgreen" "$reset"+ printf "%b#######################################################################%b\n" "$bgreen" "$reset"}# Function to display additional helpfunction show_additional_help() {- cat <<USAGE+ cat <<USAGEUsage: $0 [OPTIONS]Options:@@ -877,7 +1084,7 @@ Options:Without options, the script checks for updates and installs all dependencies.USAGE- exit 0+ exit 0}# Function to handle installation arguments@@ -889,25 +1096,28 @@ function handle_install_arguments() {-h | --help)show_additional_help;;- --tools)- install_tools- shift- ;;- --verbose)- VERBOSE=true- DEBUG_STD=""- DEBUG_ERROR=""- shift- ;;- --log)- LOGFILE="$2"; shift 2 || true- ;;- --force-update)- FORCE_UPDATE=true; shift- ;;- --dry-run)- DRY_RUN=true; shift- ;;+ --tools)+ TOOLS_ONLY=true+ shift+ ;;+ --verbose)+ VERBOSE=true+ DEBUG_STD=""+ DEBUG_ERROR=""+ shift+ ;;+ --log)+ LOGFILE="$2"+ shift 2 || true+ ;;+ --force-update)+ FORCE_UPDATE=true+ shift+ ;;+ --dry-run)+ DRY_RUN=true+ shift+ ;;*)printf "%bError: Invalid argument '%s'%b\n" "$bred" "$1" "$reset"echo "Use -h or --help for usage information."diff --git a/reconftw.cfg b/reconftw.cfgindex 2496a84..4f24660 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -5,8 +5,13 @@# General valuestools=$HOME/Tools # Path installed toolsSCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" # Get current script's path-profile_shell=".$(basename $(echo $SHELL))rc" # Get current shell profile-reconftw_version=$(git rev-parse --abbrev-ref HEAD)-$(git describe --tags) # Fetch current reconftw version+_detected_shell="${SHELL:-/bin/bash}"+profile_shell=".$(basename "${_detected_shell}")rc" # Get current shell profile+if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then+ reconftw_version="$(git rev-parse --abbrev-ref HEAD)-$(git describe --tags 2>/dev/null || git rev-parse --short HEAD)"+else+ reconftw_version="standalone"+fi # Fetch current reconftw versiongenerate_resolvers=false # Generate custom resolvers with dnsvalidatorupdate_resolvers=true # Fetch and rewrite resolvers from trickest/resolvers before DNS resolutionresolvers_url="https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt"@@ -19,9 +24,21 @@ upgrade_before_running=false # Upgrade tools before running#dir_output=/custom/output/path# Golang Vars (Comment or change on your own)-export GOROOT=/usr/local/go-export GOPATH=$HOME/go-export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH+export GOROOT="${GOROOT:-/usr/local/go}"+export GOPATH="${GOPATH:-$HOME/go}"+case ":${PATH}:" in+ *":$GOPATH/bin:"*) ;;+ *) PATH="$GOPATH/bin:$PATH" ;;+esac+case ":${PATH}:" in+ *":$GOROOT/bin:"*) ;;+ *) PATH="$GOROOT/bin:$PATH" ;;+esac+case ":${PATH}:" in+ *":$HOME/.local/bin:"*) ;;+ *) PATH="$HOME/.local/bin:$PATH" ;;+esac+export PATH# Rust Vars (Comment or change on your own)export PATH="$HOME/.cargo/bin:$PATH"@@ -57,6 +74,8 @@ API_LEAKS=true # Check for API leaksTHIRD_PARTIES=true # Check for 3rd parties misconfigsSPOOF=true # Check spoofable domainsMETAFINDER_LIMIT=20 # Max 250+MAIL_HYGIENE=true # Check DMARC/SPF records+CLOUD_ENUM=true # Enumerate cloud storage across providers with cloud_enum# SubdomainsSUBDOMAINS_GENERAL=true # Enable or disable the whole Subdomains module@@ -230,6 +249,41 @@ AI_MODEL="llama3:8b" # Model to useAI_REPORT_TYPE="md" # Report type to use (md, txt)AI_REPORT_PROFILE="bughunter" # Report profile to use (executive, brief, or bughunter)+# API & Advanced Web Checks+GRAPHQL_CHECK=true # Detect GraphQL endpoints and introspection+GQLSPECTION=false # Run GQLSpection deep introspection on detected GraphQL endpoints (heavier)+PARAM_DISCOVERY=true # Parameter discovery with arjun+GRPC_SCAN=false # Attempt basic gRPC reflection on common ports++# IPv6+IPV6_SCAN=true # Attempt IPv6 discovery/portscan where addresses exist++# Wordlists / threads for new modules+ARJUN_THREADS=10++# Data & Automation+ASSET_STORE=true # Append assets/findings to assets.jsonl+QUICK_RESCAN=false # Skip heavy steps if no new subdomains/webs+CHUNK_LIMIT=2000 # Split very large lists into chunks (urls, webs)+HOTLIST_TOP=50 # Number of top risky assets to highlight++# Performance+RESOLVER_IQ=false # Prefer fast/healthy resolvers (experimental)++# Intrusive controls (keep false by default)+INTRUSIVE=false # Enable intrusive cloud write/CORS tests (dangerous)++# Estimated durations for skipped heavy modules (seconds)+TIME_EST_NUCLEI=600+TIME_EST_FUZZ=900+TIME_EST_URLCHECKS=300+TIME_EST_JSCHECKS=300+TIME_EST_API=300+TIME_EST_GQL=180+TIME_EST_PARAM=240+TIME_EST_GRPC=120+TIME_EST_IIS=60+# TERM COLORSbred='\033[1;31m'bblue='\033[1;34m'@@ -239,4 +293,4 @@ red='\033[0;31m'blue='\033[0;34m'green='\033[0;32m'yellow='\033[0;33m'-reset='\033[0m'\ No newline at end of file+reset='\033[0m'diff --git a/reconftw.sh b/reconftw.shindex 9b28c36..72401a9 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -20,18 +20,28 @@ IFS=$'\n\t'# Detect if the script is being run in MacOS with Homebrew Bashif [[ $OSTYPE == "darwin"* && $BASH != "/opt/homebrew/bin/bash" ]]; then- exec /opt/homebrew/bin/bash "$0" "$@"+ exec /opt/homebrew/bin/bash "$0" "$@"fi# timeout/gtimeout compatibilityif command -v timeout >/dev/null 2>&1; then- TIMEOUT_CMD="timeout"+ TIMEOUT_CMD="timeout"elif command -v gtimeout >/dev/null 2>&1; then- TIMEOUT_CMD="gtimeout"+ TIMEOUT_CMD="gtimeout"else- TIMEOUT_CMD=""+ TIMEOUT_CMD=""fi+# --------------------------------------+# Classic UI wrappers (no tput/icons)+# --------------------------------------++pt_header() { :; }+pt_msg_run() { printf "\n%b[%s] %s%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$1" "$reset"; }+pt_msg_ok() { printf "\n%b[%s] %s%b\n" "$bgreen" "$(date +'%Y-%m-%d %H:%M:%S')" "$1" "$reset"; }+pt_msg_warn() { printf "\n%b[%s] %s%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$1" "$reset"; }+pt_msg_err() { printf "\n%b[%s] %s%b\n" "$bred" "$(date +'%Y-%m-%d %H:%M:%S')" "$1" "$reset"; }+# Ensure a safe default for early log redirections# If LOGFILE is unset or empty, send logs to /dev/null until later initialization: "${LOGFILE:=/dev/null}"@@ -95,7 +105,7 @@ function check_version() {fi# Fetch updates with a timeout (supports gtimeout on macOS)- if ! { [[ -n "$TIMEOUT_CMD" ]] && $TIMEOUT_CMD 10 git fetch >/dev/null 2>&1; } && ! git fetch >/dev/null 2>&1; then+ if ! { [[ -n $TIMEOUT_CMD ]] && $TIMEOUT_CMD 10 git fetch >/dev/null 2>&1; } && ! git fetch >/dev/null 2>&1; thenprintf "\n%bUnable to check updates (git fetch timed out).%b\n\n" "$bred" "$reset"return 1fi@@ -203,7 +213,7 @@ function tools_installed() {["zip"]="zip"["nmap"]="nmap"["dig"]="dig"- ["timeout"]="timeout"+ ["timeout"]="${TIMEOUT_CMD:-timeout}"["brutespray"]="brutespray"["xnLinkFinder"]="xnLinkFinder"["xnldorker"]="xnldorker"@@ -266,6 +276,10 @@ function tools_installed() {["cent"]="cent"["csprecon"]="csprecon"["VhostFinder"]="VhostFinder"+ ["grpcurl"]="grpcurl"+ ["arjun"]="arjun"+ ["gqlspection"]="gqlspection"+ ["cloud_enum"]="cloud_enum")# Check for tool files@@ -459,10 +473,16 @@ function metadata() {start_func "${FUNCNAME[0]}" "Scanning metadata in public files"mkdir -p ".tmp/metagoofil_${domain}/" 2>>"${LOGFILE}"- pushd "${tools}/metagoofil" >/dev/null || { printf "%b[!] Failed to change directory to %s in %s at line %s.%b\n" "${bred}" "${tools}/metagoofil" "${FUNCNAME[0]}" "${LINENO}" "${reset}"; return 1; }+ pushd "${tools}/metagoofil" >/dev/null || {+ printf "%b[!] Failed to change directory to %s in %s at line %s.%b\n" "${bred}" "${tools}/metagoofil" "${FUNCNAME[0]}" "${LINENO}" "${reset}"+ return 1+ }"${tools}/metagoofil/venv/bin/python3" "${tools}/metagoofil/metagoofil.py" -d "${domain}" -t pdf,docx,xlsx -l 10 -w -o "${dir}/.tmp/metagoofil_${domain}/" 2>>"${LOGFILE}" >/dev/null- popd >/dev/null || { printf "%b[!] Failed to return to the previous directory in %s at line %s.%b\n" "${bred}" "${FUNCNAME[0]}" "${LINENO}" "${reset}"; return 1; }-+ popd >/dev/null || {+ printf "%b[!] Failed to return to the previous directory in %s at line %s.%b\n" "${bred}" "${FUNCNAME[0]}" "${LINENO}" "${reset}"+ return 1+ }+exiftool -r .tmp/metagoofil_${domain}/* 2>>"${LOGFILE}" | tee /dev/null | egrep -i "Author|Creator|Email|Producer|Template" | sort -u | anew -q "osint/metadata_results.txt"end_func "Results are saved in ${domain}/osint/[software/authors/metadata_results].txt" "${FUNCNAME[0]}"@@ -637,7 +657,7 @@ function third_party_misconfigs() {"$bred" "${FUNCNAME[0]}" "$LINENO" "$reset"return 1fi-+end_func "Results are saved in $domain/osint/3rdparts_misconfigurations.txt" "${FUNCNAME[0]}"else@@ -695,6 +715,55 @@ function spoof() {fi}+function mail_hygiene() {+ mkdir -p osint++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } &&+ [[ $MAIL_HYGIENE == true ]] && [[ $OSINT == true ]] &&+ ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then++ start_func "${FUNCNAME[0]}" "Mail hygiene (SPF/DMARC)"+ {+ printf "Domain: %s\n" "$domain"+ printf "\nTXT records:\n"+ dig +short TXT "$domain" | sed 's/^/ /'+ printf "\nDMARC record:\n"+ dig +short TXT "_dmarc.$domain" | sed 's/^/ /'+ } >"osint/mail_hygiene.txt" 2>>"$LOGFILE"+ end_func "Results are saved in $domain/osint/mail_hygiene.txt" "${FUNCNAME[0]}"+ else+ if [[ $MAIL_HYGIENE == false ]] || [[ $OSINT == false ]]; then+ printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then+ return+ else+ printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s %b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "$reset"+ fi+ fi+}++function cloud_enum_scan() {+ mkdir -p osint++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } &&+ [[ $CLOUD_ENUM == true ]] && [[ $OSINT == true ]] &&+ ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then++ start_func "${FUNCNAME[0]}" "Cloud storage enumeration"+ company_name=$(unfurl format %r <<<"$domain")+ cloud_enum -k "$company_name" -k "$domain" -k "${domain%%.*}" 2>>"$LOGFILE" | anew -q osint/cloud_enum.txt+ end_func "Results are saved in $domain/osint/cloud_enum.txt" "${FUNCNAME[0]}"+ else+ if [[ $CLOUD_ENUM == false ]] || [[ $OSINT == false ]]; then+ printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then+ return+ else+ printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s %b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "$reset"+ fi+ fi+}+function ip_info() {mkdir -p osint@@ -872,6 +941,21 @@ function subdomains_full() {printf "%b[%s] Results are saved in %s/subdomains/subdomains.txt and webs/webs.txt%b\n" "$bblue" "$(date +'%Y-%m-%d %H:%M:%S')" "$domain" "$reset"printf "%b#######################################################################%b\n\n" "$bgreen" "$reset"+ # Emit plugin event+ plugins_emit after_subdomains "$domain" "$dir"++ # Persist counts for quick-rescan logic+ echo "$NUMOFLINES_subs" >.tmp/subs_new_count+ echo "$NUMOFLINES_probed" >.tmp/webs_new_count++ # Asset store: append new subdomains+ if [[ -s .tmp/subdomains_old.txt ]]; then+ comm -13 <(sort -u .tmp/subdomains_old.txt) <(sort -u subdomains/subdomains.txt) | sed '/^$/d' >.tmp/subs_new_only.txt+ append_assets_from_file subdomain name .tmp/subs_new_only.txt+ else+ append_assets_from_file subdomain name subdomains/subdomains.txt+ fi+}function sub_passive() {@@ -985,6 +1069,7 @@ function sub_active() {printf "%b[!] resolvers_update_quick_local command failed.%b\n" "$bred" "$reset"return 1fi+ [[ $RESOLVER_IQ == true ]] && resolvers_optimize_local# Resolve subdomains using purednsif [[ -s ".tmp/subs_no_resolved.txt" ]]; then@@ -1078,6 +1163,7 @@ function sub_tls() {printf "%b[!] resolvers_update_quick_local command failed.%b\n" "$bred" "$reset"return 1fi+ [[ $RESOLVER_IQ == true ]] && resolvers_optimize_localif [[ -s ".tmp/subdomains_tlsx_clean.txt" ]]; thenpuredns resolve .tmp/subdomains_tlsx_clean.txt -w .tmp/subdomains_tlsx_resolved.txt \-r "$resolvers" --resolvers-trusted "$resolvers_trusted" \@@ -2256,11 +2342,8 @@ function subtakeover() {fi#cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null-if [[ $AXIOM != true ]]; then- if ! nuclei -update 2>>"$LOGFILE" >/dev/null; then- printf "%b[!] Failed to update nuclei.%b\n" "$bred" "$reset"- fi+ maybe_update_nucleicat subdomains/subdomains.txt webs/webs_all.txt 2>/dev/null | nuclei -silent -nh -tags takeover \-severity info,low,medium,high,critical -retries 3 -rl "$NUCLEI_RATELIMIT" \-t "${NUCLEI_TEMPLATES_PATH}" -j -o .tmp/tko_json.txt 2>>"$LOGFILE" >/dev/null@@ -2530,11 +2613,15 @@ function s3buckets() {elif echo "$line" | grep -q "Google Cloud"; then# Google Cloud Storagebucket_name=$(echo "$line" | awk '{print $3}')- trufflehog gcs --bucket="$bucket_name" -j 2>/dev/null | jq -c | anew -q subdomains/cloudhunter_buckets_trufflehog.txt+ trufflehog gcs --project-id="$bucket_name" -j 2>/dev/null | jq -c | anew -q subdomains/cloudhunter_buckets_trufflehog.txtfidone <subdomains/cloudhunter_open_buckets.txtfi+ # Append cloud assets to asset store+ append_assets_from_file cloud asset subdomains/cloudhunter_open_buckets.txt+ append_assets_from_file cloud s3bucket subdomains/s3buckets.txt+end_func "Results are saved in subdomains/s3buckets.txt, subdomains/cloud_assets.txt, subdomains/s3buckets_trufflehog.txt, and subdomains/cloudhunter_buckets_trufflehog.txt" "${FUNCNAME[0]}"elseif [[ $S3BUCKETS == false ]]; then@@ -2548,6 +2635,60 @@ function s3buckets() {fi}+function cloud_extra_providers() {+ mkdir -p subdomains .tmp++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then+ start_func "${FUNCNAME[0]}" "Extra cloud providers checks"+ # Candidate names from domain and subdomains+ company=$(unfurl format %r <<<"$domain")+ printf "%s\n%s\n${domain%%.*}" "$company" "$domain" | sed 's/[^a-zA-Z0-9-]//g' | awk 'length>2' | sort -u >.tmp/cloudnames.txt+ [[ -s subdomains/subdomains.txt ]] && awk -F. -v r=$(echo "$domain" | awk -F. '{print $(NF-1)"."$NF}') '{print $(NF-2)}' subdomains/subdomains.txt 2>/dev/null | sed 's/[^a-zA-Z0-9-]//g' | awk 'length>2' | sort -u >>.tmp/cloudnames.txt+ sed -i 's/^\///; s/\.$//' .tmp/cloudnames.txt+ sort -u .tmp/cloudnames.txt -o .tmp/cloudnames.txt++ # Common container names for Azure (best-effort)+ printf "public\nstatic\nmedia\nimages\nassets\nbackup\nbackups\nfiles\ncdn" >.tmp/azcontainers.txt++ : >subdomains/cloud_extra.txt++ while IFS= read -r name; do+ # GCS+ for u in \+ "https://storage.googleapis.com/$name/" \+ "https://$name.storage.googleapis.com/"; do+ code=$(curl -sk -o /dev/null -w '%{http_code}' "$u" || true)+ if [[ $code =~ ^20|403$ ]]; then printf "GCS %s %s\n" "$name" "$u" | anew -q subdomains/cloud_extra.txt; fi+ done++ # Azure Blob (requires container; try a few)+ while IFS= read -r c; do+ u="https://$name.blob.core.windows.net/$c?restype=container&comp=list"+ code=$(curl -sk -o /dev/null -w '%{http_code}' "$u" || true)+ if [[ $code =~ ^20|403$ ]]; then printf "AZURE %s %s\n" "$name/$c" "$u" | anew -q subdomains/cloud_extra.txt; fi+ done <.tmp/azcontainers.txt++ # DigitalOcean Spaces (regional)+ for r in ams3 nyc3 sfo3 sgp1 fra1 blr1; do+ u="https://$name.$r.digitaloceanspaces.com/"+ code=$(curl -sk -o /dev/null -w '%{http_code}' "$u" || true)+ if [[ $code =~ ^20|403$ ]]; then printf "DOSPACE %s %s\n" "$name.$r" "$u" | anew -q subdomains/cloud_extra.txt; fi+ done++ # Backblaze B2 (best-effort listing)+ u="https://f000.backblazeb2.com/file/$name/"+ code=$(curl -sk -o /dev/null -w '%{http_code}' "$u" || true)+ if [[ $code =~ ^20|403$ ]]; then printf "B2 %s %s\n" "$name" "$u" | anew -q subdomains/cloud_extra.txt; fi++ done <.tmp/cloudnames.txt++ append_assets_from_file cloud asset subdomains/cloud_extra.txt+ end_func "Results are saved in subdomains/cloud_extra.txt" "${FUNCNAME[0]}"+ else+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped or already processed.${reset}\n"+ fi+}+############################################################################################################################################################ GEOLOCALIZATION INFO ###########################################################################################################################################################@@ -2657,6 +2798,12 @@ function webprobe_simple() {sed 's/*.//' | anew -q .tmp/probed_tmp.txtfi+ # Adaptive throttling heuristics: mark slow hosts (429/403) from httpx+ if [[ -s "webs/web_full_info.txt" ]]; then+ jq -r 'try select(.status_code==403 or .status_code==429) | .url' webs/web_full_info.txt 2>/dev/null |+ awk -F/ '{print $3}' | sed 's/\:$//' | sort -u >.tmp/slow_hosts.txt+ fi+# Extract web info to plain textif [[ -s "webs/web_full_info.txt" ]]; thenjq -r 'try . |"\(.url) [\(.status_code)] [\(.title)] [\(.webserver)] \(.tech)"' webs/web_full_info.txt |@@ -2681,6 +2828,9 @@ function webprobe_simple() {# Update webs_all.txtcat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ # Asset store: append probed webs+ append_assets_from_file web url webs/webs.txt+end_subfunc "${NUMOFLINES} new websites resolved" "${FUNCNAME[0]}"# Send websites to proxy if conditions met@@ -2691,14 +2841,15 @@ function webprobe_simple() {elseif [[ $WEBPROBESIMPLE == false ]]; then- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"else- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi+ # Emit plugin event+ plugins_emit after_webprobe "$domain" "$dir"+}function webprobe_full() {@@ -2785,11 +2936,9 @@ function webprobe_full() {end_func "Results are saved in $domain/webs/webs_uncommon_ports.txt" "${FUNCNAME[0]}"elseif [[ $WEBPROBEFULL == false ]]; then- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"else- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -2825,11 +2974,9 @@ function screenshot() {end_func "Results are saved in $domain/screenshots" "${FUNCNAME[0]}"elseif [[ $WEBSCREENSHOT == false ]]; then- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"else- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -2993,6 +3140,16 @@ function portscan() {ips_file="${dir}/hosts/ips.txt"+ # Discover IPv6 addresses from DNS JSON if enabled+ if [[ $IPV6_SCAN == true ]]; then+ if [[ -s "subdomains/subdomains_dnsregs.json" ]]; then+ jq -r '.. | strings | select(test("^[0-9a-fA-F:]+$"))' <"subdomains/subdomains_dnsregs.json" |+ grep -v '\\.' | sort -u | anew -q hosts/ips_v6.txt+ fi+ # Add target if it's an IPv6 literal+ if [[ $domain =~ : ]]; then echo "$domain" | anew -q hosts/ips_v6.txt; fi+ fi+if [[ $PORTSCAN_PASSIVE == true ]]; thenif [[ ! -f $ips_file ]]; thenprintf "%b[!] File %s does not exist.%b\n" "$bred" "$ips_file" "$reset"@@ -3028,6 +3185,9 @@ function portscan() {if [[ -s ".tmp/ips_nocdn.txt" ]]; then$SUDO nmap $PORTSCAN_ACTIVE_OPTIONS -iL .tmp/ips_nocdn.txt -oA hosts/portscan_active 2>>"$LOGFILE" >/dev/nullfi+ if [[ $IPV6_SCAN == true && -s "hosts/ips_v6.txt" ]]; then+ $SUDO nmap -6 $PORTSCAN_ACTIVE_OPTIONS -iL hosts/ips_v6.txt -oA hosts/portscan_active_v6 2>>"$LOGFILE" >/dev/null+ fielseif [[ -s ".tmp/ips_nocdn.txt" ]]; thenaxiom-scan .tmp/ips_nocdn.txt -m nmapx $PORTSCAN_ACTIVE_OPTIONS \@@ -3039,6 +3199,10 @@ function portscan() {if [[ -s "hosts/portscan_active.xml" ]]; thennmapurls <hosts/portscan_active.xml 2>>"$LOGFILE" | anew -q hosts/webs.txtfi+ if [[ -s "hosts/portscan_active_v6.xml" ]]; then+ nmapurls <hosts/portscan_active_v6.xml 2>>"$LOGFILE" | anew -q hosts/webs_v6.txt+ [[ -s hosts/webs_v6.txt ]] && cat hosts/webs_v6.txt | anew -q webs/webs.txt+ fiif [[ $FARADAY == true ]]; then# Check if the Faraday server is running@@ -3058,6 +3222,7 @@ function portscan() {finotification "Webs detected from port scan: ${NUMOFLINES} new websites" "good"cat hosts/webs.txt+ append_assets_from_file web url hosts/webs.txtfiend_func "Results are saved in hosts/portscan_[passive|active|shodan].[txt|xml]" "${FUNCNAME[0]}"@@ -3176,12 +3341,12 @@ function waf_checks() {else# Handle cases where WAF_DETECTION is false or the function has already been processedif [[ $WAF_DETECTION == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then# Domain is an IP address; skip the functionreturnelse- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -3199,8 +3364,8 @@ function nuclei_check() {if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $NUCLEICHECK == true ]]; thenstart_func "${FUNCNAME[0]}" "Templates-based Web Scanner"#cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null- # Update nuclei templates- nuclei -update 2>>"$LOGFILE" >/dev/null+ # Update nuclei templates once per run+ maybe_update_nuclei# Handle multi mode and initialize subdomains.txt if necessaryif [[ -n $multi ]] && [[ ! -f "$dir/subdomains/subdomains.txt" ]]; then@@ -3218,6 +3383,29 @@ function nuclei_check() {cat subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" >.tmp/webs_subs.txtfi+ # Prepare WAF-aware lists+ WAF_LIST=.tmp/webs_waf.txt+ NOWAF_LIST=.tmp/webs_nowaf.txt+ if [[ -s webs/webs_wafs.txt ]]; then+ cut -d';' -f1 webs/webs_wafs.txt | sed 's/https\?:\/\///' | sed 's/\/$//' | sort -u >.tmp/waf_hosts.txt+ awk -F/ '{print $3}' .tmp/webs_subs.txt | sed 's/\:$//' | while read -r host; do+ if grep -q "^$host$" .tmp/waf_hosts.txt; then+ grep "://${host}[:/\n]" .tmp/webs_subs.txt | anew -q "$WAF_LIST"+ else+ grep "://${host}[:/\n]" .tmp/webs_subs.txt | anew -q "$NOWAF_LIST"+ fi+ done+ else+ cp .tmp/webs_subs.txt "$NOWAF_LIST"+ fi++ # Include slow hosts (429/403) into WAF list as well+ if [[ -s .tmp/slow_hosts.txt ]]; then+ while read -r host; do+ grep "://${host}[:/\n]" .tmp/webs_subs.txt | anew -q "$WAF_LIST"+ done <.tmp/slow_hosts.txt+ fi+# Check if AXIOM is enabledif [[ $AXIOM != true ]]; then# Split severity levels into an array@@ -3225,11 +3413,22 @@ function nuclei_check() {for crit in "${severity_array[@]}"; doprintf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Severity: $crit ${reset}\n\n"- # Run nuclei for each severity level- nuclei -l .tmp/webs_subs.txt -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH} -j -o "nuclei_output/${crit}_json.txt" 2>>"$LOGFILE" >/dev/null+ # Non-WAF at default rate+ if [[ -s $NOWAF_LIST ]]; then+ nuclei -l "$NOWAF_LIST" -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH} -j -o "nuclei_output/${crit}_json.txt" 2>>"$LOGFILE" >/dev/null+ fi+ # WAF hosts at slower rate+ if [[ -s $WAF_LIST ]]; then+ local slow_rl+ slow_rl=$((NUCLEI_RATELIMIT / 3 + 1))+ nuclei -l "$WAF_LIST" -severity "$crit" -nh -rl "$slow_rl" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH} -j -o "nuclei_output/${crit}_waf_json.txt" 2>>"$LOGFILE" >/dev/null+ [[ -s nuclei_output/${crit}_waf_json.txt ]] && cat nuclei_output/${crit}_waf_json.txt >>nuclei_output/${crit}_json.txt+ fi# Parse the JSON output and save the results to a text fileif [[ -s "nuclei_output/${crit}_json.txt" ]]; thenjq -r '["[" + .["template-id"] + (if .["matcher-name"] != null then ":" + .["matcher-name"] else "" end) + "] [" + .["type"] + "] [" + .info.severity + "] " + (.["matched-at"] // .host) + (if .["extracted-results"] != null then " " + (.["extracted-results"] | @json) else "" end)] | .[]' nuclei_output/${crit}_json.txt >nuclei_output/${crit}.txt+ # Asset store: append findings+ append_assets_from_file finding value nuclei_output/${crit}.txt# Display the results if the output file exists and is not emptyif [[ -s "nuclei_output/${crit}.txt" ]]; thencat "nuclei_output/${crit}.txt"@@ -3274,18 +3473,108 @@ function nuclei_check() {fiend_func "Results are saved in $domain/nuclei_output folder" "${FUNCNAME[0]}"++ # Emit plugin event+ plugins_emit after_nuclei "$domain" "$dir"else# Handle cases where NUCLEICHECK is false or the function has already been processedif [[ $NUCLEICHECK == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then# Domain is an IP address; skip the functionreturn+ else+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"+ fi+ fi++}++function graphql_scan() {+ # Detect GraphQL endpoints and introspection+ mkdir -p .tmp webs nuclei_output vulns/graphql++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $GRAPHQL_CHECK == true ]]; then+ start_func "${FUNCNAME[0]}" "GraphQL detection"+ # Prepare input+ [[ ! -s .tmp/webs_subs.txt ]] && cat subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" >.tmp/webs_subs.txt+ maybe_update_nuclei+ if [[ -s .tmp/webs_subs.txt ]]; then+ nuclei -l .tmp/webs_subs.txt -tags graphql -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 -t ${NUCLEI_TEMPLATES_PATH} -j -o nuclei_output/graphql_json.txt 2>>"$LOGFILE" >/dev/null+ if [[ -s nuclei_output/graphql_json.txt ]]; then+ jq -r '["[" + .["template-id"] + "] [" + .info.severity + "] " + (.["matched-at"] // .host)] | .[]' nuclei_output/graphql_json.txt >nuclei_output/graphql.txt+ # Optionally run GQLSpection on endpoints+ if [[ $GQLSPECTION == true ]]; then+ jq -r '.["matched-at"] // .host' nuclei_output/graphql_json.txt | sort -u | while read -r ep; do+ [[ -z $ep ]] && continue+ hostfile="vulns/graphql/$(echo "$ep" | sed 's|^[^/]*//||; s|/.*$||')"+ mkdir -p "$(dirname "$hostfile")" 2>>"$LOGFILE" || true+ gqlspection -t "$ep" -o "${hostfile}.json" 2>>"$LOGFILE" >/dev/null || true+ done+ fi+ fi+ fi+ end_func "Results are saved in nuclei_output/graphql* and vulns/graphql" "${FUNCNAME[0]}"+ else+ if [[ $GRAPHQL_CHECK == false ]]; then+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ else+ printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"+ fi+ fi+}++function param_discovery() {+ mkdir -p webs .tmp++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $PARAM_DISCOVERY == true ]]; then+ start_func "${FUNCNAME[0]}" "Parameter discovery (arjun)"+ local input_file="webs/url_extract_nodupes.txt"+ [[ ! -s $input_file ]] && input_file="webs/webs_all.txt"+ if [[ -s $input_file ]]; then+ arjun -i "$input_file" -t "$ARJUN_THREADS" -oJ .tmp/arjun.json 2>>"$LOGFILE" >/dev/null || true+ if [[ -s .tmp/arjun.json ]]; then+ jq -r '..|.url? // empty' .tmp/arjun.json | sed 's/^/URL: /' | anew -q webs/params_discovered.txt+ jq -r '..|.params? // empty | to_entries[] | .key' .tmp/arjun.json | sed 's/^/PARAM: /' | sort -u | anew -q webs/params_discovered.txt+ fi+ fi+ end_func "Results are saved in webs/params_discovered.txt" "${FUNCNAME[0]}"+ else+ if [[ $PARAM_DISCOVERY == false ]]; then+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"elseprintf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"fifi+}+function grpc_reflection() {+ mkdir -p hosts .tmp++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $GRPC_SCAN == true ]]; then+ start_func "${FUNCNAME[0]}" "gRPC reflection probing"+ # Build target IP list+ local ips_file="hosts/ips.txt"+ local targets=()+ [[ -s $ips_file ]] && targets+=($(cat "$ips_file"))+ [[ -s "hosts/ips_v6.txt" ]] && targets+=($(cat "hosts/ips_v6.txt"))+ printf "%s\n" "${targets[@]}" | sort -u >.tmp/grpc_ips.txt+ if [[ -s .tmp/grpc_ips.txt ]]; then+ # Probe common plaintext gRPC ports+ while read -r ip; do+ for p in 50051 50052; do+ grpcurl -plaintext -max-msg-sz 10485760 -d '{}' "$ip:$p" list 2>>"$LOGFILE" | sed "s/^/[$ip:$p] /" | anew -q hosts/grpc_reflection.txt || true+ done+ done <.tmp/grpc_ips.txt+ fi+ end_func "Results are saved in hosts/grpc_reflection.txt" "${FUNCNAME[0]}"+ else+ if [[ $GRPC_SCAN == false ]]; then+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ else+ printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"+ fi+ fi}function fuzz() {@@ -3316,7 +3605,30 @@ function fuzz() {if [[ -s "webs/webs_all.txt" ]]; thenif [[ $AXIOM != true ]]; then- interlace -tL webs/webs_all.txt -threads ${INTERLACE_THREADS} -c "ffuf ${FFUF_FLAGS} -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_/FUZZ -o _output_/_cleantarget_.json" -o $dir/.tmp/fuzzing 2>>"$LOGFILE" >/dev/null+ # Split targets by slow hosts+ >.tmp/webs_slow.txt+ >.tmp/webs_normal.txt+ if [[ -s .tmp/slow_hosts.txt ]]; then+ while read -r host; do+ grep "://${host}[:/\n]" webs/webs_all.txt | anew -q .tmp/webs_slow.txt+ done <.tmp/slow_hosts.txt+ comm -23 <(sort -u webs/webs_all.txt) <(sort -u .tmp/webs_slow.txt) >.tmp/webs_normal.txt+ else+ cp webs/webs_all.txt .tmp/webs_normal.txt+ fi++ # Normal targets+ if [[ -s .tmp/webs_normal.txt ]]; then+ interlace -tL .tmp/webs_normal.txt -threads ${INTERLACE_THREADS} -c "ffuf ${FFUF_FLAGS} -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_/FUZZ -o _output_/_cleantarget_.json" -o $dir/.tmp/fuzzing 2>>"$LOGFILE" >/dev/null+ fi+ # Slow targets with reduced threads/rate+ if [[ -s .tmp/webs_slow.txt ]]; then+ slow_threads=$((FFUF_THREADS / 3))+ [[ $slow_threads -lt 5 ]] && slow_threads=5+ slow_rate=$FFUF_RATELIMIT+ [[ ${FFUF_RATELIMIT:-0} -eq 0 ]] && slow_rate=50 || slow_rate=$((FFUF_RATELIMIT / 3 + 1))+ interlace -tL .tmp/webs_slow.txt -threads ${INTERLACE_THREADS} -c "ffuf ${FFUF_FLAGS} -t ${slow_threads} -rate ${slow_rate} -H \"${HEADER}\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_/FUZZ -o _output_/_cleantarget_.json" -o $dir/.tmp/fuzzing 2>>"$LOGFILE" >/dev/null+ fifor sub in $(cat webs/webs_all.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')@@ -3340,9 +3652,9 @@ function fuzz() {elseif [[ $FUZZ == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -3469,12 +3781,12 @@ function cms_scanner() {else# Handle cases where CMS_SCANNER is false or the function has already been processedif [[ $CMS_SCANNER == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then# Domain is an IP address; skip the functionreturnelse- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi}@@ -3512,10 +3824,55 @@ function urlchecks() {diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt 2>>"$LOGFILE") <(sort -u webs/webs_all.txt 2>>"$LOGFILE") | wc -l)if [[ $diff_webs != "0" ]] || [[ ! -s ".tmp/katana.txt" ]]; thenif [[ $URL_CHECK_ACTIVE == true ]]; then- if [[ $DEEP == true ]]; then- timeout 4h katana -silent -list webs/webs_all.txt -jc -kf all -c "$KATANA_THREADS" -d 3 -fs rdn -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ # Split slow vs normal targets based on httpx status (403/429)+ >.tmp/katana_targets_slow.txt+ >.tmp/katana_targets_normal.txt+ if [[ -s .tmp/slow_hosts.txt ]]; then+ while read -r host; do+ grep "://${host}[:/\n]" webs/webs_all.txt | anew -q .tmp/katana_targets_slow.txt+ done <.tmp/slow_hosts.txt+ comm -23 <(sort -u webs/webs_all.txt) <(sort -u .tmp/katana_targets_slow.txt) >.tmp/katana_targets_normal.txtelse- timeout 3h katana -silent -list webs/webs_all.txt -jc -kf all -c "$KATANA_THREADS" -d 2 -fs rdn -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ cp webs/webs_all.txt .tmp/katana_targets_normal.txt+ fi++ >.tmp/katana.txt+ # Normal targets+ if [[ -s .tmp/katana_targets_normal.txt ]]; then+ LINES=$(wc -l <.tmp/katana_targets_normal.txt)+ if [[ $LINES -gt ${CHUNK_LIMIT:-2000} ]]; then+ if [[ $DEEP == true ]]; then+ process_in_chunks .tmp/katana_targets_normal.txt ${CHUNK_LIMIT:-2000} "katana -silent -list _chunk_ -jc -kf all -c $KATANA_THREADS -d 3 -fs rdn >> .tmp/katana.txt 2>>\"$LOGFILE\" >/dev/null"+ else+ process_in_chunks .tmp/katana_targets_normal.txt ${CHUNK_LIMIT:-2000} "katana -silent -list _chunk_ -jc -kf all -c $KATANA_THREADS -d 2 -fs rdn >> .tmp/katana.txt 2>>\"$LOGFILE\" >/dev/null"+ fi+ else+ if [[ $DEEP == true ]]; then+ timeout 4h katana -silent -list .tmp/katana_targets_normal.txt -jc -kf all -c "$KATANA_THREADS" -d 3 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ else+ timeout 3h katana -silent -list .tmp/katana_targets_normal.txt -jc -kf all -c "$KATANA_THREADS" -d 2 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ fi+ fi+ fi++ # Slow targets with reduced concurrency+ if [[ -s .tmp/katana_targets_slow.txt ]]; then+ slow_c=$((KATANA_THREADS / 3))+ [[ $slow_c -lt 2 ]] && slow_c=2+ LINES=$(wc -l <.tmp/katana_targets_slow.txt)+ if [[ $LINES -gt ${CHUNK_LIMIT:-2000} ]]; then+ if [[ $DEEP == true ]]; then+ process_in_chunks .tmp/katana_targets_slow.txt ${CHUNK_LIMIT:-2000} "katana -silent -list _chunk_ -jc -kf all -c $slow_c -d 3 -fs rdn >> .tmp/katana.txt 2>>\"$LOGFILE\" >/dev/null"+ else+ process_in_chunks .tmp/katana_targets_slow.txt ${CHUNK_LIMIT:-2000} "katana -silent -list _chunk_ -jc -kf all -c $slow_c -d 2 -fs rdn >> .tmp/katana.txt 2>>\"$LOGFILE\" >/dev/null"+ fi+ else+ if [[ $DEEP == true ]]; then+ timeout 4h katana -silent -list .tmp/katana_targets_slow.txt -jc -kf all -c "$slow_c" -d 3 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ else+ timeout 3h katana -silent -list .tmp/katana_targets_slow.txt -jc -kf all -c "$slow_c" -d 2 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ fi+ fifififi@@ -3556,6 +3913,8 @@ function urlchecks() {NUMOFLINES=0finotification "${NUMOFLINES} new URLs with parameters" "info"+ # Asset store: append new URLs+ append_assets_from_file url value webs/url_extract.txtelseNUMOFLINES=0fi@@ -3572,11 +3931,9 @@ function urlchecks() {fielseif [[ $URL_CHECK == false ]]; then- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"else- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -3822,16 +4179,61 @@ function jschecks() {end_func "No JS files to process" "${FUNCNAME[0]}"elseif [[ $JSCHECKS == false ]]; then- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"else- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi}+function websocket_checks() {+ mkdir -p webs vulns .tmp++ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $URL_CHECK == true ]]; then+ start_func "${FUNCNAME[0]}" "WebSocket discovery and handshake"+ # Collect ws/wss endpoints from JS endpoints and URLs+ touch .tmp/ws_endpoints_raw.txt+ [[ -s js/js_endpoints.txt ]] && grep -aEo 'wss?://[^ ]+' js/js_endpoints.txt | anew -q .tmp/ws_endpoints_raw.txt+ [[ -s webs/url_extract.txt ]] && grep -aEo 'wss?://[^ ]+' webs/url_extract.txt | anew -q .tmp/ws_endpoints_raw.txt+ if [[ -s .tmp/ws_endpoints_raw.txt ]]; then+ # Normalize and de-dup+ cat .tmp/ws_endpoints_raw.txt | sed 's/\"//g' | sed 's/[\]\[ ]//g' | sort -u >.tmp/ws_endpoints.txt+ # Handshake test and origin check+ while IFS= read -r ws; do+ [[ -z $ws ]] && continue+ url_no_proto=$(echo "$ws" | sed 's|^wss\?://||')+ host=$(echo "$url_no_proto" | cut -d'/' -f1)+ # Prepare Sec-WebSocket headers for accurate handshake+ wskey=$(head -c 16 /dev/urandom | base64 2>/dev/null || echo dGVzdGtleQ==)+ code=$(curl -sk --http1.1 -o /dev/null -w '%{http_code}' \+ -H 'Connection: Upgrade' -H 'Upgrade: websocket' \+ -H "Host: $host" \+ -H "Sec-WebSocket-Key: $wskey" \+ -H 'Sec-WebSocket-Version: 13' \+ "$ws" || true)+ if [[ $code == "101" ]]; then+ printf "HANDSHAKE %s\n" "$ws" | anew -q vulns/websockets.txt+ # Origin test: send a cross-origin header, expect failure ideally+ wskey2=$(head -c 16 /dev/urandom | base64 2>/dev/null || echo dGVzdGtleQ==)+ code2=$(curl -sk --http1.1 -o /dev/null -w '%{http_code}' \+ -H 'Connection: Upgrade' -H 'Upgrade: websocket' \+ -H "Origin: https://evil.example" -H "Host: $host" \+ -H "Sec-WebSocket-Key: $wskey2" \+ -H 'Sec-WebSocket-Version: 13' \+ "$ws" || true)+ if [[ $code2 == "101" ]]; then+ printf "ORIGIN-ALLOWED %s\n" "$ws" | anew -q vulns/websocket_misconfig.txt+ fi+ fi+ done <.tmp/ws_endpoints.txt+ fi+ end_func "Results are saved in vulns/websocket_misconfig.txt" "${FUNCNAME[0]}"+ else+ printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped or already processed.${reset}\n"+ fi+}+function wordlist_gen() {# Create necessary directories@@ -4042,12 +4444,12 @@ function brokenLinks() {else# Handle cases where BROKENLINKS is false or function already processedif [[ $BROKENLINKS == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then# Domain is an IP address; skip the functionreturnelse- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4124,11 +4526,11 @@ function xss() {else# Handle cases where XSS is false, no vulnerable URLs, or already processedif [[ $XSS == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/xss.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to XSS ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for XSS"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4167,11 +4569,11 @@ function cors() {else# Handle cases where CORS is false, no vulnerable URLs, or already processedif [[ $CORS == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/xss.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs available for CORS Scan.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for CORS"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4214,11 +4616,11 @@ function open_redirect() {else# Handle cases where OPEN_REDIRECT is false, no vulnerable URLs, or already processedif [[ $OPEN_REDIRECT == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/redirect.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to Open Redirect.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for open redirect"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4301,11 +4703,11 @@ function ssrf_checks() {else# Handle cases where SSRF_CHECKS is false, no vulnerable URLs, or already processedif [[ $SSRF_CHECKS == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/ssrf.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to SSRF.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for SSRF"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4346,11 +4748,11 @@ function crlf_checks() {else# Handle cases where CRLF_CHECKS is false, no vulnerable URLs, or already processedif [[ $CRLF_CHECKS == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/crlf.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to CRLF.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for CRLF"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4398,11 +4800,11 @@ function lfi() {else# Handle cases where LFI is false, no vulnerable URLs, or already processedif [[ $LFI == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/lfi.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to LFI.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for LFI"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4450,11 +4852,11 @@ function ssti() {else# Handle cases where SSTI is false, no vulnerable URLs, or already processedif [[ $SSTI == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/ssti.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to SSTI.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for SSTI"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4509,11 +4911,11 @@ function sqli() {else# Handle cases where SQLI is false, no vulnerable URLs, or already processedif [[ $SQLI == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/sqli.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to SQLi.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for SQLi"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4547,11 +4949,11 @@ function test_ssl() {else# Handle cases where TEST_SSL is false, no vulnerable URLs, or already processedif [[ $TEST_SSL == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/testssl.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to SSL issues.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate targets for SSL tests"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4588,11 +4990,11 @@ function spraying() {else# Handle cases where SPRAY is false, required files are missing, or already processedif [[ $SPRAY == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "$dir/hosts/portscan_active.gnmap" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No active port scan results found.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: missing active port scan"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4642,11 +5044,11 @@ function command_injection() {else# Handle cases where COMM_INJ is false, no vulnerable URLs, or already processedif [[ $COMM_INJ == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "gf/rce.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to Command Injection.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for command injection"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4706,11 +5108,11 @@ function 4xxbypass() {else# Handle cases where BYPASSER4XX is false, no vulnerable URLs, or already processedif [[ $BYPASSER4XX == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "fuzzing/fuzzing_full.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to 4xx bypass.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for 4xx bypass"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4760,11 +5162,11 @@ function prototype_pollution() {else# Handle cases where PROTO_POLLUTION is false, no vulnerable URLs, or already processedif [[ $PROTO_POLLUTION == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "webs/url_extract_nodupes.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to Prototype Pollution.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for prototype pollution"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4830,11 +5232,11 @@ function smuggling() {else# Handle cases where SMUGGLING is false, no vulnerable URLs, or already processedif [[ $SMUGGLING == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "webs/webs_all.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to HTTP Request Smuggling.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for HTTP request smuggling"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4897,11 +5299,11 @@ function webcache() {else# Handle cases where WEBCACHE is false, no vulnerable URLs, or already processedif [[ $WEBCACHE == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "fuzzing/fuzzing_full.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to Web Cache Poisoning.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for web cache tests"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -4930,12 +5332,8 @@ function fuzzparams() {if [[ $AXIOM != true ]]; thenprintf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Setup and Execution${reset}\n\n"- # Update Nuclei- if ! nuclei -update 2>>"$LOGFILE" >/dev/null; then- printf "%b[!] Nuclei update failed.%b\n" "$bred" "$reset"- end_func "Nuclei update failed." "${FUNCNAME[0]}"- return 1- fi+ # Update Nuclei once per run+ maybe_update_nuclei# Pull latest fuzzing templatesif ! git -C ${NUCLEI_FUZZING_TEMPLATES_PATH} pull 2>>"$LOGFILE"; then@@ -4990,11 +5388,11 @@ function fuzzparams() {else# Handle cases where FUZZPARAMS is false, no vulnerable URLs, or already processedif [[ $FUZZPARAMS == false ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"+ pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"elif [[ ! -s "webs/url_extract_nodupes.txt" ]]; then- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped: No URLs potentially vulnerable to Fuzzing Parameters.${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} skipped: no candidate URLs for parameter fuzzing"else- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} has already been processed. To force execution, delete:\n $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ pt_msg_warn "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"fifi@@ -5059,7 +5457,7 @@ function output() {dir_output="$(realpath "$dir_output")"# Prevent accidental deletion if $dir_output is a parent of $dir- if [[ "$dir" == "$dir_output"* ]]; then+ if [[ $dir == "$dir_output"* ]]; thenecho "[!] Output directory is a parent of the working directory. Aborting to prevent data loss."return 1fi@@ -5205,6 +5603,95 @@ function check_inscope() {cat $1 | inscope >$1_tmp && cp $1_tmp $1 && rm -f $1_tmp}+function maybe_update_nuclei() {+ # Update nuclei templates once per run per target directory+ mkdir -p .tmp+ local stamp_file=".tmp/.nuclei_updated"+ if [[ ! -f $stamp_file ]]; then+ if [[ -n ${NUCLEI_TEMPLATES_PATH-} ]]; then+ nuclei -update-templates -update-template-dir "${NUCLEI_TEMPLATES_PATH}" 2>>"$LOGFILE" >/dev/null || true+ else+ nuclei -update 2>>"$LOGFILE" >/dev/null || true+ fi+ if [[ -n ${NUCLEI_FUZZING_TEMPLATES_PATH-} && -d ${NUCLEI_FUZZING_TEMPLATES_PATH} ]]; then+ nuclei -update-templates -update-template-dir "${NUCLEI_FUZZING_TEMPLATES_PATH}" 2>>"$LOGFILE" >/dev/null || true+ fi+ touch "$stamp_file"+ fi+}++# Plugin framework+PLUGINS_LOADED=false+function plugins_load() {+ local plugdir="${SCRIPTPATH}/modules"+ if [[ -d $plugdir ]]; then+ for f in "$plugdir"/*.sh; do+ [[ -f $f ]] && source "$f" || true+ done+ fi+ PLUGINS_LOADED=true+}++function plugins_emit() {+ local event="$1"+ shift || true+ if declare -F reconftw_plugins >/dev/null 2>&1; then+ reconftw_plugins "$event" "$@" || true+ fi+}++# Asset store+function append_asset() {+ # Usage: append_asset type key value extras...+ [[ $ASSET_STORE != true ]] && return 0+ local type="$1"+ shift+ local key="$1"+ shift+ local val="$1"+ shift+ local now+ now=$(date +'%Y-%m-%d %H:%M:%S')+ mkdir -p .tmp+ printf '{"type":"%s","%s":"%s","ts":"%s","source":"%s"}\n' \+ "$type" "$key" "${val//\"/\\\"}" "$now" "${FUNCNAME[1]}" >>assets.jsonl 2>/dev/null+}++function append_assets_from_file() {+ # Usage: append_assets_from_file type key file+ [[ $ASSET_STORE != true ]] && return 0+ local type="$1"+ local key="$2"+ local file="$3"+ [[ ! -s $file ]] && return 0+ while IFS= read -r line; do+ [[ -z $line ]] && continue+ append_asset "$type" "$key" "$line"+ done <"$file"+}++# Chunk helper+function process_in_chunks() {+ # process_in_chunks <file> <chunk_size> <command with _chunk_ placeholder>+ local infile="$1"+ local chunksize="$2"+ shift 2+ [[ ! -s $infile ]] && return 0+ local lines+ lines=$(wc -l <"$infile" 2>/dev/null || echo 0)+ if [[ $lines -le $chunksize ]]; then+ eval "$*"+ return $?+ fi+ mkdir -p .tmp/chunks+ split -l "$chunksize" -d "$infile" .tmp/chunks/part_+ for part in .tmp/chunks/part_*; do+ local cmd+ cmd="${*//_chunk_/\"$part\"}"+ bash -lc "$cmd"+ done+}+function resolvers_update() {if [[ $generate_resolvers == true ]]; then@@ -5223,7 +5710,7 @@ function resolvers_update() {elsenotification "Checking resolvers lists...\n Accurate resolvers are the key to great results\n This may take around 10 minutes if it's not updated" warn# shellcheck disable=SC2016- axiom-exec 'if [[ $(find "/home/op/lists/resolvers.txt" -mtime +1 -print) ]] || [[ $(cat /home/op/lists/resolvers.txt | wc -l) -le 40 ] ; then dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 200 -o /home/op/lists/resolvers.txt ; fi' &>/dev/null+ axiom-exec '([[ $(find "/home/op/lists/resolvers.txt" -mtime +1 -print) ]] || [[ $(wc -l < /home/op/lists/resolvers.txt) -le 40 ]]) && dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 200 -o /home/op/lists/resolvers.txt' &>/dev/nullaxiom-exec "wget -q -O - ${resolvers_url} > /home/op/lists/resolvers.txt" 2>>"$LOGFILE" >/dev/nullaxiom-exec "wget -q -O - ${resolvers_trusted_url} > /home/op/lists/resolvers_trusted.txt" 2>>"$LOGFILE" >/dev/nullnotification "Updated\n" good@@ -5253,6 +5740,12 @@ function resolvers_update_quick_axiom() {axiom-exec "wget -q -O - ${resolvers_trusted_url} > /home/op/lists/resolvers_trusted.txt" 2>>"$LOGFILE" >/dev/null}+function resolvers_optimize_local() {+ # Experimental: dedupe resolvers; prefer faster ones if dnsx available+ sort -u "$resolvers" -o "$resolvers" 2>/dev/null || true+ sort -u "$resolvers_trusted" -o "$resolvers_trusted" 2>/dev/null || true+}+function ipcidr_target() {IP_CIDR_REGEX='(((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?))(\/([8-9]|[1-2][0-9]|3[0-2]))([^0-9.]|$)|(((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)$)'if [[ $1 =~ ^$IP_CIDR_REGEX ]]; then@@ -5289,14 +5782,16 @@ function axiom_launch() {elsestartcount=$((AXIOM_FLEET_COUNT - NUMOFNODES))fi- # Build args safely to avoid word-splitting issues- local -a AXIOM_FLEET_ARGS=( -i "$startcount" )- # Regions intentionally disabled here per original comment- # To re-enable: [[ -n ${AXIOM_FLEET_REGIONS-} ]] && AXIOM_FLEET_ARGS+=( --regions="${AXIOM_FLEET_REGIONS}" )+ # Build args safely to avoid word-splitting issues+ local -a AXIOM_FLEET_ARGS=(-i "$startcount")+ # Regions intentionally disabled here per original comment+ # To re-enable: [[ -n ${AXIOM_FLEET_REGIONS-} ]] && AXIOM_FLEET_ARGS+=( --regions="${AXIOM_FLEET_REGIONS}" )- # Show the exact command with proper quoting- printf 'axiom-fleet %q' "${AXIOM_FLEET_NAME}"; printf ' %q' "${AXIOM_FLEET_ARGS[@]}"; echo- axiom-fleet "${AXIOM_FLEET_NAME}" "${AXIOM_FLEET_ARGS[@]}"+ # Show the exact command with proper quoting+ printf 'axiom-fleet %q' "${AXIOM_FLEET_NAME}"+ printf ' %q' "${AXIOM_FLEET_ARGS[@]}"+ echo+ axiom-fleet "${AXIOM_FLEET_NAME}" "${AXIOM_FLEET_ARGS[@]}"axiom-select "$AXIOM_FLEET_NAME*"if [[ -n $AXIOM_POST_START ]]; thenbash -lc "$AXIOM_POST_START" 2>>"$LOGFILE" >/dev/null@@ -5338,13 +5833,8 @@ function start() {global_start=$(date +%s)- printf "\n${bgreen}#######################################################################${reset}"- notification "Recon succesfully started on ${domain}" "good" "$(date +'%Y-%m-%d %H:%M:%S')"- [ "$SOFT_NOTIFICATION" = true ] && echo "$(date +'%Y-%m-%d %H:%M:%S') Recon succesfully started on ${domain}" | notify -silent- printf "${bgreen}#######################################################################${reset}\n"-# Raise ulimit for long-running VPS jobs (fail-soft on failure)- if [[ "${RAISE_ULIMIT:-true}" == "true" ]]; then+ if [[ ${RAISE_ULIMIT:-true} == "true" ]]; thenULIMIT_TARGET=${ULIMIT_TARGET:-65535}ulimit -n "$ULIMIT_TARGET" 2>>"${LOGFILE:-/dev/null}" >/dev/null || truefi@@ -5352,9 +5842,9 @@ function start() {# Log version and key flags{printf "[%s] reconFTW version: %s\n" "$(date +'%Y-%m-%d %H:%M:%S')" "$reconftw_version"- printf "[%s] Flags: OSINT=%s SUBDOMAINS_GENERAL=%s VULNS_GENERAL=%s DEEP=%s\n" \- "$(date +'%Y-%m-%d %H:%M:%S')" "$OSINT" "$SUBDOMAINS_GENERAL" "$VULNS_GENERAL" "$DEEP"- } >>"${LOGFILE:-/dev/null}"+ printf "[%s] Flags: OSINT=%s SUBDOMAINS_GENERAL=%s VULNS_GENERAL=%s DEEP=%s\n" \+ "$(date +'%Y-%m-%d %H:%M:%S')" "$OSINT" "$SUBDOMAINS_GENERAL" "$VULNS_GENERAL" "$DEEP"+ } >>"${LOGFILE:-/dev/null}"if [[ $upgrade_before_running == true ]]; then${SCRIPTPATH}/install.sh --toolsfi@@ -5370,9 +5860,11 @@ function start() {called_fn_dir="$dir"/.called_fnfiif [[ $list == /* ]]; then- install -D "$list" "$dir"/webs/webs.txt+ mkdir -p "$dir/webs"+ cp "$list" "$dir/webs/webs.txt"else- install -D "${SCRIPTPATH}"/"$list" "$dir"/webs/webs.txt+ mkdir -p "$dir/webs"+ cp "${SCRIPTPATH}/${list}" "$dir/webs/webs.txt"fifielse@@ -5401,17 +5893,25 @@ function start() {fimkdir -p {.log,.tmp,webs,hosts,vulns,osint,screenshots,subdomains}+ # Load plugins and emit start event+ plugins_load+ plugins_emit start "$domain" "$dir"+NOW=$(date +"%F")NOWT=$(date +"%T")LOGFILE="${dir}/.log/${NOW}_${NOWT}.txt"touch .log/${NOW}_${NOWT}.txtecho "[$(date +'%Y-%m-%d %H:%M:%S')] Start ${NOW} ${NOWT}" >"${LOGFILE}"-# Non-fatal error trap: log and continue+ # init time saved estimator+ TIME_SAVED_EST=0++ # Non-fatal error trap: log and continuetrap 'rc=$?; ts=$(date +"%Y-%m-%d %H:%M:%S"); cmd=${BASH_COMMAND}; loc_fn=${FUNCNAME[0]:-main}; loc_ln=${BASH_LINENO[0]:-0}; msg="[$ts] ERR($rc) @ ${loc_fn}:${loc_ln} :: ${cmd}"; if [[ -n "${LOGFILE:-}" ]]; then echo "$msg" >>"$LOGFILE"; else echo "$msg" >&2; fi' ERRprintf "\n"printf "${bred}[$(date +'%Y-%m-%d %H:%M:%S')] Target: ${domain}\n\n"+ printf "%b[LEGAL]%b Authorized testing only. By running this scan you confirm you have explicit permission for the specified targets and will comply with all applicable laws and program rules. Unauthorized use is prohibited.\n\n" "$yellow" "$reset"}function end() {@@ -5483,17 +5983,70 @@ function end() {zipSnedOutputFolderfi+ # Screenshot diffs (hashing)+ if [[ -d screenshots ]]; then+ if [[ -f screenshots/hashes.txt ]]; then mv screenshots/hashes.txt screenshots/hashes_prev.txt 2>>"$LOGFILE" || true; fi+ find screenshots -type f -name '*.png' -print0 | xargs -0 -I{} sh -c 'sha256sum "$1" 2>/dev/null || shasum -a 256 "$1"' -- {} | sed 's| ./||' >screenshots/hashes.txt 2>>"$LOGFILE" || true+ if [[ -f screenshots/hashes_prev.txt ]]; then+ comm -3 <(cut -d' ' -f1,2 screenshots/hashes_prev.txt | sort) <(cut -d' ' -f1,2 screenshots/hashes.txt | sort) | awk '{print $2}' | sed '/^$/d' >screenshots/diff_changed.txt 2>>"$LOGFILE" || true+ fi+ fi++ # Emit end plugin event+ plugins_emit end "$domain" "$dir"++ # Build hotlist (risk summary)+ build_hotlist || true+global_end=$(date +%s)getElapsedTime $global_start $global_endprintf "${bgreen}#######################################################################${reset}\n"notification "Finished Recon on: ${domain} under ${finaldir} in: ${runtime}" good "$(date +'%Y-%m-%d %H:%M:%S')"[ "$SOFT_NOTIFICATION" = true ] && echo "[$(date +'%Y-%m-%d %H:%M:%S')] Finished Recon on: ${domain} under ${finaldir} in: ${runtime}" | notify -silentprintf "${bgreen}#######################################################################${reset}\n"- #Separator for more clear messges in telegram_Bot- notification echo "[$(date +'%Y-%m-%d %H:%M:%S')] ****** Stay safe π¦ and secure π ******" info}+function build_hotlist() {+ mkdir -p .tmp+ declare -A score+ # Nuclei high/critical+ for f in nuclei_output/high_json.txt nuclei_output/critical_json.txt; do+ [[ -s $f ]] || continue+ jq -r '.["matched-at"] // .host' "$f" 2>/dev/null | while read -r h; do+ [[ -z $h ]] && continue+ score["$h"]=$((${score["$h"]:-0} + 10))+ done+ done+ # Takeovers+ [[ -s webs/takeover.txt ]] && while read -r h; do score["$h"]=$((${score["$h"]:-0} + 8)); done <webs/takeover.txt+ # Secrets+ for s in js/js_secrets.txt js/js_secrets_jsmap.txt js/js_secrets_jsmap_jsluice.txt; do+ [[ -s $s ]] || continue+ awk '{print $1}' "$s" | while read -r h; do score["$h"]=$((${score["$h"]:-0} + 6)); done+ done+ # Real IPs via favicon+ if [[ -s hosts/favicontest.txt ]]; then+ while read -r ip; do+ score["$ip"]=$((${score["$ip"]:-0} + 4))+ done <hosts/favicontest.txt+ fi+ # New assets bonus+ for p in .tmp/subs_new_only.txt webs/url_extract.txt; do+ [[ -s $p ]] || continue+ while read -r l; do+ host=$(echo "$l" | unfurl -u domains 2>/dev/null)+ [[ -z $host ]] && continue+ score["$host"]=$((${score["$host"]:-0} + 2))+ done <"$p"+ done+ # Emit hotlist sorted+ {+ for k in "${!score[@]}"; do printf "%s %s\n" "${score[$k]}" "$k"; done | sort -nr | head -n "${HOTLIST_TOP:-50}"+ } >hotlist.txt+ [[ -s hotlist.txt ]] && notification "Hotlist ready (top ${HOTLIST_TOP:-50})" info+}+########################################################################################################################################################## MODES & MENUS ####################################################################################################################################################################@@ -5556,6 +6109,8 @@ function osint() {third_party_misconfigszonetransferfavicon+ mail_hygiene+ cloud_enum_scan}function vulns() {@@ -5669,17 +6224,34 @@ function recon() {subtakeoverremove_big_filess3buckets+ cloud_extra_providersscreenshot# virtualhostscdnproviderportscangeo_info- waf_checks- nuclei_check- fuzz- iishortname- urlchecks- jschecks+ # Quick-rescan gating+ subs_new=$(cat .tmp/subs_new_count 2>/dev/null || echo 1)+ webs_new=$(cat .tmp/webs_new_count 2>/dev/null || echo 1)+ if [[ $QUICK_RESCAN == true && $subs_new -eq 0 && $webs_new -eq 0 ]]; then+ notification "Quick rescan: no new subs/webs; skipping heavy web stages" info+ # estimate time saved for skipped modules+ TIME_SAVED_EST=$((${TIME_SAVED_EST:-0} + \+ ${TIME_EST_WAF:-0} + ${TIME_EST_NUCLEI:-600} + ${TIME_EST_API:-300} + ${TIME_EST_GQL:-180} + \+ ${TIME_EST_FUZZ:-900} + ${TIME_EST_IIS:-60} + ${TIME_EST_URLCHECKS:-300} + ${TIME_EST_JSCHECKS:-300} + \+ ${TIME_EST_PARAM:-240} + ${TIME_EST_GRPC:-120}))+ else+ waf_checks+ nuclei_check+ graphql_scan+ fuzz+ iishortname+ urlchecks+ jschecks+ websocket_checks+ param_discovery+ grpc_reflection+ fiif [[ $AXIOM == true ]]; thenaxiom_shutdown@@ -6015,16 +6587,20 @@ function webs_menu() {# virtualhostswaf_checksnuclei_check+ graphql_scanfuzzcms_scanneriishortnameurlchecksjschecks+ websocket_checksurl_gfwordlist_genwordlist_gen_roboxtractorpassword_dicturl_ext+ param_discovery+ grpc_reflectionvulnsend}@@ -6045,6 +6621,7 @@ function zen_menu() {cdnproviderwaf_checksnuclei_check+ graphql_scanfuzziishortnameif [[ $AXIOM == true ]]; then@@ -6055,54 +6632,56 @@ function zen_menu() {}function help() {- printf "\n Usage: $0 [-d domain.tld] [-m name] [-l list.txt] [-x oos.txt] [-i in.txt] "- printf "\n [-r] [-s] [-p] [-a] [-w] [-n] [-z] [-c] [-y] [-h] [-f] [--ai] [--deep] [-o OUTPUT]\n\n"- printf " ${bblue}TARGET OPTIONS${reset}\n"- printf " -d domain.tld Target domain\n"- printf " -m company Target company name\n"- printf " -l list.txt Targets list (One on each line)\n"- printf " -x oos.txt Excludes subdomains list (Out Of Scope)\n"- printf " -i in.txt Includes subdomains list\n"- printf " \n"- printf " ${bblue}MODE OPTIONS${reset}\n"- printf " -r, --recon Recon - Performs full recon process (without attacks)\n"- printf " -s, --subdomains Subdomains - Performs Subdomain Enumeration, Web probing and check for sub-tko\n"- printf " -p, --passive Passive - Performs only passive steps\n"- printf " -a, --all All - Performs all checks and active exploitations\n"- printf " -w, --web Web - Performs web checks from list of subdomains\n"- printf " -n, --osint OSINT - Checks for public intel data\n"- printf " -z, --zen Zen - Performs a recon process covering the basics and some vulns\n"- printf " -c, --custom Custom - Launches specific function against target, u need to know the function name first\n"- printf " -y, --ai AI - Analyzes ReconFTW results using a local LLM\n"- printf " -h Help - Show help section\n"- printf " \n"- printf " ${bblue}GENERAL OPTIONS${reset}\n"- printf " --deep Deep scan (Enable some slow options for deeper scan)\n"- printf " -f config_file Alternate reconftw.cfg file\n"- printf " -o output/path Define output folder\n"- printf " -v, --vps Axiom distributed VPS\n"- printf " -q Rate limit in requests per second\n"- printf " --check-tools Exit if one of the tools is missing\n"- printf " \n"- printf " ${bblue}USAGE EXAMPLES${reset}\n"- printf " ${byellow}Perform full recon (without attacks):${reset}\n"- printf " ./reconftw.sh -d example.com -r\n"- printf " \n"- printf " ${byellow}Perform subdomain enumeration on multiple targets:${reset}\n"- printf " ./reconftw.sh -l targets.txt -s\n"- printf " \n"- printf " ${byellow}Perform Web based scanning on a subdomains list:${reset}\n"- printf " ./reconftw.sh -d example.com -l targets.txt -w\n"- printf " \n"- printf " ${byellow}Multidomain recon:${reset}\n"- printf " ./reconftw.sh -m company -l domainlist.txt -r\n"- printf " \n"- printf " ${byellow}Perform full recon (with active attacks) along Out-Of-Scope subdomains list:${reset}\n"- printf " ./reconftw.sh -d example.com -x out.txt -a\n"- printf " \n"- printf " ${byellow}Analyze ReconFTW results with AI:${reset}\n"- printf " ./reconftw.sh -d example.com -r --ai\n"- printf " \n"+ pt_header "Usage"+ printf "\n Usage: $0 [-d domain.tld] [-m name] [-l list.txt] [-x oos.txt] [-i in.txt] "+ printf "\n [-r] [-s] [-p] [-a] [-w] [-n] [-z] [-c] [-y] [-h] [-f] [--ai] [--deep] [-o OUTPUT]\n\n"+ printf " ${bblue}TARGET OPTIONS${reset}\n"+ printf " -d domain.tld Target domain\n"+ printf " -m company Target company name\n"+ printf " -l list.txt Targets list (One on each line)\n"+ printf " -x oos.txt Excludes subdomains list (Out Of Scope)\n"+ printf " -i in.txt Includes subdomains list\n"+ printf " \n"+ printf " ${bblue}MODE OPTIONS${reset}\n"+ printf " -r, --recon Recon - Performs full recon process (without attacks)\n"+ printf " -s, --subdomains Subdomains - Performs Subdomain Enumeration, Web probing and check for sub-tko\n"+ printf " -p, --passive Passive - Performs only passive steps\n"+ printf " -a, --all All - Performs all checks and active exploitations\n"+ printf " -w, --web Web - Performs web checks from list of subdomains\n"+ printf " -n, --osint OSINT - Checks for public intel data\n"+ printf " -z, --zen Zen - Performs a recon process covering the basics and some vulns\n"+ printf " -c, --custom Custom - Launches specific function against target, u need to know the function name first\n"+ printf " -y, --ai AI - Analyzes ReconFTW results using a local LLM\n"+ printf " -h Help - Show help section\n"+ printf " \n"+ printf " ${bblue}GENERAL OPTIONS${reset}\n"+ printf " --deep Deep scan (Enable some slow options for deeper scan)\n"+ printf " -f config_file Alternate reconftw.cfg file\n"+ printf " -o output/path Define output folder\n"+ printf " -v, --vps Axiom distributed VPS\n"+ printf " -q Rate limit in requests per second\n"+ printf " --check-tools Exit if one of the tools is missing\n"+ printf " --quick-rescan Skip heavy steps if no new subs/webs this run\n"+ printf " \n"+ printf " ${bblue}USAGE EXAMPLES${reset}\n"+ printf " ${byellow}Perform full recon (without attacks):${reset}\n"+ printf " ./reconftw.sh -d example.com -r\n"+ printf " \n"+ printf " ${byellow}Perform subdomain enumeration on multiple targets:${reset}\n"+ printf " ./reconftw.sh -l targets.txt -s\n"+ printf " \n"+ printf " ${byellow}Perform Web based scanning on a subdomains list:${reset}\n"+ printf " ./reconftw.sh -d example.com -l targets.txt -w\n"+ printf " \n"+ printf " ${byellow}Multidomain recon:${reset}\n"+ printf " ./reconftw.sh -m company -l domainlist.txt -r\n"+ printf " \n"+ printf " ${byellow}Perform full recon (with active attacks) along Out-Of-Scope subdomains list:${reset}\n"+ printf " ./reconftw.sh -d example.com -x out.txt -a\n"+ printf " \n"+ printf " ${byellow}Analyze ReconFTW results with AI:${reset}\n"+ printf " ./reconftw.sh -d example.com -r --ai\n"+ printf " \n"printf " ${byellow}Run custom function:${reset}\n"printf " ./reconftw.sh -d example.com -c nuclei_check \n"}@@ -6135,7 +6714,7 @@ if [[ $OSTYPE == "darwin"* ]]; thenPATH="$(brew --prefix gnu-sed)/libexec/gnubin:$PATH"fi-PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:q:c:zrspanwvyh' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,zen,deep,help,vps,ai,check-tools' -n 'reconFTW' -- "$@")+PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:q:c:zrspanwvyh' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,zen,deep,help,vps,ai,check-tools,quick-rescan' -n 'reconFTW' -- "$@")exit_status=$?if [[ $exit_status -ne 0 ]]; then@@ -6220,10 +6799,10 @@ while true; docontinue;;'-y' | '--ai')- opt_ai=true- shift- continue- ;;+ opt_ai=true+ shift+ continue+ ;;# extra stuff'-o')if [[ $2 != /* ]]; then@@ -6267,6 +6846,11 @@ while true; doshiftcontinue;;+ '--quick-rescan')+ QUICK_RESCAN=true+ shift+ continue+ ;;'--help' | '-h')break;;