Jump to content
Sign in to follow this  
Vadersapien

Telnet

Recommended Posts

Vadersapien

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.

Share this post


Link to post
Share on other sites
notsure

I made a client/server example for this guy

Share this post


Link to post
Share on other sites
leos

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

Share this post


Link to post
Share on other sites
trancexx

Verb 'telnet' is used widely here.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Vadersapien

Say I want to connect to the server 127.0.0.1, send a single command, then disconnect....how would I do that?

Edited 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.

Share this post


Link to post
Share on other sites
BlackDawn187

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.

Share this post


Link to post
Share on other sites
Vadersapien

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.

Share this post


Link to post
Share on other sites
Vadersapien

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.

Share this post


Link to post
Share on other sites
mumu

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 by mumu

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×