Skip to content

rly0nheart/tor2tor

Repository files navigation

banner

Tor2Tor scrapes a given onion link and captures screenshots of all links available on it.

Python Powershell Shell Dockerfile Docker CodeQL


Installation ⬇️

Note ⚠️

This assumes the Firefox browser is installed on the user's machine.

1. Clone the repository

git clone https://github.com/rly0nheart/tor2tor

2. Move to the tor2tor directory

cd tor2tor
🐧 Linux

Run the installation script

Assuming it has already been made executable with sudo chmod +x install.sh

sudo ./install.sh

The installation script will install tor then download and setup the latest version of geckodriver, and install tor2tor together with its dependencies (because we're all too lazy to manually do it)


🪟 Windows

Run the powershell installation script

.\install.ps1

The installation script will download the tor bundle, geckodriver, and install tor2tor together with its dependencies. The downloads will be stored in the tor2tor directory.

🐋 Docker Image

Note ⚠️

This assumes you have docker installed and running

You can just pull the docker image from DockerHub by running:

docker pull rly0nheart/tor2tor

Usage ⌨️

🐧 Linux

To see available options/usage, call Tor2Tor with the -h/--help flag

tor2tor --help

or

t2t --help

Calling it with an onion url should look like the following

sudo tor2tor http://example.onion

🪟 Windows

To see available options/usage, call Tor2Tor with the -h/--help flag

tor2tor --help

or

t2t --help

Calling it with an onion url should look like the following

tor2tor http://example.onion

🐋 Docker Container

The Tor2Tor container can be called with docker run like so:

docker run rly0nheart/tor2tor --help

Calling the container with an onion url should look like the following

docker run --tty --volume $PWD/tor2tor:/root/tor2tor rly0nheart/tor2tor http://example.onion

Note ⚠️

--tty Allocates a pseudo-TTY, use it to enable the container to display colours (trust me, you will need this)

--volume $PWD/tor2tor:/root/tor2tor Will mount the tor2tor directory from the container to your host machine's tor2tor directory.


Updating ⬆️

🐧 Linux

update.sh

Assuming it has already been made executable with sudo chmod +x update.sh

Navigate to the tor2tor directory that you cloned and find the update.sh file.

and run it

sudo ./update.sh

The script will pull the latest changes (if any are available) then rebuild and install the package.


🪟 Windows

Navigate to the tor2tor directory that you cloned and find the update.ps1 file.

.\update.ps1

The script will pull the latest changes (if any are available) then rebuild and install the package.


🐋 Docker Container

As for the docker container, just run the docker pull command again.

docker run rly0nheart/tor2tor --help

Calling the container with an onion url should look like the following

docker run --tty --volume $PWD/tor2tor:/root/tor2tor rly0nheart/tor2tor http://example.onion

Note ⚠️

--tty Allocates a pseudo-TTY, use it to enable the container to display colours (trust me, you will need this)

--volume $PWD/tor2tor:/root/tor2tor Will mount the tor2tor directory from the container to your host machine's tor2tor directory.


Uninstalling ❌

🐧 Linux

Note ⚠️

Assuming it has already been made executable with sudo chmod +x uninstall.sh

Navigate to the tor2tor directory that you cloned and find the uninstall.sh file.

Run it!

sudo ./uninstall.sh

This will uninstall tor, delete the geckodriver binary and uninstall tor2tor


🪟 Windows

Navigate to the tor2tor directory that you cloned and find the uninstall.ps1 file.

Run it!

.\uninstall.sh

This will delete the geckodriver and tor binaries then uninstall tor2tor


🐋 Docker Container

You can stop (if it's running) and remove the container by running:

docker rm -f rly0nheart/tor2tor

Important 🚧

As you probably already know,Tor routes data via three relays (servers) for your privacy. As a result, connections become slower than an ordinary connection.

Point ⚠️

Once you start Tor2Tor, give it at least 2 minutes tops to query the specified onion url and extract links from it.

If you want to work around this, you can always just use a cloud shell service.

Screenshots

tor2tor-archive

There's a dedicated repository of onion screenshots captured with Tor2Tor at Tor2Tor Archive

CI/CD Workflow 🌊

Docker Image Building 🐳

  • Pushing to or merging into the latest branch triggers an automatic build of the Docker image.
  • This image is tagged as latest on Docker Hub, indicating it's the most stable release.

me