Scanmem - Cheat'O'matic for Ubuntu and Debian

I recently discovered the scanmem utility, which allows you to alter a processes memory while it's running. And what is that good for, you ask? Well; Cheating!

I tried scanmem on some ubuntu games, but it didn't seem to work, so I figured I'd try it on a windows game, running in WINE (maybe the title of this post should have been How to cheat in games in WINE? ).

Now, I already had torchlight installed and I've completed the main quest, so I decided to try and cheat in that game. So, first I start torchlight and goes to town. Then I open a terminal window and type in the following to start scanmem with the process ID of Torchlight.exe:

sudo scanmem $(pidof Torchlight.exe)

This will present a prompt saying: 0>

And here I type the amount of gold my character have in Torchlight, and press enter, like so:

0> 12345

Now, scanmem will search all the memory regions of Torchlight.exe for the value 12345. When scanmem is done, it will tell you how many results were found:

... ... info: 217/219 searching 0xf7752000 - 0xf7753000...........ok
info: 218/219 searching 0xffb02000 - 0xffb17000...........ok
info: 219/219 searching 0xffbf0000 - 0xffff0000...........ok
info: we currently have 3 matches.

That means that scanmem found 3 places where the value 12345 is stored. Now, I go to Torchlight and buy something, so the amount of gold I have changes. Lets say I use 25 gold pieces, so I have 12320 gold pieces left. I now type in 12320 in scanmem, presses enter, and scanmem runs again, this time only testing the memory spots that contained 12345 earlier. I repeat this until scanmem writes this:

info: we currently have 1 matches.
info: match identified, use "set" to modify value. info: enter "help" for other commands.

Now, scanmem have found the place in memory where the amount of gold your character has. To change it, simply use the set command, like so:

1> set 31337

Now your character should have 31337 gold pieces!

Something to note is, that some games store values like how much gold you have in two separate locations. If scanmem can't narrow the locations down to a single one, you can change all the found locations the same way you would if you were only changing one memory location. Depending on any number of factors, this might crash the game...

I know this post is a bit unclear, but I hope you get the basic idea..

Written by Jannich Brendle fre 08 oktober 2010 In How to

tags: cheatingtorchlightwine

Related posts