SecureCRT telnet自动采集脚本

    xiaoxiao2021-04-19  137

    #$Language = "VBScript" #$Interface = "1.0" Sub Main() logpath = "C:\Users\Wo\Desktop\CmnetTool\cmnet\backup\" crt.Session.LogFileName = logpath & "XX市-19.168.1.1" & Year(Now) & "-" & Month(Now) & "-" & Day(Now) & "-" & Hour(Now) & "-" & Minute(Now) & ".txt" crt.Session.Log True crt.Session.Connect("/telnet 192.168.1.1")      crt.Screen.WaitForString "Username:"                crt.Screen.send "admin" & chr(13) crt.Screen.WaitForString "Password:"               crt.Screen.send "Admin@123" & chr(13) crt.Screen.WaitForString ">" crt.Screen.Send "dis cu" & chr(13)  Do while (crt.Screen.WaitForString("  ---- More ----",3)<>False)   crt.Screen.Send "         "  Loop crt.Screen.Send chr(13) crt.Screen.WaitForString ">" crt.Screen.Send "display clock"  crt.Screen.Send chr(13) crt.Screen.WaitForString ">" crt.Session.Log False crt.Session.Disconnect crt.quit End Sub 在bat文件中引用即可。 C:\Users\wo\Desktop\CmnetTool\cmnet\SecureCRT\SecureCRT /SCRIPT C:\Users\wo\Desktop\CmnetTool\cmnet\tool\Huawei.vbs
    转载请注明原文地址: https://ju.6miu.com/read-676160.html

    最新回复(0)