- UID
- 4300
注册时间2005-11-4
阅读权限40
最后登录1970-1-1
独步武林
TA的每日心情 | 开心 2022-7-9 18:18 |
---|
签到天数: 12 天 [LV.3]偶尔看看II
|
1,论坛ID:笨鸟我先飞
2。爱好编程,努力学习delphi中。希望能和密界高手学习
3。creakme实在是没写过。附上自己写的诛仙看血工具源码望通过;
首先,通过CE5.2搜索到诛仙的最新基址为((((00917B3C+1c)+1c)+28)+254)=hp;
((((00917B3C+1c)+1c)+28)+258)=MP;
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls,tlhelp32;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
xs: TLabeledEdit;
Label1: TLabel;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function readadd:thandle;{枚举进程找到游戏进程id,然后把id赋给result以便以后调用}
VAR
phandle:tprocessentry32;
myhandle:thandle;
myloop:boolean;
begin
myhandle:=tlhelp32.CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
phandle.dwSize:=sizeof(phandle);
myloop:=tlhelp32.Process32First(myhandle,phandle);
while integer(myloop)<>0 do
begin
if phandle.szExeFile='elementclient.exe' then
result:=phandle.th32ProcessID;
myloop:=tlhelp32.Process32Next(myhandle,phandle);
end;
//result:=0;
closehandle(myhandle);
end;
function readsmth(r_addr:pointer):dword;//定义一个读内存的函数方便以后调用之。
var
g_handle1:thandle;
g_buffer:dword;
num:cardinal;
begin
g_handle1:=openprocess(PROCESS_ALL_ACCESS,false,readadd);
if g_handle1=0 then
messagebox(0,'游戏未运行?','友情提示',0)
else
readprocessmemory(g_handle1,r_addr,@g_buffer,4,num);
result:=g_buffer;
closehandle(g_handle1);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
const
myaddr=$00917B3C;
var
mybuffer,hpbuffer1,hpbuffer2,zx_hp,jq3:dword;
myh1,myh2:thandle;
ss: cardinal;
begin
//myh1:=openprocess(process_all_access,false,readadd);
mybuffer:=readsmth(pointer(myaddr));
hpbuffer1:=readsmth(pointer(mybuffer+$1c));
hpbuffer2:=readsmth(pointer(hpbuffer1+$28));
zx_hp:=readsmth(pointer(hpbuffer2+$254));
jq3:=readsmth(pointer(hpbuffer2+$258));
xs.Text:=inttostr(zx_hp);
edit1.Text:=inttostr(jq3);
end;
end.
代码有些晦涩难懂,还请各位大牛高抬贵手。/:001
[ 本帖最后由 笨鸟我先飞 于 2007-11-2 18:05 编辑 ] |
|