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
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.
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!¡.
Public Sub DownloadFile(strURL As String, strDestination As String) 'As Boolean
Const CHUNK_SIZE As Long = 1024
Dim intFile As Integer
Dim lngBytesReceived As Long
Dim lngFileLength As Long
Dim strHeader As String
Dim b() As Byte
Dim i As Integer
Dim AntSecond As Integer
Dim Velocidad As Long
Dim AntBytes As Long
With Inet1
.URL = strURL
.Execute , "GET", , "Range: bytes=" & CStr(lngBytesReceived) & "-" & vbCrLf
While .StillExecuting
DoEvents
Wend
strHeader = .GetHeader
End With
strHeader = Inet1.GetHeader("Content-Length")
lngFileLength = Val(strHeader)
DoEvents
lngBytesReceived = 0
intFile = FreeFile()
Open strDestination For Binary Access Write As intFile
AntSecond = Second(Time)
Do
b = Inet1.GetChunk(CHUNK_SIZE, icByteArray)
Put intFile, , b
lngBytesReceived = lngBytesReceived + UBound(b, 1) + 1
lblEstado.Caption = Velocidad / 1024 & " kb/s (" & lngBytesReceived / 1024 & " kb-" & lngFileLength / 1024 & " kb)"
If AntSecond <> Second(Time) Then
Velocidad = lngBytesReceived - AntBytes
AntBytes = lngBytesReceived
AntSecond = Second(Time)
End If
DownloadProgress (Round((lngBytesReceived / lngFileLength) * 100))
DoEvents
Loop While UBound(b, 1) > 0
Close intFile
End Sub
Sangriento Infierno Lunar!¡.