secureCRT自动登录配置脚本

#filename: fk3.vbs

 

#$language = "VBScript"
#$interface = "1.0"

Sub main
  crt.Screen.Synchronous = True

  crt.Screen.WaitForString "ogin: "
  crt.Screen.Send "huz" & VbCr

  crt.Screen.WaitForString "assword:"
  crt.Screen.Send "cxwh123!" & VbCr

  crt.Screen.WaitForString ">"
  crt.Screen.Send "ssh [email protected]" & VbCr    
  crt.Screen.WaitForString "assword:"
  crt.Screen.Send "cxwh0755" & VbCr 

  crt.Screen.WaitForString "Input device: "
  crt.Screen.Send "162" & VbCr
  crt.Screen.WaitForString "Input accounts:"
  crt.Screen.Send "5" & VbCr
 
  crt.Screen.WaitForString "S2-E-YZ-WANGGUAN's username:"
  crt.Screen.Send "cxhz" & VbCr
  crt.Screen.WaitForString "assword:"
  crt.Screen.Send "kzh0755" & VbCr
 
  crt.Screen.WaitForString ">"
  crt.Screen.Send "telnet 109.243.210.46" & VbCr
  crt.Screen.WaitForString "ogin: "
  crt.Screen.Send "cxhz" & VbCr
  crt.Screen.WaitForString "assword:"
  crt.Screen.Send "hzh777" & VbCr
 
  crt.Screen.WaitForString "#"
   crt.Screen.Send "set -o vi" & VbCr
   crt.Screen.Send "TMOUT=0" & VbCr
  crt.Screen.Synchronous = False

End Sub

你可能感兴趣的:(Other,vbscript,input,interface,脚本,ssh)