用批处理如何实现telnet登陆并进行一些简单命令
具体如下命令:先登陆到192.168.1.100.telnet192.168.0.100Username:aaaPassword:111登陆之后做几个简单的ping操作p...
具体如下命令:
先登陆到192.168.1.100.
telnet 192.168.0.100
Username:aaa
Password:111
登陆之后做几个简单的ping操作
ping 192.168.0.1
ping 192.168.0.2
请问用cmd的批处理如何实现?
回一楼的,肯定可以的,我要登陆的是台路由,我见有人做过可行的。 展开
先登陆到192.168.1.100.
telnet 192.168.0.100
Username:aaa
Password:111
登陆之后做几个简单的ping操作
ping 192.168.0.1
ping 192.168.0.2
请问用cmd的批处理如何实现?
回一楼的,肯定可以的,我要登陆的是台路由,我见有人做过可行的。 展开
2个回答
展开全部
把如下代码保存为批处理(*.bat)
rem =========Yobo-lily版权=======
@del c:\temp.vbs
@echo on error resume next >>c:\temp.vbs
@echo dim WshShell>>c:\temp.vbs
@echo Set WshShell = WScript.CreateObject("WScript.Shell")>>c:\temp.vbs
@echo WshShell.run"cmd">>c:\temp.vbs
@echo WshShell.AppActivate"c:\windows\system32\cmd.exe">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"telnet 192.168.1.100">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 100>>c:\temp.vbs
@echo WshShell.AppActivate"telnet.exe ">>c:\temp.vbs
@echo WScript.Sleep 2000>>c:\temp.vbs
@echo WshShell.SendKeys"aaa">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 2000>>c:\temp.vbs
@echo WshShell.SendKeys"111">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 2000>>c:\temp.vbs
@echo WshShell.SendKeys"ping 192.168.0.1">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 1000>>c:\temp.vbs
@echo WshShell.SendKeys"ping 192.168.0.2">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 1000>>c:\temp.vbs
@call c:\temp.vbs
rem =========Yobo-lily版权=======
rem =========Yobo-lily版权=======
@del c:\temp.vbs
@echo on error resume next >>c:\temp.vbs
@echo dim WshShell>>c:\temp.vbs
@echo Set WshShell = WScript.CreateObject("WScript.Shell")>>c:\temp.vbs
@echo WshShell.run"cmd">>c:\temp.vbs
@echo WshShell.AppActivate"c:\windows\system32\cmd.exe">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"telnet 192.168.1.100">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 100>>c:\temp.vbs
@echo WshShell.AppActivate"telnet.exe ">>c:\temp.vbs
@echo WScript.Sleep 2000>>c:\temp.vbs
@echo WshShell.SendKeys"aaa">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 2000>>c:\temp.vbs
@echo WshShell.SendKeys"111">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 2000>>c:\temp.vbs
@echo WshShell.SendKeys"ping 192.168.0.1">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 1000>>c:\temp.vbs
@echo WshShell.SendKeys"ping 192.168.0.2">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 1000>>c:\temp.vbs
@call c:\temp.vbs
rem =========Yobo-lily版权=======
光派通信
2024-09-03 广告
2024-09-03 广告
对光传输设备进行调试和维护需要掌握一定的专业知识和技术,包括光功率计、光谱分析仪等测试仪器的使用,以及对光传输系统的工作原理和性能指标的深入理解。深圳市光派通信技术有限公司提供专业的技术支持和服务,可为客户提供全面的光传输设备调试和维护解决...
点击进入详情页
本回答由光派通信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询