Today I searched a lot about this question and, finally, I was able to answer it myself. But before I have to say that piercings and torus must be set up correctly. First a script, then a little about configuration:
import urllib2 from TorCtl import TorCtl proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"}) opener = urllib2.build_opener(proxy_support) def newId(): conn = TorCtl.connect(controlAddr="127.0.0.1", controlPort=9051, passphrase="your_password") conn.send_signal("NEWNYM") for i in range(0, 10): print "case "+str(i+1) newId() proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"}) urllib2.install_opener(opener) print(urllib2.urlopen("http://www.ifconfig.me/ip").read())
The above script gets the new IP address and checks it from the ifconfig.me website. About the configuration: We need Privoxy . To use TOR with HTTP connections, privoxy must work with tor. We can do this by adding thi to the / etc / privoxy / config file:
forward-socks5 / localhost:9050 .
then we configure ControlPort in the file / etc / tor / torrc. We just need to uncomment this line:
ControlPort 9051
then we just restart tor:
/etc/init.d/tor restart
user873286 Mar 29 2018-12-12T00: 00Z
source share