
Install mitmproxyĭon’t forget to install the certificates: Be careful to use the patterns of the normal code and not of the formatted code. You can start looking for constants of the game or even try to understand how the game computes some interesting values. We are very lucky because most of the games are not obfuscated or minified.
For example, to find the coins data of Everwing, I supposed the data of the gems was near and I started looking for the numeric value of the different gem sizes in the code. If your editor crashes, use a better one like TextMate, Sublime, emacs or vim.
Open the code with a robust editor and start looking for relevant names / constants.
If it is too slow, download the source using the game url as described later.
Be patient because the source if Everwing is really big (more than 8 Mo of text). It is advised to prettify the code before downloading it.
Go to the Sources tab of the DevTools and look for the same file. The source should be in the first of the iframe. Locate the iframe of the game (explained here). To make the whole thing smooth, mitmproxy will help us by automating the process. Indeed, we are going to modify the source code of the game. We could try to write a bot, but it would be cumbersome as we would have to perfectly understand the protocol of the game.īut most of the game logic is executed by the browser, so there might be a way. The problem here is that all the content is managed by a central server. Note that the techniques I describe here can be applied to any game written in Javascript,Īs long as the client side is the one that makes decisions. I’ll apply this technique on Everwing, a very popular messenger game. In this article, I am going to make persistant changes in the game. However, in some games, there are some achievements to unlock or money to buy upgrades. In the previous article, I showed how to modify the score sent to your friends from any game by exploiting the FBInstant API.