Telnet script or batch file
|
Original Message
|
Name: buckethead (by coleg)
Date: February 21, 2008 at 08:37:15 Pacific
Subject: Telnet script or batch fileOS: WindowsCPU/Ram: 1 GBModel/Manufacturer: HP Compaq |
Comment: I want to build a script or a batch file that I can set to run on a daily basis that will telnet to a device and then send commands to it. Basically it would need to telnet and then run a command and exit out of the device. I was thinking I could do this with a batch file and run it as a Scheduled task. Any help would be greatly appreciated. I like long walks, especially when they are taken by people who annoy me.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: tonysathre
Date: February 21, 2008 at 13:15:02 Pacific
Subject: Telnet script or batch file |
Reply: (edit)You can't script telnet without expect.exe. You could also use netcat (nc.exe), which would probably be easier. With netcat you can redirect a text file with all your telnet commands in it to nc.exe like this, nc ip_address -p 23 < cmds.txt
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: ghostdog
Date: February 22, 2008 at 07:43:15 Pacific
Subject: Telnet script or batch file |
Reply: (edit)A slight correction. You can also script telnet using more advanced scripting languages like Perl/Python etc, which provides better program control , like exceptions etc..
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: