Making C++ Hacks

Posts 16–29 of 29 · Page 2 of 2
hi have a problem with this code ( multi pointer )

can you help me ?

Baseadress=0x1434156D0
Offsets for read

Read(0x1434156D0)->r(0x68)->r(0x578)->r(0x1D48)->r(0x0670)->r(0x4A18)->r(0x0018)->r(0x0038)

And write
float (0x03D4, 0.0f);
float (0x03C8, 100.0f);

what must i do for a simple hack ? ( with press 1 key )??
Quote Originally Posted by kendoyavuz View Post
hi have a problem with this code ( multi pointer )

can you help me ?

Baseadress=0x1434156D0
Offsets for read

Read(0x1434156D0)->r(0x68)->r(0x578)->r(0x1D48)->r(0x0670)->r(0x4A18)->r(0x0018)->r(0x0038)

And write
float (0x03D4, 0.0f);
float (0x03C8, 100.0f);

what must i do for a simple hack ? ( with press 1 key )??
You don't need offsets to read from an address, you can just do a:
Code:
int ValueToRead; // Considering it's a normal integer you want to read
ReadProcessMemory(Handle, reinterpret_cast<void*>(0x1434156D0), &ValueToRead, sizeof(ValueToRead), nullptr);
std::cout << "Value read: " << ValueToRead << std::endl;
And to write those 2 you can just do
Code:
for(;;){ // Infinite loop so that the values remain the same, else it will only change once
if(GetAsyncKeyState(VK_F6)){ // If the key F6 is pressed the hack is activated
float ValueToWrite = 100.0;
float ValueToWrite2 = 0;
WriteProcessMemory(Handle, reinterpret_cast<void*>(0x03C8), ValueToWrite, sizeof(ValueToWrite), nullptr);
WriteProcessMemory(Handle, reinterpret_cast<void*>(0x03D4), ValueToWrite2, sizeof(ValueToWrite2), nullptr);
    }
}
Quote Originally Posted by Timbojh21 View Post
Not trying to "hack"

I am just trying to read the data, convert it to a percentage, and then press a key when it reaches lets say 50%
That depends on how the value is read. Do the cheat engine thing and tell me what the normal value you get is. Then I'll tell you more. I can't really do anything + understand everything :/
Quote Originally Posted by Tightmarrow View Post
You don't need offsets to read from an address, you can just do a:
Code:
int ValueToRead; // Considering it's a normal integer you want to read
ReadProcessMemory(Handle, reinterpret_cast<void*>(0x1434156D0), &ValueToRead, sizeof(ValueToRead), nullptr);
std::cout << "Value read: " << ValueToRead << std::endl;
And to write those 2 you can just do
Code:
for(;;){ // Infinite loop so that the values remain the same, else it will only change once
if(GetAsyncKeyState(VK_F6)){ // If the key F6 is pressed the hack is activated
float ValueToWrite = 100.0;
float ValueToWrite2 = 0;
WriteProcessMemory(Handle, reinterpret_cast<void*>(0x03C8), ValueToWrite, sizeof(ValueToWrite), nullptr);
WriteProcessMemory(Handle, reinterpret_cast<void*>(0x03D4), ValueToWrite2, sizeof(ValueToWrite2), nullptr);
    }
}


That depends on how the value is read. Do the Cheat Engine thing and tell me what the normal value you get is. Then I'll tell you more. I can't really do anything + understand everything :/
Yes, let me explain how Cheat Engine works:
You input a value, let's say 12.
Cheat Engine searches for the value with 12 in it. Wow, it found the value! The problem is, there's probably a few hundred values that are 12. So we run it again after we changed the value of HP or something, to, let's say...13.
Cheat Engine searches for which values out of the values that were 12 before have changed and are now 13. It gives you the location that value to edit; usually, at this time, that's the value you're looking for. If not, you just change it again and again; sometimes a packet might have duplicates (Why even!?!?).
Once you're done, Cheat Engine saves the location of that value to a name or a file so you can change it whenever you want (aka if I want 1 million money at this game, I can just change that value to 1 million, or whatever number I want, whenever I want..

For a game such as CSGO or RotMG, it works the same way: you analyze a packet, look for which value is the value you want, and you either edit the packet and send it back (hacks to try and fool the server) or change your game (ESP or X-Ray).
Quote Originally Posted by ASERHaerheadrherherh View Post
Yes, let me explain how Cheat Engine works:
You input a value, let's say 12.
Cheat Engine searches for the value with 12 in it. Wow, it found the value! The problem is, there's probably a few hundred values that are 12. So we run it again after we changed the value of HP or something, to, let's say...13.
Cheat Engine searches for which values out of the values that were 12 before have changed and are now 13. It gives you the location that value to edit; usually, at this time, that's the value you're looking for. If not, you just change it again and again; sometimes a packet might have duplicates (Why even!?!?).
Once you're done, Cheat Engine saves the location of that value to a name or a file so you can change it whenever you want (aka if I want 1 million money at this game, I can just change that value to 1 million, or whatever number I want, whenever I want..

For a game such as CSGO or RotMG, it works the same way: you analyze a packet, look for which value is the value you want, and you either edit the packet and send it back (hacks to try and fool the server) or change your game (ESP or X-Ray).
What do packets have to do with cheat engine and addresses? :?
Quote Originally Posted by Tightmarrow View Post
What do packets have to do with cheat engine and addresses? :?
Packets work like what Cheat Engine is looking at: a big dump of data.
The difference is that Packets come from the internet and Cheat Engine things come from files.
The goal is to find the location of what you're looking for:
Example (Shitty one sorry):
Packet: HP=12MP=13LEVEL=12
You use cheat engine, it successfully finds the two 12 numbers, aka HP and LEVEL.
You get hit once, reducing your HP by one.
Packet: HP=11MP=13LEVEL=12
Using cheat engine again, you find that the only number that changed from 12 to 11 is HP, so you keep that for future reference (or changing).
Quote Originally Posted by ASERHaerheadrherherh View Post
Packets work like what Cheat Engine is looking at: a big dump of data.
The difference is that Packets come from the internet and Cheat Engine things come from files.
The goal is to find the location of what you're looking for:
Example (Shitty one sorry):
Packet: HP=12MP=13LEVEL=12
You use cheat engine, it successfully finds the two 12 numbers, aka HP and LEVEL.
You get hit once, reducing your HP by one.
Packet: HP=11MP=13LEVEL=12
Using cheat engine again, you find that the only number that changed from 12 to 11 is HP, so you keep that for future reference (or changing).
I think you are just trying to justify a mistake you made, I see no correlation :/
Quote Originally Posted by Tightmarrow View Post
I think you are just trying to justify a mistake you made, I see no correlation :/
I think I am. Shit.
Quote Originally Posted by Tightmarrow View Post
Considering that you already got the right address, you should:

- Right click the address
- Select "Find What Writes to this address"
- Lose HP
- Get the first address you find there and write

WriteProcessMemory(hProc, reinterpret_cast<void*>(HPAddress), "/0x90/, nullptr, nullptr);

I can't tell how that game works and it's really done but putting a nop instruction (0x90 or 90) to the address could stop it from going down.
Not trying to "hack"

I am just trying to read the data, convert it to a percentage, and then press a key when it reaches lets say 50%
Hoi man this is actually a well done guide in my opinion; I'd suggest it to whoever would like to start learning about this topic!
Good job!
I might be wrong, but in your code "std::cout << "Press F3 to activate.\n";" is it actually necessary to include the "std::" since you already have #include <iostream>?
then maybe you shouldn't have come to this page
Posts 16–29 of 29 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us