利用SecureCRT实现中兴C220自动登录 javascript
利用SecureCRT实现中兴C220自动登录 原理介绍:利用secureCRT6.7 实现此C220自动登录 去掉繁琐了输入过程 运行效果图:
选择 脚本 并执行下面的脚本即可!
脚本代码如下:
# $language = "JScript"
# $interface = "1.0"
var ForReading = 1, ForWriting = 2, ForAppending = 8;
var objTab;
crt.Screen.Synchronous = true;
function main()
{
var fso,c220,f; var mc = crt.Dialog.Prompt("输入主机ip:", "Logon Script", "", false); if(trim(mc)==""){return;} objTab=crt.Session.ConnectInTab("/telnet " + mc); objTab.Screen.WaitForString("Username:"); objTab.Screen.Send("zte\r"); objTab.Screen.WaitForString("Password:"); objTab.Screen.Send("zte\r");