PDA

View Full Version : telnet scripts



yang11
28-02-2003, 09:37 AM
hey there,

how can I use telnet with an answer file in w2k?

I know ftp can accept file input.

Is there anyway to do it with telnet?

like telnet 192.168.1.254 < rboot.txt.

many thanks in advance.

Graham L
28-02-2003, 12:11 PM
Try "telnet /?" to see what options it allows. A command file is likely to be implemented as an option, rather than redirection of the standard input channel.

I suspect it's unlikely: telnet is meant for running interactive sessions remotely, but I don't know it all. :D

Dolby Digital
28-02-2003, 12:54 PM
Excuse me asking... what are you trying to do?

Graham L
28-02-2003, 01:00 PM
You can do it in *nix, with the "expect" utility; this involves running telnet from inside a shell script. It's messy, but it does work.

If you have a look with google ("telnet script" gets some links), you might find something. A guy at westga.edu made a programme to drive telnet from w3.1 (http://www.westga.edu/~chuff/howtos/telall.html).

yang11
01-03-2003, 09:42 AM
I just try to restart my dynalink router 210 on a timed basis to get a new ip address.
coz telecom is said to have put something strange on my jetstart line ( in a bid to stop user setting up server), that router will just lockup. I have to push the power button to recover.
that used to happen once a week. now happens very often.

of coz, i used google to search for some scripts. no luck.

someone mentioned secureCRT, but that also needs scripts.

look like I need learn some VB programming again.

Dolby Digital
01-03-2003, 01:20 PM
Can you connect to the router via telnet to reboot it (thats me being ignorant!) Actually I wanted to do an ftp session via a script so I ended up with a GPL version of ftp.

Graham L
01-03-2003, 02:24 PM
Plug it into a timeswitch which turns it off briefly in the middle of the night. :D

Don't knock hardware fixes. I've actually done this. Worked like a dream.