2

I am trying to write a script where I make a connection through Tor in Python. I can currently connect to Tor and request a new ip NEWNYM but I seem to get stuck at sending data. The data never gets received.

and the connection is never made by Tor to the resultant address.

No connection is ever made... I have tried numerous things for about 5 days now. I would appreciate any help anyone can provide

*cheers

1 Answer 1

3

I highly recommend SocksiPy. It is extremely easy to use, and once you've established a connection it works just like a regular TCP socket. Here is a brief sample from their SourceForge page:

>>> import socks
>>> s = socks.socksocket()
>>> s.setproxy(socks.PROXY_TYPE_SOCKS5,"socks.example.com")
>>> s.connect(("www.example.com",80))
>>> 

I have used it in several large projects with no problems. It may not be exactly what you are looking for if you will regularly need to interact directly with the SOCKS5 server (and even then, it will probably be able to do what you need), but in the vast majority of cases SocksiPy is more than sufficient.

Sign up to request clarification or add additional context in comments.

2 Comments

Actually this worked well I think it may be working now thank you :-)
SF do not allow outbound connectivity via the Project web space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.