unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
var
NewData : array[0..1] of byte = ($90,$90);
Bytesread : DWORD;
procedure TForm1.Button1Click(Sender: TObject);
var
hwin, pid: DWORD;
hprocess: DWORD;
begin
hwin := FindWindow(nil,'Text CM');
ModuleListHandle := CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId);
hprocess := OpenProcess(PROCESS_ALL_ACCESS, False, GetCurrentProcessId);
ModuleStruct.dwSize := sizeof(ModuleStruct);
GetWindowThreadProcessId(hwin, pid);
if ModuleStruct.szModule='mokuai.dll' then
begin base:=STRTOINT('$'+format('%.8X' ,[Integer(ModuleStruct.modBaseAddr)]));
if WriteProcessMemory(hprocess, pointer(base+$BBFF2), @newdata, 8 ,BytesRead ) then
label1.Caption:=' 指定目标已经K.O了 ';
end
else
begin
CloseHandle(hProcess);
label1.Caption:=' 指定目标不知道为啥失败了 ';
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
hwin, pid: DWORD;
hprocess: DWORD;
ModuleListHandle: Thandle;
ModuleStruct: tMODULEENTRY32;
end;
end.
哪里出问题啊,谁帮我看看该怎么写啊?
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)