码迷,mamicode.com
首页 > 其他好文 > 详细

SecurtCRT批量带判断输用户名密码执行命令

时间:2015-05-13 20:00:34      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:securtcrt 判断

#$Language="VBScript"

#$Interface="1.0"

crt.Screen.Synchronous=True

Sub Main()

Dim num

For num = 1 To 100 Step 1

crt.Screen.Send "ssh 192.168.1."&num&chr(13)

crt.Sleep 1000

if (crt.Screen.WaitForString ("Are you sure you want to continue connecting (yes/no)?",1)<>False) then

crt.Sleep 1000

crt.Screen.Send "yes" & chr(13)

crt.Sleep 2000

end if

crt.Screen.WaitForString "Password:"

crt.Sleep 1000

crt.Screen.Send "PASSWD" & chr(13)

crt.Sleep 2000

        crt.Screen.Send  "command" & chr(13)

        crt.Sleep 2000

        crt.Screen.Send "exit" & chr(13)

        crt.Sleep 2000

Next

End Sub


SecurtCRT批量带判断输用户名密码执行命令

标签:securtcrt 判断

原文地址:http://zhouzhenxing.blog.51cto.com/8220903/1651014

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!