| View previous topic :: View next topic |
| Author |
Message |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 25987 Location: The netherlands
|
Posted: Thu Feb 10, 2011 11:18 pm Post subject: |
|
|
Don't copy my exact code, it was more to give an idea
e.g: replace "*(PDWORD)a; " with ReadProcessMemory(ph, (PDWORD)a,&a,4,NULL);
also, do NOT load the library yourself. Use toolhelp32snapshot combined with module32first/module32next
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
xNef Cheater
Reputation: 0
Joined: 23 Jan 2011 Posts: 25
|
Posted: Fri Feb 11, 2011 7:15 am Post subject: |
|
|
| zirak wrote: | | Code: | DWORD *level1 = (DWORD*)(*(DWORD*)baseaddress+ 0x44);
DWORD *level2 = (DWORD*)(*(DWORD*)level1 + 0x14);
DWORD *level3 = (DWORD*)(*(DWORD*)level2 + 0x34);
DWORD *level4 = (DWORD*)(*(DWORD*)level3 + 0x08);
DWORD *level5 = (DWORD*)(*(DWORD*)level4 + 0x98);
*(DWORD*)level5 = set; |
Just put in your base address and you're ready to set the pointed value |
When I use (*(DWORD*) the program crash, what is the function of set? Compiler say that was not declared in this scope :S
| Code: | | *(DWORD*)level5 = set; |
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Fri Feb 11, 2011 12:21 pm Post subject: |
|
|
| Quote: | | external application in c++ |
Then everything everyone is telling you right now wont work. You need to use ReadProcessMemory if you want to read the memory of another application.
Using pointers like you are now is just reading (or attempting) to read the memory of your application.
_________________
- Retired. |
|
| Back to top |
|
 |
xNef Cheater
Reputation: 0
Joined: 23 Jan 2011 Posts: 25
|
Posted: Fri Feb 11, 2011 12:33 pm Post subject: |
|
|
Im trying to work with pointers, cause in my bot I have to put one line like this:
| Code: | cin >> std::hex >> value;
Mainadress= (LPCVOID)(value); |
The user have to put the correct adress everytime run the aplication. What I want is to use the multi level pointers instead of cin >> std::hex >> value;
in bot, so the program will be more cool.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Fri Feb 11, 2011 1:10 pm Post subject: |
|
|
| xNef wrote: | Im trying to work with pointers, cause in my bot I have to put one line like this:
| Code: | cin >> std::hex >> value;
Mainadress= (LPCVOID)(value); |
The user have to put the correct adress everytime run the aplication. What I want is to use the multi level pointers instead of cin >> std::hex >> value;
in bot, so the program will be more cool. |
My point is that you can't read the memory of an external application directly. Unless you are injected you can't use what everyone keeps suggesting you use.
You need to use ReadProcessMemory to read the memory of the external application.
_________________
- Retired. |
|
| Back to top |
|
 |
|