- 帖子
- 7
- 积分
- 20
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2015-5-7
|
2楼
发表于 2017-9-16 09:56
| 只看该作者
我有一个差不多的命令,你试试看。我们都是直接telnet 不需要端口号。
@echo off
echo set sh=WScript.CreateObject("WScript.Shell") >telnet_tmp.vbs
echo WScript.Sleep 300 >>telnet_tmp.vbs
echo sh.SendKeys "ping 192.168.1.12 -l 128">>telnet_tmp.vbs
cho WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "open 192.168.1.1 10128">>telnet_tmp.vbs
cho WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "username{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "password{ENTER}">>telnet_tmp.vbs
start telnet
echo sh.SendKeys "command{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs |
|