tal041482 Posted October 16, 2009 Posted October 16, 2009 (edited) Ok everyone here is the deal the script executes to the end with no errors but nothing happens any ideas? $res = RunWait(@ComSpec & ' /c ping -n 1 www.google.com | find /i "100"','',@SW_HIDE) msgbox(0,'debug',$res) if $res = 1 then TCPStartup() $socket = TCPConnect("192.168.14.1", 23) Sleep(1000) TCPSend($socket, "password") Sleep(1000) TCPSend($socket, "en") Sleep(1000) TCPSend($socket, "password") Sleep(1000) TCPSend($socket, "config t") Sleep(1000) TCPSend($socket, "hostname blabla") Else EndIf Exit Anyways do i need to a send return ? Edited October 16, 2009 by tal041482
notsure Posted October 16, 2009 Posted October 16, 2009 I did alot of telnet coding in the past. I still remember 1 time I was trying to configure a router the router only accepted 1 character per "send". Try this; #include <string.au3> local $len, $socket, $data TCPStartup() $socket = TCPConnect("192.168.14.1", 23) if $socket <> "-1" then $data = "password" & @CRLF $len = stringlen($data) for $i = 0 to $len tcpsend($socket, stringmid($data,1,1))password $data = stringmid($data, 2, $len) next endif
SimonWebstation Posted October 16, 2009 Posted October 16, 2009 is the ip from google or from your pc when it isn't from google and you wold like to send something to google then lool up in the help for tcpnametoip mfg. SimonMany of my answers are translated of google, because I'am from Germany
notsure Posted October 16, 2009 Posted October 16, 2009 is the ip from google or from your pc when it isn't from google and you wold like to send something to google then lool up in the help for tcpnametoipThats true, but he's doing the ping in DOS, and the DOS-Ping recognizes google.nl if DNSaddresses are filled properly.
SimonWebstation Posted October 16, 2009 Posted October 16, 2009 Thats true, but he's doing the ping in DOS, and the DOS-Ping recognizes google.nl if DNSaddresses are filled properly.you can try tcpnametoip it can be that you have made RunWait(@ComSpec & ' /c ping -n 1 www.google.com | find /i "100"','',@SW_HIDE)false and it doesnt came the right answer mfg. SimonMany of my answers are translated of google, because I'am from Germany
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