SpaceCompany icon indicating copy to clipboard operation
SpaceCompany copied to clipboard

Everybody can modify their amounts of resources easily.

Open nalemy opened this issue 4 years ago • 3 comments

I just analysed the function "gainResource" and found that you could use commands like "window['metal'] = 1000000;" in the console to modify the amount of the metal.

nalemy avatar Jul 26 '21 08:07 nalemy

Many web games have this issue; maybe if the save files are tampered with, the savegame is reset to avoid cheating. But all web games like this have this issue unless you somehow encrypt/hash the resource statistics

WarpPrime avatar Jul 26 '21 15:07 WarpPrime

Yeah, that's just what I meant. You can try to encrypt the data or obscure the code to fix this bug.

nalemy avatar Jul 27 '21 00:07 nalemy

Anyone that knows there way around a browser debugger could easily change their resources, even if encrypted, by calling the encryption function to assign data, also obscuring code isn't going fix this. this is a static site and making the function or variables private would just mean they would have to do a quick search in the code, find the 'metal' variable, and add a break point and now the variable is inscope

Mekomancer avatar May 28 '22 01:05 Mekomancer