Reputation: 5055
(I asked this question on Gaming, but was closed and ppl suggest I ask on Stackoverflow. If this doesn't fit here, please suggest a better place before you close it. Thanks.)
One general way to cheat in game is to use a memory scan tool to track down the value you want to change. However another common way to cheat is to modify the binary file.
For example, in a game you get +5
exp when you kill an enemy, and by changing 5 to 50 stored in binary you can get +50
exp. As far as I know, many iPhone game cheats work that way, which requires you to patch a binary file or use HEX editor.
I'm interested in how those hackers locate the settings. What is the general method/tool to find out which binary file a specific value is in and the corresponding offset? If it's a very unique number or a ascii string, like 3219
or google.com
, you can just search the HEX value, but what if it's a common value, like 1?
Upvotes: 4
Views: 3133
Reputation: 4956
Try to figure out the file format through trial and error. Programmers usually don't make things intentionally difficult unless the game is an MMO or huge blockbuster prone to cheating. If you're playing a game that gives you Exp for killing slugs, here are some basic steps to take:
With enough time and patience you will eventually figure out the entire file format and be able to change anything at will.
Upvotes: 0
Reputation: 30460
You could disassemble the game executable, that way you could in principle know what every memory location does. This is probably not practical for most games.
Two other approaches that more directly target specific values:
* You will probably be searching for a 32/64-bit integer not a single byte location.
Upvotes: 4