| View previous topic :: View next topic |
| Author |
Message |
Dami Master Cheater
Reputation: 0
Joined: 23 Oct 2006 Posts: 336
|
Posted: Fri Oct 10, 2008 8:30 am Post subject: [C#] Reading other process pointer value |
|
|
Can you read other processes pointer values on c#?
i tried someways with "ReadProcessMemory" but didnt get anything smart out of it :/
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Fri Oct 10, 2008 9:37 am Post subject: |
|
|
Do you know how pointers work?
Read base address value and then read the address of that value + offset.
|
|
| Back to top |
|
 |
Dami Master Cheater
Reputation: 0
Joined: 23 Oct 2006 Posts: 336
|
Posted: Fri Oct 10, 2008 10:47 am Post subject: |
|
|
| Symbol wrote: | Do you know how pointers work?
Read base address value and then read the address of that value + offset. |
Yeah i did so...
I think i have a small problem in the code or something
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Oct 10, 2008 12:27 pm Post subject: |
|
|
| Well, post the source
|
|
| Back to top |
|
 |
Dami Master Cheater
Reputation: 0
Joined: 23 Oct 2006 Posts: 336
|
Posted: Fri Oct 10, 2008 4:52 pm Post subject: |
|
|
I was succesful on reading normal address value...
How can i get the pointer address out of the mem address?
| Code: | IntPtr MEC = (IntPtr)0x00803428;
int hahmoA = BitConverter.ToInt32(pKernel.ReadProcessMemory(MEC, 4), 0);
int ihahmo = hahmoA + 0x10;
//Then read value of ihahmo ?
Value.Text = hahmoA.ToString();
// |
What should i use to get the pointer address ?
Example if the pointer is
00803428 + 10
Edit: How should i even read the address?
Int is no good, and i didnt find a trace of dword
Last edited by Dami on Fri Oct 10, 2008 5:09 pm; edited 1 time in total |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Oct 10, 2008 5:05 pm Post subject: |
|
|
I guess you're using some kind of wrapper class for the memory stuff?
Read the base, the value you get from that address is what you want, then add the offset. Repeat until done.
Yes, read from 'ihahmo', and so forth.
|
|
| Back to top |
|
 |
Dami Master Cheater
Reputation: 0
Joined: 23 Oct 2006 Posts: 336
|
Posted: Fri Oct 10, 2008 5:13 pm Post subject: |
|
|
| slovach wrote: | I guess you're using some kind of wrapper class for the memory stuff?
Read the base, the value you get from that address is what you want, then add the offset. Repeat until done.
Yes, read from 'ihahmo', and so forth. |
Thanks, really...
I had my code problem solved yesterday already, but because i was so angry and sleepy when i got nothing done (4am) i didnt see a small problem at...
| Code: | IntPtr CHARACTERADDRESS = (IntPtr)0x00803428;
int hahmoA = BitConverter.ToInt32(pKernel.ReadProcessMemory(CHARACTERADDRESS, 4), 0);
int ihahmo = hahmoA + 0x10;
IntPtr CharX = (IntPtr)ihahmo;
int hahmoB = BitConverter.ToInt32(pKernel.ReadProcessMemory(CharX, 4), 0);
CharXvalue.Text = hahmoB.ToString(); <-- This was CharX, it was meant to be hahmoB, like it is now :)
CharYvalue.Text = hahmoA.ToString(); |
Edit: do i have something i shouldnt have there?
| Code: | IntPtr CHARACTERADDRESS = (IntPtr)0x00803f94;
int hahmoA = BitConverter.ToInt32(pKernel.ReadProcessMemory(CHARACTERADDRESS, 4), 0);
int ihahmox = hahmoA + 0x638;
IntPtr CharX = (IntPtr)ihahmox;
int hahmoB = BitConverter.ToInt32(pKernel.ReadProcessMemory(CharX, 4), 0);
CharXvalue.Text = hahmoB.ToString();
int ihahmoy = hahmoA + 0x63C;
IntPtr CharY = (IntPtr)ihahmoy;
int hahmoC = BitConverter.ToInt32(pKernel.ReadProcessMemory(CharY, 4), 0);
CharYvalue.Text = hahmoC.ToString(); |
I dont want to make my code too messy or slow
~~Well messy or not, but its working like a charm!
Case closed!
|
|
| Back to top |
|
 |
|