|
代码原来是别人 VC写的
C++代码
DWORD fpid,epid;
void VMM()
{
PROCESSENTRY32 pe;
HANDLE hkz=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
pe.dwSize=sizeof(PROCESSENTRY32);
if (Process32First(hkz,&pe))
{
do
{
if (pe.th32ProcessID==GetCurrentProcessId())
{
fpid=pe.th32ParentProcessID;
}
if (stricmp(pe.szExeFile,\"explorer.exe\")==0)
{
epid=pe.th32ProcessID;
}
}
while(Process32Next(hkz,&pe));
}
}
主函数里:
VMM();
if(fpid!=epid)
return 0;
我写的 DELPHI 版 ..
XML/HTML代码
//===突破卡吧高级虚拟机启发式查毒『DELPHI版』==
//=== 作者;雪落的瞬间 , QQ:418880764===
//===== WED:Http://www.hackceo.com ======
//===说明:把网上C代码转换为DELPHI版===
//======转载请保留作者版权=======
uses
windows,
Tlhelp32;
var
PIdA,PidB:DWORD;
Function LowerCase(const S: string): string;
var
kixoebvq: Integer;
begin
kixoebvq := Length(S);
SetString(Result, PChar(S), kixoebvq);
if kixoebvq > 0 then CharLowerBuff(Pointer(Result), kixoebvq);
end;
procedure kisfind ();
var
processinfo:TProcessEntry32;
snapprocesshand:THANDLE;
xh:BOOL;
begin
snapprocesshand:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
processinfo.dwSize:=sizeof(processinfo);
xh:=process32first(snapprocesshand,processinfo);
while integer(xh)<>0 do
begin
if processinfo.th32ProcessID = GetCurrentProcessId()then
begin
PidA:= processinfo.th32ParentProcessID;
end else begin
If LowerCase(processinfo.szExeFile) = 'explorer.exe' then
begin
PidB:= processinfo.th32ProcessID
end;
end;
xh:=process32Next(snapprocesshand,processinfo);
end;
CloseHandle(snapprocesshand);
end;
//入口
begin
kisfind();
if PIdA = PidB then
begin
end else begin
exit;
end;
end. |
|