Skip to content

"Thoth" is a Python-based security tool designed to automate the process of finding JavaScript files, API endpoints, and hidden secrets within web applications. πŸ€– It's particularly useful for bug bounty hunting and penetration testing.

Notifications You must be signed in to change notification settings

joelindra/Thoth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Thoth

image

Thoth is a powerful and automated reconnaissance tool designed for security researchers and penetration testers. It streamlines the process of discovering subdomains, probing HTTP servers, extracting URLs from the Wayback Machine, validating URLs, and identifying JavaScript files, API endpoints, and potential secrets. Built with Python and leveraging popular open-source tools, Thoth provides a comprehensive and user-friendly solution for web reconnaissance.

Features

  • Subdomain Enumeration: Discovers subdomains using tools like subfinder and assetfinder.
  • DNS Resolution: Resolves subdomains with dnsx to identify valid hosts.
  • HTTP Probing: Probes for active HTTP servers using httprobe.
  • Wayback URL Extraction: Extracts historical URLs from the Wayback Machine with waybackurls and gau.
  • URL Validation: Validates extracted URLs using ffuf to ensure they are accessible.
  • JavaScript Analysis: Identifies .js files, extracts API endpoints with hakrawler, and searches for secrets using secretfinder.
  • Structured Output: Organizes results into a clean directory structure for easy analysis.
  • Rich Console Output: Utilizes the rich library for visually appealing terminal output, including banners, progress bars, and summary tables.
  • Discord Notifications: Sends scan summaries and key results to a Discord webhook for real-time updates.
  • Multi-threaded Scanning: Supports parallel scanning of multiple targets for efficiency.
  • Configurable: Customizable via a JSON configuration file for webhook URLs, thread count, and more.

Installation

Prerequisites

Ensure the following tools are installed on your system:

  • subfinder
  • assetfinder
  • httprobe
  • waybackurls
  • ffuf
  • gau
  • dnsx
  • httpx
  • hakrawler
  • Python packages: pyfiglet, rich, requests

You can install the Python dependencies using:

pip install -r requirements.txt

Clone the Repository

git clone https://github.com/Anonre/thoth.git
cd thoth

Install Dependencies

pip install pyfiglet rich requests

Usage

Thoth can be run with a single target or a list of targets. Below are the available command-line arguments:

python thoth.py -t <target>               # Scan a single domain/IP/CIDR
python thoth.py -l <target_list.txt>      # Scan multiple targets from a file
python thoth.py --threads 5               # Set the number of threads (default: 5)
python thoth.py --config config.json      # Specify a custom config file
python thoth.py --output-dir results      # Save results to a custom directory

Example Commands

  • Scan a single domain:

    python thoth.py -t example.com
  • Scan multiple targets from a file:

    python thoth.py -l targets.txt --threads 10
  • Save results to a specific directory:

    python thoth.py -t example.com --output-dir scan_results

Configuration

Create a config.json file to customize settings, such as Discord webhook URL, Telegram bot token, and thread count. Example:

{
  "discord_webhook_url": "https://discord.com/api/webhooks/...",
  "telegram_bot_token": "",
  "telegram_chat_id": "",
  "threads": 5,
  "rate_limit": 750
}

Output Structure

Results are organized in a structured directory for each target:

target/
β”œβ”€β”€ sources/
β”‚   β”œβ”€β”€ subfinder.txt
β”‚   β”œβ”€β”€ assetfinder.txt
β”‚   β”œβ”€β”€ all.txt
β”œβ”€β”€ result/
β”‚   β”œβ”€β”€ dns/
β”‚   β”‚   β”œβ”€β”€ resolved.txt
β”‚   β”œβ”€β”€ httpx/
β”‚   β”‚   β”œβ”€β”€ httpx.txt
β”‚   β”œβ”€β”€ wayback/
β”‚   β”‚   β”œβ”€β”€ wayback.txt
β”‚   β”‚   β”œβ”€β”€ valid.txt
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ js.txt
β”‚   β”‚   β”œβ”€β”€ secret.txt
β”‚   β”œβ”€β”€ endpoints/
β”‚   β”‚   β”œβ”€β”€ api_endpoints.txt
└── logs/
    β”œβ”€β”€ scan_<timestamp>.log

Logging

Logs are stored in the logs/ directory with timestamps and rotate automatically to manage disk space. Logs include detailed information about the scanning process, errors, and results.

Contributing

Contributions are welcome! Feel free to submit pull requests, report bugs, or suggest features via GitHub issues.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Disclaimer

Thoth is intended for authorized security testing and research purposes only. Unauthorized use on systems you do not own or have explicit permission to test is illegal and prohibited.

Author

Anonre
Feel free to reach out for collaboration or feedback!

Screenshoot

image

About

"Thoth" is a Python-based security tool designed to automate the process of finding JavaScript files, API endpoints, and hidden secrets within web applications. πŸ€– It's particularly useful for bug bounty hunting and penetration testing.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages