Answer the question
In order to leave comments, you need to log in
How to automate Telnet commands?
It is necessary to write an automated telnet login script and send commands to reconnect the D-Link 2640U modem. You need to send the following commands.
o 192.168.1.1 //5 sec
pause admin //3 sec pause
admin //3 sec pause
ppp config 0.8.35 down //5 sec pause
ppp config 0.8.35 up //5 sec
pause logout //5 sec pause
q
Answer the question
In order to leave comments, you need to log in
I was also looking for a simple console telnet client with the ability to automate, but eventually settled on perl with telnet libya
You can look something at perl/php/python
www.perlfect.com/articles/telnet.shtml
stackoverflow.com/ questions/905348/telnet-connecti...
Save as name.vbs
set my = WScript.CreateObject("WScript.Shell")
my.run("C:\Windows\System32\cmd.exe")
WScript.Sleep 3000
my.SendKeys("telnet 192.168.0.1~")
WScript.Sleep 5000
my.SendKeys("admin~")
WScript.Sleep 3000
my.SendKeys("admin~")
WScript.Sleep 3000
my.SendKeys("ppp config 0.8.35 down~")
WScript.Sleep 5000
my.SendKeys("ppp config 0.8.35 up~")
WScript.Sleep 5000
my.SendKeys("q~")
Unfortunately, I don't know Perl, maybe there are simpler options. It is necessary that the script be executed automatically through the task scheduler. Or maybe there is a program that allows you to automate the execution of telnet commands.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question