Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: Elemental Code en 12 Julio 2010, 06:41 am



Título: [SRC] Nod 32 Downloader 1.6.1
Publicado por: Elemental Code en 12 Julio 2010, 06:41 am
Nod 32 Downloader
=================

¿Para que Sirve?
Sirve?
Para descargar versiones comerciales de los antivirus de ESET hace falta acceder de la siguiente manera:
http://User:pass@URLDeDescarga
Esto obtiene el user y password y lo descarga sin intervencion.

¿Como lo hace?
Se conecta a internet, obtiene el codigo fuente de nod321, lo recorta para sacar los user y password, y con un control INET descarga el archivo.

ScreenShot
(http://i26.tinypic.com/112bvag.jpg)

Descarga
Código:
http://depositfiles.com/files/906myehgc


Sinceramente, de lo unico que dudo es sobre el control inet en la descarga.
Fue la unica descarga con progressbar que encontre.


Título: Re: [SRC] Nod 32 Downloader 1.6.1
Publicado por: BlackZeroX en 12 Julio 2010, 08:08 am

Esta bonito pero la vdd que ver un ProgressBAr y no cuanto va pues como que me desiluiona asi que solo edite un poco el código:

Solo Reemplacen la funcion y listo!¡.

Código
  1.  
  2. Public Sub DownloadFile(strURL As String, strDestination As String) 'As Boolean
  3. Const CHUNK_SIZE        As Long = 1024
  4. Dim intFile             As Integer
  5. Dim lngBytesReceived    As Long
  6. Dim lngFileLength       As Long
  7. Dim strHeader           As String
  8. Dim b()                 As Byte
  9. Dim i                   As Integer
  10. Dim AntSecond           As Integer
  11. Dim Velocidad           As Long
  12. Dim AntBytes            As Long
  13.    With Inet1
  14.        .URL = strURL
  15.        .Execute , "GET", , "Range: bytes=" & CStr(lngBytesReceived) & "-" & vbCrLf
  16.        While .StillExecuting
  17.            DoEvents
  18.        Wend
  19.        strHeader = .GetHeader
  20.    End With
  21.    strHeader = Inet1.GetHeader("Content-Length")
  22.    lngFileLength = Val(strHeader)
  23.    DoEvents
  24.    lngBytesReceived = 0
  25.    intFile = FreeFile()
  26.    Open strDestination For Binary Access Write As intFile
  27.        AntSecond = Second(Time)
  28.        Do
  29.            b = Inet1.GetChunk(CHUNK_SIZE, icByteArray)
  30.            Put intFile, , b
  31.            lngBytesReceived = lngBytesReceived + UBound(b, 1) + 1
  32.            lblEstado.Caption = Velocidad / 1024 & " kb/s (" & lngBytesReceived / 1024 & " kb-" & lngFileLength / 1024 & " kb)"
  33.            If AntSecond <> Second(Time) Then
  34.                Velocidad = lngBytesReceived - AntBytes
  35.                AntBytes = lngBytesReceived
  36.                AntSecond = Second(Time)
  37.            End If
  38.            DownloadProgress (Round((lngBytesReceived / lngFileLength) * 100))
  39.            DoEvents
  40.        Loop While UBound(b, 1) > 0
  41.    Close intFile
  42. End Sub
  43.  
  44.  

Sangriento Infierno Lunar!¡.