██████╗ ███╗ ██╗██╗ ██████╗ ███╗ ██╗
██╔═══██╗████╗ ██║██║██╔═══██╗████╗ ██║
██║ ██║██╔██╗ ██║██║██║ ██║██╔██╗ ██║
██║ ██║██║╚██╗██║██║██║ ██║██║╚██╗██║
╚██████╔╝██║ ╚████║██║╚██████╔╝██║ ╚████║
╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝
███████╗ ██████╗██████╗ █████╗ ██████╗ ███████╗██████╗
██╔════╝██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗
███████╗██║ ██████╔╝███████║██████╔╝█████╗ ██████╔╝
╚════██║██║ ██╔══██╗██╔══██║██╔═══╝ ██╔══╝ ██╔══██╗
███████║╚██████╗██║ ██║██║ ██║██║ ███████╗██║ ██║
╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚══════╝╚═╝ ╚═╝
Cybersecurity • Automation • AI • Research
Tor-Aware Directory Listing Downloader
Resume-Capable · Duplicate-Safe · Progress-Tracked
Onion Scraper is a powerful desktop application built with Python and Tkinter designed to recursively download directory listings from .onion hidden services over the Tor network. It automates what would otherwise require hundreds of manual clicks through a browser.
With an elegant dark-mode GUI and a robust multi-threaded backend, Onion Scraper can gracefully recover from Tor circuit drops, resume interrupted sessions without re-downloading existing files, and provide a comprehensive "Scan First" mode to inspect trees before initiating downloads.
Whether you prefer a seamless graphical interface or a sleek CLI (powered by rich), Onion Scraper has you covered.
- 🕵️ Tor Network Integration: Auto-detects Tor Browser (port
9150) and Tor Daemon (port9050) automatically. - 📂 Smart Directory Detection: Automatically recognizes standard directory listings (Apache, QData Data Browser, IIS, nginx autoindex).
- 🔄 Intelligent Resume: State tracking saves your progress. Safely resume interrupted downloads without fetching already completed files.
- 🛡️ Circuit Drop Recovery: Pauses all downloads when a Tor circuit fails and waits for recovery instead of spamming retries.
- 🔍 Playbook Mode ("Scan First"): Scan an entire directory tree via BFS without downloading anything. Select exactly what you want via checkboxes and download selectively.
- 🎨 Dual Interfaces: Features both a beautifully designed Dark-Mode Tkinter GUI and a visually rich Command-Line Interface.
Main dashboard featuring Tor auto-detection, URL history, and download progress tracking.
"Scan First" playbook mode allowing you to select specific files and folders before downloading.
- Python: Version
3.9or higher is required. - Tor: You must have the Tor Browser running in the background (or a standalone Tor daemon).
For Windows Users: The easiest way to install all required dependencies is using the provided batch script.
:: Double-click the file, or run it from the command line:
install.batFor Linux/macOS Users (or manual install):
Install the necessary Python packages using pip.
pip install "requests[socks]" beautifulsoup4 rich lxml PySocksNo complex configuration is needed! Onion Scraper automatically detects standard Tor proxy ports:
- Port 9150: Default Tor Browser port.
- Port 9050: Default Tor Daemon port.
If you use a custom port, you can specify it directly within the GUI or when prompted in the CLI.
Graphical User Interface (GUI): Launch the visually appealing dark-mode application.
:: On Windows, just double-click:
run.bat
:: Alternatively, run the script directly:
python onion_scraper_gui.pyCommand Line Interface (CLI): Prefer the terminal? Run the rich CLI version.
python onion_scraper.py- ❌ Tor Not Found Error: Ensure the Tor Browser is open and fully connected to the Tor network. If you are inside a Virtual Machine, Tor must be running inside the VM, not just on the host.
- ❌ Connection Timeouts / Circuit Errors: The Tor network can be slow or unstable. The app automatically pauses and waits for the circuit to recover. Just leave it running, or safely stop and resume the session later.
- ❌ Missing Libraries:
If the app fails to start due to
ImportError, ensure you raninstall.bat(Windows) or installed the dependencies viapip.
Contributions are always welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
Please ensure your code follows standard Python PEP-8 guidelines and doesn't break the Tor proxy configurations.
This project is open-source and available under the MIT License. Feel free to use, modify, and distribute as you see fit.