| View previous topic :: View next topic |
| Author |
Message |
Pot.Smoking.Terrorist Expert Cheater
Reputation: 0
Joined: 15 Jun 2008 Posts: 175 Location: Germany
|
Posted: Sun May 24, 2009 3:26 pm Post subject: [Delphi] Trainer Creation... |
|
|
Hello,
I'm trying to code a trainer in Delphi, I've found a Tutorial (in German) but I stuck at the point to freezing the Address (static).
My Address is 0069bc34 with Offset 84C do I have to add the Address with the Offset (=69C480)?!
Thats my part of the Code to freeze the address:
| Code: | | WriteProcessMemory(HandleWindow,ptr($69C480),buf,3,write); |
I don't know what I should do with this code I'm very new to Delphi and have no idea...
Here's my the hole Source Code:
| Code: | unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
WindowName : integer;
ProcessId : integer;
ThreadId : integer;
buf : PChar;
HandleWindow : Integer;
write : cardinal;
Const WindowTitle = 'MANHUNT';
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const v1 = $90;
begin
WindowName := FindWindow(nil,WindowTitle);
If WindowName = 0 then MessageDlg('...erst spiel starten...dann trainer starten =)', mtwarning,[mbOK],0);
ThreadId := GetWindowThreadProcessId(WindowName,@ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS,False,ProcessId);
GetMem(buf,1);
buf^ := Chr(v1);
WriteProcessMemory(HandleWindow,ptr($69C480),buf,3,write);
FreeMem(buf);
closehandle(HandleWindow);
end;
end.
|
I hope anybody can help me
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 473
Joined: 09 May 2003 Posts: 25917 Location: The netherlands
|
Posted: Sun May 24, 2009 4:55 pm Post subject: |
|
|
First you have to Read(processmemory) the address at 0069bc34 as a 4 byte value
Then add the offset to that value (+84C)
Then typecast that value to a pointer and write(processmemory) the value you want to that pointer
Also, 3 isn't 1
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Pot.Smoking.Terrorist Expert Cheater
Reputation: 0
Joined: 15 Jun 2008 Posts: 175 Location: Germany
|
Posted: Mon May 25, 2009 1:24 am Post subject: |
|
|
Can you give me a Code example, please?
As I said: I'm very new to Delphi
|
|
| Back to top |
|
 |
shhac Expert Cheater
Reputation: 0
Joined: 30 Oct 2007 Posts: 108
|
Posted: Mon May 25, 2009 4:42 am Post subject: Re: [Delphi] Trainer Creation... |
|
|
As said by the previous person, the following is a contradiction. | psYchomantis wrote: | | the Address (static). |
| psYchomantis wrote: | | Address is 0069bc34 with Offset 84C | The actual information you've given us suggests a dynamic address.
I'm not familiar with Delphi so I'll just list what you need to do in order:
1. Value of pointer: ReadProcessMemory at 0069bc34 (4 bytes on 32 bit machine).
2. Address of what you want: Add 84C to this value.
3. Value of what you want: ReadProcessMemory again on this new value.
4. Refresh Value: Now WriteProcessMemory of the value of what you want to the address of what you want.
Now, after you've done this once, if the address changes frequently (the address, not the value), you have to do the following steps in a loop to 'freeze' the value: 1, 2, 4.
If it only changes once, i.e. on startup, then you only need to loop step 4.
|
|
| Back to top |
|
 |
Pot.Smoking.Terrorist Expert Cheater
Reputation: 0
Joined: 15 Jun 2008 Posts: 175 Location: Germany
|
Posted: Mon May 25, 2009 7:34 am Post subject: |
|
|
I don't know what you mean
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Mon May 25, 2009 8:34 am Post subject: |
|
|
first read the address (save the value)
than write on value + offset
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
Pot.Smoking.Terrorist Expert Cheater
Reputation: 0
Joined: 15 Jun 2008 Posts: 175 Location: Germany
|
Posted: Mon May 25, 2009 8:43 am Post subject: |
|
|
Ok, but can anybody give me a Code Example
I don't know how to make a Code with this function...
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Mon May 25, 2009 11:45 am Post subject: |
|
|
quick sketch. do the rest yourself
read(handle,0069bc34,out)
out += 84C
then write it from there
_________________
|
|
| Back to top |
|
 |
Pot.Smoking.Terrorist Expert Cheater
Reputation: 0
Joined: 15 Jun 2008 Posts: 175 Location: Germany
|
Posted: Mon May 25, 2009 12:25 pm Post subject: |
|
|
Very good I have to code something when I don't know the language I said I'm new to Delphi and I've never worked with ReadProcessMemory or WriteProcessMemory.
I searched in Google since yesterday evening, that didn't helped me. I've found 1 Tutorial where everybody says "Thanks It works fine for me" and in this code (see 1. Post) is nothing to see from ReadProcessMemory they only use WriteProcessMemory.
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Mon May 25, 2009 3:03 pm Post subject: |
|
|
then don't start with a trainer. learn your basics first.
_________________
|
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Mon May 25, 2009 4:17 pm Post subject: |
|
|
Here's C++ version, go and convert it.
| Code: | #define BASE_ADDRESS 0x0069bc34
#define OFFSET 0x84C
#define FREEZE_VALUE 0x01
BYTE NewValue[] = {FREEZE_VALUE};
DWORD dwBuffer = 0;
ReadProcessMemory(hProcess, BASE_ADDRESS, dwBuffer, sizeof(dwBuffer), 0);
ReadProcessMemory(hProcess, (dwBuffer + OFFSET), dwBuffer, sizeof(dwBuffer), 0);
while(ReadProcessMemory(hProcess, (dwBuffer + OFFSET), dwBuffer, sizeof(dwBuffer), 0))
if(dwBuffer != FREEZE_VALUE)
WriteProcessMemory(hProcess, (dwBuffer + OFFSET), NewValue, sizeof(NewValue), 0);
|
|
|
| Back to top |
|
 |
Pot.Smoking.Terrorist Expert Cheater
Reputation: 0
Joined: 15 Jun 2008 Posts: 175 Location: Germany
|
Posted: Mon May 25, 2009 4:34 pm Post subject: |
|
|
Very good... but: I can neighter Delphi nor C++
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Mon May 25, 2009 4:53 pm Post subject: |
|
|
| psYchomantis wrote: | Very good... but: I can neighter Delphi nor C++  |
Your biting off more than you can chew. Try learning a programing language first. Start with those lame hello worlds. After you have a foundation then try coding trainers.
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Mon May 25, 2009 10:31 pm Post subject: |
|
|
god damn it, saying that you don't know what to do isn't going to get you anywhere. learn something else first.
ex:
BASICS.
_________________
|
|
| Back to top |
|
 |
shhac Expert Cheater
Reputation: 0
Joined: 30 Oct 2007 Posts: 108
|
Posted: Tue May 26, 2009 9:49 am Post subject: |
|
|
Try reading the following links in order.
| Code: | http://www.delphibasics.co.uk/Article.asp?Name=FirstPgm
http://www.delphibasics.co.uk/RTL.asp?Name=While
http://www.delphipages.com/threads/thread.cfm?ID=185732&G=185722
http://www.elitepvpers.de/forum/co2-programming/181201-help-delphi-readprocessmemory.html | That will cover how to make an app with a button, how to do a loop, how to find a PID and how to use an API.
|
|
| Back to top |
|
 |
|