telnet自动登录路批处理

 telnet自动登录路由器、交换机等网络设备的批处理


@echo off


echo set sh=WScript.CreateObject("WScript.Shell") >telnet_tmp.vbs


echo WScript.Sleep 300 >>telnet_tmp.vbs


echo sh.SendKeys "open 你的网络设备telnet登录IP" >>telnet_tmp.vbs


echo WScript.Sleep 300 >>telnet_tmp.vbs


echo sh.SendKeys "{ENTER}" >>telnet_tmp.vbs


echo WScript.Sleep 300 >>telnet_tmp.vbs


echo sh.SendKeys "你的用户名{ENTER}">>telnet_tmp.vbs


echo WScript.Sleep 300 >>telnet_tmp.vbs


echo sh.SendKeys "你的密码{ENTER}">>telnet_tmp.vbs


start telnet


cscript //nologo telnet_tmp.vbs


del telnet_tmp.vbs






解释࿱
posted @ 2014-12-08 08:37  SuperThinker  阅读(22)  评论(0编辑  收藏  举报  来源