Skip to content
Python module for http requests by tor network
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Python module for http requests by Tor network. PyTor change automatically IP address when a string marker is detected in response to a request.





ATENTION: First install pip and git

pip install git+git://


import pytor

# Use here, password from tor configuration

# Automatically change the IP address if one of those strings are met in http response
pytor.invalidStringList = ['Sorry, you\'re not allowed to access this page.', 'One more step']

# Change the IP address automatically after 100 requests
pytor.maxRequestsPerIP = 100 

# Change the IP address if response is shorter then 200 chars
pytor.minSourceLength = 200 

# Show IP address at every request 
pytor.showIp = True

# Show output messages 
pytor.silent = False

# Get source :)

Privoxy configuration

Privoxy's main configuration file is already prepared for Tor, if you are using a default Tor configuration and run it on the same system as Privoxy, you just have to edit the forwarding section and uncomment the next line from /etc/privoxy/config:

#        forward-socks5t             / .

Tor configuration

Generate a hash password

tor --hash-password YOURPASSWORD

Uncomment this line from /etc/tor/torrc

ControlPort 9051

Update hash generated above in /etc/tor/torrc

HashedControlPassword 16:3C78EB9AB441234760C108BCC7F8CF3138FA14378C116ECD3E9C942E51
You can’t perform that action at this time.