工作之余抽点时间出来写写博文,希望对新接触的朋友有帮助。今天在这里和大家一起学习一下内容版本
SecureCRT脚本
js版本
XX.js内容如下:
# $language = "JScript"
# $interface = "1.0"crt.screen.send("\n")
crt.screen.send("su - opr\n") crt.screen.WaitForString("Password:",10) crt.screen.send("#log\n") crt.screen.send("stg\n") crt.screen.send("slogssh -s test XX.XX.XX.XX\n") crt.screen.send("cd /XX/XX.log\n") crt.screen.send("tail -f XX.log\n")
VBScript版本
XX.vbs内容如下:
#$language = "VBScript"
#$interface = "1.0"Sub main
' turn on synchronous mode so we don't miss any data crt.Screen.Synchronous = True' Wait for a string that looks like "login: " or "Login: "
crt.Screen.WaitForString "login: " 每日一道理 哦,妈妈 亲爱的妈妈,您对我的爱比太阳还要炽热,比白雪更为圣洁。在我成长的道路上,您就是女儿夏日里的浓荫,冬天里的炭火,您更是女儿人生路上的一盏明灯。
' Send your username followed by a carriage return
crt.Screen.Send "su - opr" & VbCr' Wait for a tring that looks like "password: " or "Password: "
crt.Screen.WaitForString "assword:"' Send your password followed by a carriage return
crt.Screen.Send "#log" & VbCr' Send your password followed by a carriage return
crt.Screen.Send "stg" & VbCr crt.Screen.Send "slogssh -s test XX.XX.XX.XX & VbCr crt.Screen.Send "cd /XX/XX.log" & VbCr ' turn off synchronous mode to restore normal input processing crt.Screen.Synchronous = False End Sub
文章结束给大家分享下程序员的一些笑话语录: 那是习惯决定的,一直保持一个习惯是不好的!IE6的用户不习惯多标签,但是最终肯定还是得转到多标签的浏览器。历史(软件UI)的进步(改善)不是以个人意志(习惯)为转移的!