Das Ami Posted October 28, 2010 Posted October 28, 2010 Hi Everyone I have a script to automate a plink login into an SSH server so that I can browse anonymously. Plink creates a local socket on the defined port where I can connect with my browser like so: [browser/Script] <---> [Local plink socket] <---> [Remote SSH Server] <---> [Websites requested by browser/script] Now; the problem is that there seems to be no way to test that local socket for internet connectivity within AutoIt. I thought about maybe sending a GET request to google.com and then evaluating the response. Any other ideas? Here's my script: If ProcessExists("plink.exe") Then ProcessClose("plink.exe") If Not FileExists(@ScriptDir&"\plink.exe") Then MsgBox(0, "", "Couldn't find plink.exe") Exit EndIf ShellExecute(@ScriptDir&"\plink.exe", "-ssh -2 -D 8686 -batch -pw PASSWORD USER@SERVER.net", "", "", @SW_HIDE) Sleep(10000) TCPStartup() $con=TCPConnect("127.0.0.1", 8686) If $con=0 or -1 Then MsgBox(0, "", "Couldn't connect to local socket.") ;~ Test for remote connectivity here. TCPCloseSocket($con) TCPShutdown()
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now