Sign in to follow this  
Followers 0
jacky_ckw

telnet to output file?

9 posts in this topic

hi,

would like to know if anyone is able to create an output text file from telnet query?

i have written a simple GUI that enables me to ping and display the resolved IP address of the host but when i want to do a telnet to the host there is no way i can create an output text file.

anyone able to help me on this?


New to script...But getting the hang of it.

Share this post


Link to post
Share on other sites



Is this what you are after? --

runWait(@comSpec & "/c telnet params > output.txt", "", @SW_HIDE)

Share this post


Link to post
Share on other sites

I'd recommend and alternate telnet client like PuTTY.


Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

Plink is a tad bit better than putty for automation, as it is just a command line version of putty (no gui controls required)


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

Is this what you are after? --

runWait(@comSpec & "/c telnet params > output.txt", "", @SW_HIDE)

<{POST_SNAPBACK}>

hi, but i think this does not work.

have you tried this command before? the output.txt file will be created but its blank, no contents inside. weather successful or not the text file will still be blank.


New to script...But getting the hang of it.

Share this post


Link to post
Share on other sites

well, i guess the next version hopefully they can have a telnet thinggy.

searched thru the entire help file but could not find an alternative to this telnet command with feedback. :)


New to script...But getting the hang of it.

Share this post


Link to post
Share on other sites

What about the TCP functions in AutoIt? You can just create a telnet session with the default port (23? for telnet)


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

hi, but i think this does not work.

have you tried this command before? the output.txt file will be created but its blank, no contents inside. weather successful or not the text file will still be blank.

<{POST_SNAPBACK}>

Forgot the space in front of /c.

Should be:

RunWait(@comSpec & " /c telnet params > output.txt", "", @SW_HIDE)
Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

well, i guess the next version hopefully they can have a telnet thinggy.

searched thru the entire help file but could not find an alternative to this telnet command with feedback.  :)

<{POST_SNAPBACK}>

@MSLx Fanboy recommended PLink earlier, and I've used Console Telnet with the StdinWrite / StdoutRead functions and it worked very well.

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

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  
Followers 0