Saturday 24 September 2011

C++ how to make a program that edits a value in the memory ?

C++ how to make a program that edits a value in the memory ?

i wanna make a rogram that edits a value in the memory the trick is that this value is not always at the same place

so the program should search the value and change it when it finds it
C++ how to make a program that edits a value in the memory ?
There's a program called Cheat Engine which does exactly that. I think they give the source. http://cheatengine.org/index.php . It's an awesome program. With a TON of skill and time you can do anything with it. Have fun.
C++ how to make a program that edits a value in the memory ?
The answer to this should be simple.

You create a pointer of the right data type and assign the memory location to it. You access the data and make the changes you require.



However. Computer memory is volatile.

That means that it is constantly changing.



My guess is that you have a program that does something and stores some data in memory somewhere. You want to change that data to affect the way the program runs.

Well I am sorry to say that this is not such an easy task.

You need the start location of the running program. You then need to add to this the offset of the data item that you want to change. Then, and only if you have this correct, can you hope to change the memory value. Searching the computer memory serves no purpose because the memory is volatile and may contain random samples of old data.



So now you have changed the memory location value. What are the chances that the program whilst running will update that memory location and return the location to the old value?

Quite high I would say.



I would stop now. It won't work.