Jump to content

Help With TCP Functions


OfChange
 Share

Recommended Posts

I've looked everywhere on google and these forums to an answer for this problem but I can't seem to find one.

I am using a program called Tor (www.torproject.com) to change my ip on command. I want to automate this in AutoIt using TCP functions. According to google this is possible in other languages including php:

http://www.webmastertalkforums.com/php-t...w-identity-ip-address-tor-usin

I tried recreating this in AutoIt with this code:

#include <INet.au3>
#include <IE.au3>
$ip1 = _getip()
msgbox(1,"",$ip1)
do
TCPStartUp()
$con = tcpconnect("127.0.0.1","9051")
sleep(500)
$send1 = tcpsend($con,"AUTHENTICATErn")
sleep(500)
$send2 = tcpsend($con,"signal NEWNYMrn")
sleep(500)
TCPShutdown()
$ip2 = _getip()
msgbox(1,"",$ip2)
until $ip2 <> $ip1
msgbox(1,"Success","Ip Changed to: " & $i2)

This is my first time using TCP functions with AutoIt and I'd like to see if anyone has any input on if my code is wrong or if Tor is just set up incorrectly. Thanks in advance!

Edit- I have Tor configured to IE correctly and the control port with Tor is set up to the same ip and port listed above with no authentication.

Edited by OfChange
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...