新建一个批处理bat文件,把这些命令都写进去。求大师帮忙
新建一个bat文件,把这些命令都写进去。telnet192.168.1.1rootadminshellgreptelecomadmin/mnt/jffs2/hw_ctre...
新建一个bat文件,把这些命令都写进去。
telnet 192.168.1.1
root
admin
shell
grep telecomadmin /mnt/jffs2/hw_ctree.xml
这是光猫获取超级密码的命令行
我的想法是将这些命令写进bat文件,然后执行bat文件就能直接显示最后的结果。
求大师帮忙啦,谢谢啦。
或者是提供其它解决方法也行 展开
telnet 192.168.1.1
root
admin
shell
grep telecomadmin /mnt/jffs2/hw_ctree.xml
这是光猫获取超级密码的命令行
我的想法是将这些命令写进bat文件,然后执行bat文件就能直接显示最后的结果。
求大师帮忙啦,谢谢啦。
或者是提供其它解决方法也行 展开
2个回答
展开全部
@echo off & cls & echo. & echo.
Pushd %~dp0
echo set sh=WScript.CreateObject("WScript.Shell")>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "open 192.168.1.1">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 2000>>telnet_tmp.vbs
echo sh.SendKeys "root{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "admin{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 2000>>telnet_tmp.vbs
echo sh.SendKeys "shell{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 2000>>telnet_tmp.vbs
echo sh.SendKeys "grep telecomadmin /mnt/jffs2/hw_ctree.xml{ENTER}">>telnet_tmp.vbs
start telnet
cscript //nologo telnet_tmp.vbs
del telnet_tmp.vbs
复制以上内容,另存为批处理文件,在Win7下测试OK,win7以上系统,请用管理员身份运行!另外请将英文输入法设为默认,不要设置中文输入法为默认,否则,会出错。如果须要上述命令的详细注释请pm我!
Pushd %~dp0
echo set sh=WScript.CreateObject("WScript.Shell")>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "open 192.168.1.1">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 2000>>telnet_tmp.vbs
echo sh.SendKeys "root{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 300>>telnet_tmp.vbs
echo sh.SendKeys "admin{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 2000>>telnet_tmp.vbs
echo sh.SendKeys "shell{ENTER}">>telnet_tmp.vbs
echo WScript.Sleep 2000>>telnet_tmp.vbs
echo sh.SendKeys "grep telecomadmin /mnt/jffs2/hw_ctree.xml{ENTER}">>telnet_tmp.vbs
start telnet
cscript //nologo telnet_tmp.vbs
del telnet_tmp.vbs
复制以上内容,另存为批处理文件,在Win7下测试OK,win7以上系统,请用管理员身份运行!另外请将英文输入法设为默认,不要设置中文输入法为默认,否则,会出错。如果须要上述命令的详细注释请pm我!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询