torspy is a robust Python package fortified with powerful algorithms, designed for seamless exploration of websites, including both normal and .onion sites via the Tor network. Its arsenal includes adept scraping of HTML from URLs, precise text localization within the acquired content, and proficient storage of findings. Moreover, torspy boasts formidable subdomain scanning capabilities, enabling thorough reconnaissance across diverse subdomains. Additionally, it excels at detecting hidden directories, further enhancing its efficacy in navigating and extracting valuable information from the web. torspy also features advanced content analysis, comprehensive link extraction, detailed service information retrieval, and efficient content downloading, making it an indispensable tool for web exploration and analysis.
- Torspy: Issues and Solutions
- Command 01 How to view the HTML of a page on the Onion site
- Command 02 How to clone an entire page and save it to a file
- Command 03 How to move files into directory
- Command 04 To search for content
- Command 05 Search content and save file
- Command 06 Search content and save file -d path
- Command 07 directories
- Command 08 directories and file
- Command 09 subdomain
- Command 10 subdomain and file
- Command 11 analyzes
- Command 12 How to transfer the analyzed data to a file
- Command 13 downloads content from an onion site
- Command 14 finds links on an onion site
- Command 15 Command to convert all links into one file
- Command 16 gets service info of an onion site
- Command 17 help
-
torspy is easy to use
-
Many hidden directories can be found using torspy
-
Each request torspy makes for your purpose will be anonymous
-
torspy can be used to extract required text or content from the website
-
HTML files can be downloaded using torspy
-
With torspy you can search for the files you need
-
torspy is the leading package for dark web scraping.
-
Finding links from onion sites
-
Finding services from onion sites
-
Download files from onion sites
-
Analyzing onion sites
- torspy is the leading package for dark web scraping.
-
Since requests are made using the Tor network, this tool will run slowly
-
The probability of finding hidden directories, subdomains and files is less than 20%
-
Sometimes you have to wait some time for this tool to work
-
Some processes may take time to complete
When using torspy tool you must use Tor otherwise it won't work : $ tor
You can install torspy via pip:
pip install torspy
torspy allows you to interact with .onion sites from the command line:
Command 01
- To display the content of a .onion site:
torspy http://example.onion
- When the above command is run, a request goes through the Tor network to that onion site, and then the HTML page of the onion site is displayed on your terminal.
command 02
- To save the displayed content to a file:
torspy http://example.onion -s file.html
-
The
-s
flag indicates saving, and you can specify any file name. -
The above command transfers the entire HTML code that were printed on your terminal to another file
-
Also you can change the name of file.html to any name of your choice
command 03
- How to move this file to a directory of your choice
torspy http://example.onion -s file.html -d /path/home/
-
-d
stands for directory -
Given after
-d
is your path and if you run the above command your file will move to the given path
command 04
- Search only the content you need from Onion sites
torspy http://example.onion --find “search query”
-
If you enter the above command it will search only the content you need from the given onion site and print it.
-
The command
--find
means to search
command 05
-
- To search for specific text within the content and save the results to a file
torspy http://example.onion --find “search query” -s search_results.html
- If you enter the above command it will search for the content you need from the site you provided and then transfer all that content to another file.
command 06
- How to search for content and move it to another directory
torspy http://example.onion --find “important information” -s results.html -d /path/to/directory
- If you run the above command it will search for the content you need from the given onion site and then move it to a file and then move it to the directory you specified.
- important Remember that when trying to find subdomains, as well as trying to find directories, the success rate is only 20%.
- Finding directories and subdomains for onion sites is more challenging than for regular websites because onion sites are part of the dark web, which is intentionally designed to be less accessible and more private.
command 07
- Command that finds the directories on the onion site
torspy http://example.onion --dir directories-list.txt
-
This process may take some time
-
If you run the command above it will search for directories from the onion sites you provided
-
The command
--dir
stands for directories -
This command performs directories scanning on the .onion site using the list of directories provided in the
directories-list.txt
file.
command 08
- How to move all the lists of directories you got into another file
torspy http://example.onion --dir directories-list.txt -s output.txt
-
If you run the above command all the directory lists you get will be moved to another file
-
Also you can move this file to other directory or other path using
-d
command
command 09
- Command that finds subdomains in onion site
torspy http://example.onion --sub subdomain-list.txt
-
This process may take some time
-
If you run the command above it will search for subdomains from the onion sites you provided
-
The command
--sub
stands for subdomains -
This command performs subdomains scanning on the .onion site using the list of subdomains provided in the
subdomains-list.txt
file.
command 10
- How to move all the lists of subdomains you got into another file
torspy http://example.onion --sub subdomain-list.txt -s output.txt
-
If you run the above command all the subdomains lists you get will be moved to
-
another file
-
Also you can move this file to other directory or other path using
-d
command
command 11
- Command that analyzes content of an onion site
torspy http://example.onion --analyze
- If you run the command above it will analyze the content of the onion site you provided.
- The command
–-analyze
performs content analysis on the .onion site.
command 12
- How to transfer the analyzed data to a file
torspy http://example.onion --analyze -s file-name.html
- You can name the file whatever you want { chnage file-name.html }
command 13
- Command that downloads content from an onion site
torspy http://example.onion --download -s filename
- If you run the command above it will download the content of the onion site you provided and save it to the specified file.
- The command
–-download
performs content downloading. - example :
torspy http://example.onion –-download -s index.html
,torspy http://example.onion –-download -s data.jpg
- The command -s specifies the file name to save the downloaded content.
command 14
- Command that finds links on an onion site
torspy http://example.onion --links
- If you run the command above it will find all links on the onion site you provided.
- The command
–-links
performs link extraction.
command 15
- Command to convert all links into one file
torspy http://example.onion --links -s file-link.txt
- After running the above command all the links will be changed to the file you have given
command 16
- Command that gets service info of an onion site
torspy http://example.onion --service
- If you run the command above it will retrieve service info of the onion site you provided.
- The command
–-service
performs service information retrieval. - You can use
-s
to save
command 17
- For more information on available options, you can use the
--help
flag:
torspy --help
- You can incorporate torspy into your Bash scripts for automated tasks. Here's an example script that fetches content from a list of .onion URLs and saves it to individual files:
#!/bin/bash
# List of .onion URLs
urls=("http://example1.onion" "http://example2.onion" "http://example3.onion")
# Loop through each URL
for url in "${urls[@]}"; do
# Fetch content and save to a file
torspy "$url" -s "${url##*/}.html"
done
- You can call the torspy command-line tool from Ruby using the system method:
system("torspy http://example.onion -s output.html")
- You can use the subprocess module to call torspy from a Python script:
import subprocess
subprocess.run(["torspy", "http://example.onion", "-s", "output.html"])
- You can use the shell_exec function to call torspy from PHP:
<?php
shell_exec("torspy http://example.onion -s output.html");
?>
- You can use the
child_process
module to call torspy from Node.js:
const { exec } = require('child_process');
exec('torspy http://example.onion -s output.html', (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`Stderr: ${stderr}`);
return;
}
console.log(`Output: ${stdout}`);
});
torspy utilizes the following process to interact with .onion sites:
If you're interested in contributing to torspy, you can:
- Report issues encountered while using torspy.
- Suggest new features or enhancements.
- Submit pull requests with improvements or fixes.
We at TorSpy are incredibly grateful for your support and trust in our cybersecurity tool. Your feedback and engagement drive us to continually improve and enhance our service. Together, we're making the digital world a safer place. Thank you for being a part of the TorSpy community!
This tool is intended for ethical use only. The author is not responsible for any misuse or damage caused by this tool. Users are responsible for ensuring their activities comply with all relevant laws and regulations.