File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ Before you run the torBot make sure the following things are done properly:
9999* Give the password inside torbot.py
100100`from stem.control import Controller
101101with Controller.from_port(port = 9051) as controller:
102- controller.authenticate("your_password ")
102+ controller.authenticate("your_password_hash ")
103103 controller.signal(Signal.NEWNYM)`
104104
105105Read more about torrc here : [ Torrc] ( https://github.com/DedSecInside/TorBoT/blob/master/Tor.md )
Original file line number Diff line number Diff line change 1+ import sys
2+ if __name__ == '__main__' :
3+ from stem .control import Controller
4+ with Controller .from_port (port = 9051 ) as controller :
5+ controller .authenticate () # controller.authenticate("yourpassphrase")
6+ bytes_read = controller .get_info ("traffic/read" )
7+ bytes_written = controller .get_info ("traffic/written" )
8+ print ("My Tor relay has read %s bytes and written %s." % (bytes_read , bytes_written ))
9+
10+ if not controller :
11+ sys .exit (1 ) # unable to get a connection
12+
13+ print ("Connection is Working Properly" )
14+ controller .close ()
15+
Original file line number Diff line number Diff line change 1010from stem .control import Controller
1111
1212with Controller .from_port (port = 9051 ) as controller :
13- controller .authenticate ()
13+ controller .authenticate ("16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C" )
1414 controller .signal (Signal .NEWNYM )
1515
1616#TOR SETUP GLOBAL Vars
You can’t perform that action at this time.
0 commit comments