SubTahu is a high-performance, asynchronous subdomain discovery tool written in Rust. It combines modern subdomain scanning techniques with historical data from the Wayback Machine to provide comprehensive domain reconnaissance capabilities.
- Version 0.1.0: Initial release of SubTahu.
- Enhanced Scanning Engine: Improved subdomain validation and scanning for faster and more accurate results.
- Wayback Machine Integration: Fetch historical subdomain data from the Wayback Machine to uncover hidden subdomains.
- Customizable Concurrency: Adjust the number of concurrent connections to optimize scanning speed.
- Output to File: Save scan results to a file for further analysis.
- Intuitive CLI: Easy-to-use command-line interface with clear options and help messages.
- Fast concurrent subdomain scanning
- Historical subdomain discovery using Wayback Machine
- Customizable concurrency level
- Output results to file
- Clean and intuitive CLI interface
-
Make sure you have Rust installed. If not, install it from https://rustup.rs
-
Clone the repository:
git clone https://github.com/0x1Jar/SubTahu.git cd SubTahu -
Build the project:
cargo build --release
The binary will be available at
target/release/SubTahu -
Make the binary executable from anywhere:
To run the program directly with
SubTahu -d example.com, you can choose one of the following methods:-
Method 1: Copy the binary to a directory in your system's PATH (recommended for system-wide access):
-
Ensure the binary is executable:
chmod +x target/release/SubTahu
-
Copy the binary to a directory in your system's PATH (e.g.,
/usr/local/bin):sudo cp target/release/SubTahu /usr/local/bin
You might be prompted for your password.
-
-
Method 2: Add the
target/releasedirectory to your PATH environment variable (for access within your user account):-
Add this line to your
.bashrcor.zshrcfile:export PATH="$PATH:/yourpath/SubTahu/target/release"
-
After modifying the PATH, restart your terminal or run
source ~/.bashrcorsource ~/.zshrcto apply the changes.
-
-
SubTahu is a command-line tool. To use it, open your terminal. If you followed step 4 in the installation instructions, you can run the program directly. Otherwise, navigate to the target/release directory first.
Basic usage:
SubTahu -d example.comThis command will scan the domain example.com for subdomains using the default settings.
-h, --help: Show help message and exit-d, --domain <DOMAIN>: Target domain to scan (required). Specify the domain you want to scan for subdomains.-c, --concurrency <NUMBER>: Number of concurrent connections (default: 50). Increase this number for faster scanning, but be mindful of your system's resources and the target server's rate limiting.-b, --wayback: Use Wayback Machine to find historical subdomains. This option enables the tool to search the Wayback Machine for historical subdomain records.-o, --output <FILE>: Save results to a file. Specify a file path to save the discovered subdomains to a file.
To see all available options:
SubTahu --helpThis command will display a help message with all available options and their descriptions.
-
Simple scan with default settings:
SubTahu -d google.com -b
This command will scan
google.comfor subdomains using the default concurrency level (50). -
Scan with increased concurrency:
SubTahu -d google.com -c 200
This command will scan
google.comfor subdomains using 200 concurrent connections. -
Save results to a file:
SubTahu -d google.com -b -o results.txt
This command will scan
google.comfor subdomains, search the Wayback Machine, and save the results to a file namedresults.txt.
The program will display:
- Progress bar showing scan status
- Valid subdomains found with clear indicators:
- ✓ (green): Valid subdomain
- ✗ (yellow): Invalid subdomain
- Statistics including:
- Number of valid subdomains
- Number of invalid subdomains
- Total scan time
- Total domains processed
- Uses asynchronous TCP connections for validation
- Implements asynchronous TCP connections for validation
- Implements efficient concurrent processing with buffered streams
- Progress tracking with customizable display format
- Standardized logging methods (info/success/warn/error)
- Robust error handling with custom error types
- Efficient subdomain extraction using regex patterns
- Custom error types for different failure scenarios
- Clear error messages with context
- Proper error propagation through the Result type
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.