还未结束就能把自身删除的程序delphi版
var
pExitProcess: Pointer;
pDeletefile: Pointer;
pUnmapViewOffile: Pointer;
hModule: THANDLE;
cBuf:array[0..MAX_PATH]of Char;
begin
hModule := GetModuleHandle('kernel32');
if hModule <> 0 then
begin
pExitProcess := GetProcAddress(hModule, 'ExitProcess');
pDeleteFile := GetProcAddress(hModule, 'DeleteFileA');
pUnmapViewOfFile := GetProcAddress(hModule, 'UnmapViewOfFile');
end else
begin
pExitProcess := nil;
pDeleteFile := nil;
pUnmapViewOfFile := nil;
end;
hModule := GetModuleHandle(nil);
GetModuleFileName(hModule, cBuf, Sizeof(cBuf));
CloseHandle(THANDLE(4));
asm
XOR EAX, EAX;
PUSH EAX;
PUSH EAX;
LEA EAX, cBuf;
PUSH EAX;
MOV EAX, pExitProcess; PUSH EAX; MOV EAX, hModule; PUSH EAX; MOV EAX, pDeleteFile;
PUSH EAX;
MOV EAX, pUnmapViewOfFile;
PUSH EAX;
RET;
end;
end;
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论