100% found this document useful (1 vote)
89 views

How To - Using Tor From The Command Line - Just Hacker Things

This document provides instructions for using Tor from the command line on Linux. It explains how to install Tor, configure the Tor configuration file to enable control port access and disable authentication, restart the Tor service, and use the torify command to run commands through Tor anonymously. It also provides a way to force Tor to generate a new circuit and IP address by sending a NEWNYM signal to the Tor control port.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
89 views

How To - Using Tor From The Command Line - Just Hacker Things

This document provides instructions for using Tor from the command line on Linux. It explains how to install Tor, configure the Tor configuration file to enable control port access and disable authentication, restart the Tor service, and use the torify command to run commands through Tor anonymously. It also provides a way to force Tor to generate a new circuit and IP address by sending a NEWNYM signal to the Tor control port.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

29.11.

23, 00:05 How To: Using Tor From The Command Line – Just Hacker Things

Just Hacker Things Categories About

Infosec, cybersecurity, bug bounty, and general tinkering

How To: Using Tor From The Command


Line
If you’re going to be doing work in the “dark web”, it’ll be useful to un‐
derstand how to quickly and easily run commands via Tor.

First, assuming you’re using Linux, install Tor:

sudo apt install tor

Next, edit /etc/tor/torrc:

sudo vi /etc/tor/torrc

Find the line containing the following:

#ControlPort 9051

…and uncomment it.

Next, find the following line:

#CookieAuthentication 1

Uncomment it, and change 1 to 0.

Finally, restart the tor service:

sudo /etc/init.d/tor restart

Now, you can test to see if things are working as expected. Check your
current ip:

curl ifconfig.me

https://justhackerthings.com/post/using-tor-from-the-command-line/ 1/2
29.11.23, 00:05 How To: Using Tor From The Command Line – Just Hacker Things

…and compare the result to the following:

torify curl ifconfig.me 2>/dev/null

The torify command can be used to run any command through tor. The
redirect to /dev/null is used because torify generates a handful of warn‐
ings on some platforms.

If all goes well, you should see the IP address you’re getting after going
through Tor. If not, try restarting the tor service again.

Now, you’re ready to perform whatever tasks you need to from the
shell, via Tor.

If you want to force Tor to generate a new circuit, and thus a new IP, use
the following command:

echo -e 'AUTHENTICATE ""\r\nsignal NEWNYM\r\nQUIT' | nc 127.0.0.1 9051

After sending the NEWNYM signal, using the torify'd curl command
above should yield a new IP address.

HowTo Hunt Blue Team Red Team

©2021 Mark Langston.


Powered by Hugo

https://justhackerthings.com/post/using-tor-from-the-command-line/ 2/2

You might also like