Rem 重启modem,重新取IP地址
@echo off
echo set sh=WScript.CreateObject("WScript.Shell") >telnet_tmp.vbs
Rem 等待1毫秒
echo WScript.Sleep 1 >>telnet_tmp.vbs
echo sh.SendKeys "open 192.168.1.1" >>telnet_tmp.vbs
echo WScript.Sleep 1 >>telnet_tmp.vbs
echo sh.SendKeys "{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 3 >>telnet_tmp.vbs
echo sh.SendKeys "root{ENTER}" >>telnet_tmp.vbs
echo sh.SendKeys "root{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 100 >>telnet_tmp.vbs
Rem echo sh.SendKeys "reboot{ENTER}">>telnet_tmp.vbs
start telnet
cscript //nologo telnet_tmp.vbs
del telnet_tmp.vbs
Rem 对于SendKeys这个命令可以send什么,我们可以看下面的列表:
Rem BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
Rem BREAK {BREAK}
Rem CAPS LOCK {CAPSLOCK}
Rem DEL or DELETE {DELETE} or {DEL}
Rem DOWN ARROW {DOWN}
Rem END {END}
Rem ENTER {ENTER}or ~
Rem ESC {ESC}
Rem HELP {HELP}
Rem HOME {HOME}
Rem INS or INSERT {INSERT} or {INS}
Rem LEFT ARROW {LEFT}
Rem NUM LOCK {NUMLOCK}
Rem PAGE DOWN {PGDN}
Rem PAGE UP {PGUP}
Rem PRINT SCREEN {PRTSC}
Rem RIGHT ARROW {RIGHT}
Rem SCROLL LOCK {SCROLLLOCK}
Rem TAB {TAB}
Rem UP ARROW {UP}
Rem F1 {F1}
Rem F2 {F2}
Rem F3 {F3}
Rem F4 {F4}
Rem F5 {F5}
Rem F6 {F6}
Rem F7 {F7}
Rem F8 {F8}
Rem F9 {F9}
Rem F10 {F10}
Rem F11 {F11}
Rem F12 {F12}
Rem F13 {F13}
Rem F14 {F14}
Rem F15 {F15}
Rem F16 {F16}
Rem
Rem SHIFT +
Rem CTRL ^
Rem ALT %
@echo off
echo set sh=WScript.CreateObject("WScript.Shell") >telnet_tmp.vbs
Rem 等待1毫秒
echo WScript.Sleep 1 >>telnet_tmp.vbs
echo sh.SendKeys "open 192.168.1.1" >>telnet_tmp.vbs
echo WScript.Sleep 1 >>telnet_tmp.vbs
echo sh.SendKeys "{ENTER}" >>telnet_tmp.vbs
echo WScript.Sleep 3 >>telnet_tmp.vbs
echo sh.SendKeys "root{ENTER}" >>telnet_tmp.vbs
echo sh.SendKeys "root{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 100 >>telnet_tmp.vbs
Rem echo sh.SendKeys "reboot{ENTER}">>telnet_tmp.vbs
start telnet
cscript //nologo telnet_tmp.vbs
del telnet_tmp.vbs
Rem 对于SendKeys这个命令可以send什么,我们可以看下面的列表:
Rem BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
Rem BREAK {BREAK}
Rem CAPS LOCK {CAPSLOCK}
Rem DEL or DELETE {DELETE} or {DEL}
Rem DOWN ARROW {DOWN}
Rem END {END}
Rem ENTER {ENTER}or ~
Rem ESC {ESC}
Rem HELP {HELP}
Rem HOME {HOME}
Rem INS or INSERT {INSERT} or {INS}
Rem LEFT ARROW {LEFT}
Rem NUM LOCK {NUMLOCK}
Rem PAGE DOWN {PGDN}
Rem PAGE UP {PGUP}
Rem PRINT SCREEN {PRTSC}
Rem RIGHT ARROW {RIGHT}
Rem SCROLL LOCK {SCROLLLOCK}
Rem TAB {TAB}
Rem UP ARROW {UP}
Rem F1 {F1}
Rem F2 {F2}
Rem F3 {F3}
Rem F4 {F4}
Rem F5 {F5}
Rem F6 {F6}
Rem F7 {F7}
Rem F8 {F8}
Rem F9 {F9}
Rem F10 {F10}
Rem F11 {F11}
Rem F12 {F12}
Rem F13 {F13}
Rem F14 {F14}
Rem F15 {F15}
Rem F16 {F16}
Rem
Rem SHIFT +
Rem CTRL ^
Rem ALT %