Vadersapien Posted November 12, 2009 Share Posted November 12, 2009 Hello all, I would like to know how I can telnet a server in AutoIt. I need to be able to send commands(as a string), and receive any output. I would like it to be written entirely in AutoIt, but I will use third-party software if it's required. Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
notsure Posted November 12, 2009 Share Posted November 12, 2009 I made a client/server example for this guy Link to comment Share on other sites More sharing options...
leos Posted November 12, 2009 Share Posted November 12, 2009 Hello all,I would like to know how I can telnet a server in AutoIt. I need to be able to send commands(as a string), and receive any output.I would like it to be written entirely in AutoIt, but I will use third-party software if it's required.It is easy to establish a connection with a telnet server using only Autoit.Take a look at:http://www.autoitscript.com/forum/index.php?showtopic=59744&view=findpost&p=449943 Link to comment Share on other sites More sharing options...
trancexx Posted November 12, 2009 Share Posted November 12, 2009 Verb 'telnet' is used widely here. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Vadersapien Posted November 14, 2009 Author Share Posted November 14, 2009 (edited) Say I want to connect to the server 127.0.0.1, send a single command, then disconnect....how would I do that? Edited November 14, 2009 by Vadersapien Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
BlackDawn187 Posted November 14, 2009 Share Posted November 14, 2009 Say I want to connect to the server 127.0.0.1, send a single command, then disconnect....how would I do that? Run( "Cmd.exe" ) Send("telnet") Send("{Enter}") Send("o") Send("{Enter}") Send("127.0.0.1") Send("{Enter}") Send("selfdestruct!") Send("{Enter}") Send("quit") I did this off the top of my head so the "'s might be done wrong when Sending the keys anyway.. if it ends up not working add Sleep delays in between key sends. Batch files could do this as well fyi. Link to comment Share on other sites More sharing options...
Vadersapien Posted November 14, 2009 Author Share Posted November 14, 2009 Run( "Cmd.exe" ) Send("telnet") Send("{Enter}") Send("o") Send("{Enter}") Send("127.0.0.1") Send("{Enter}") Send("selfdestruct!") Send("{Enter}") Send("quit") I did this off the top of my head so the "'s might be done wrong when Sending the keys anyway.. if it ends up not working add Sleep delays in between key sends. Batch files could do this as well fyi. Not quite what I was looking for since not everyone has telnet installed...i wanted to do it like @notsure did or use TCP.au3 Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
Vadersapien Posted November 14, 2009 Author Share Posted November 14, 2009 Nevermind...I figured it out...just used TCPSend... Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
mumu Posted January 8, 2010 Share Posted January 8, 2010 (edited) Run( "Cmd.exe" ) Send("telnet") Send("{Enter}") Send("o") Send("{Enter}") Send("127.0.0.1") Send("{Enter}") Send("selfdestruct!") Send("{Enter}") Send("quit") I did this off the top of my head so the "'s might be done wrong when Sending the keys anyway.. if it ends up not working add Sleep delays in between key sends. Batch files could do this as well fyi. Unfortunately this doesn't work with Windows 7 (error message says that telnet can't be found). Any idea how to start telnet? With Win XP I could use Run ("telnet") and telnet started. If I start telnet via cmd in Windows 7 manually everything works fine. Edited January 8, 2010 by mumu Link to comment Share on other sites More sharing options...
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