I'm trying to interface with Tor using Python, but it keeps refusing my connection. Here is my code:
from TorCtl import TorCtl
conn = TorCtl.connect(controlAddr="127.0.0.1", controlPort=9051, passphrase="123")
I've also tried:
from TorCtl import TorCtl
conn = TorCtl.connect()
Both yield the following error:
Failed to establish socket: [Errno 10061] No connection could be made because the target machine actively refused it.
Any ideas why this is happening/how I might fix it?
Hmmm, first I've seen that particular error. My first guess would be a local firewall, try running 'telnet localhost 9051' to troubleshoot.
On a side note TorCtl has been deprecated in favour of stem .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.