How to hack nw.js based games?

Post your topics and discussions here that you can't find a good section for.
Post Reply
User avatar
Leviathan_Carnifex
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Jul 19, 2017 11:25 am
Reputation: 0

How to hack nw.js based games?

Post by Leviathan_Carnifex » Wed Jul 19, 2017 12:12 pm

Hello everyone! I need some tips or tutorials how to hack nw.js (nw.exe) based games. Most of those games is indie. The problem is - i can't find values even if I use "unknown initial value" and value type - "all. Such as health bars or power bars, etc. Even if I found right address for the value on the screen (number of lives or other things, which represented by number on the screen) and change it, nothing happens in the game.
A few of games, based on nw.js (this is not advertising!):Show

Sorry for orthographic error's, eng is not my native lang.

gir489_2
Noobzor
Noobzor
Posts: 6
Joined: Wed Jul 19, 2017 3:27 am
Reputation: 0

Re: How to hack nw.js based games?

Post by gir489_2 » Wed Jul 19, 2017 1:29 pm

Uhhh... You know JS doesn't have an integer type, right? Everything in JS is IEEE 754 Single Precision.

User avatar
FreeER
Cheater
Cheater
Posts: 33
Joined: Fri Mar 10, 2017 7:11 pm
Reputation: 2
Contact:

Re: How to hack nw.js based games?

Post by FreeER » Wed Jul 19, 2017 3:46 pm

I've played a few where you can find or manage to extract the js code (after some time spent googling) and modify it directly, other than that I haven't had much luck when double scans didn't work but I haven't played too many of them either. Part of the problem with JS (to my limited understanding of how the engines are implemented) is that's it's garbage collected and passes around values a lot along with closures and byte code etc.

hm, reading this https://thibaultlaurens.github.io/javas ... ine-works/ gives me an idea to try using 4 byte values with the first / most significant / sign bit set...

@gir489_2 while JS does use the IEEE 754 Floating Point standard it doesn't use the binary32 single precision 4 byte "float" type but the binary64 double precision 8 byte "double" type (http://2ality.com/2012/04/number-encoding.html). Also the link above would prove you wrong about integer types when the V8 engine is used...

User avatar
gir489
RCE Fanatics
RCE Fanatics
Posts: 36
Joined: Mon May 08, 2017 4:08 am
Reputation: 8

Re: How to hack nw.js based games?

Post by gir489 » Wed Jul 19, 2017 5:29 pm

I said JS doesn't have an integer type, therefore I wasn't wrong.

User avatar
FreeER
Cheater
Cheater
Posts: 33
Joined: Fri Mar 10, 2017 7:11 pm
Reputation: 2
Contact:

Re: How to hack nw.js based games?

Post by FreeER » Wed Jul 19, 2017 6:25 pm

gir489 wrote:
Wed Jul 19, 2017 5:29 pm
I said JS doesn't have an integer type, therefore I wasn't wrong.
FreeER wrote:
Wed Jul 19, 2017 3:46 pm
the link above
just in case it caused confusion, by that I meant the thibaultlaurens link not the one about the floating point format...
https://thibaultlaurens.github.io/javascript/2013/04/29/how-the-v8-engine-works/ wrote:Tagged values

To have an efficient representation of numbers and JavaScript objects, V8 represents both with a 32 bit value. It uses a bit to know if it is an object (flag = 1) or an integer (flag = 0) called here SMall Integer or SMI because of its 31 bits. Then, if a numeric value is bigger than 31 bits, V8 will box the number, turning it into a double and creating a new object to put the number inside.
While the ECMAScript standard JS is based on may not have defined an integer type if the implementation of the engine that you are going to be working with to hack a game does then saying that JS doesn't have an integer type is practically wrong and worse than meaningless to everyone trying to hack a game on that engine (worse because then their looking in the wrong direction to find the value they want). I'd have agreed with you before reading that post, and while I haven't tested so it could still be incorrect, saying you're not wrong without more evidence when there's something saying you are is a bit silly.

Oh, and based on https://wingolog.org/archives/2011/05/1 ... mentations it's the low bit that's used not the high bit (sign) bit like I'd assumed previously.

Post Reply

Who is online

Users browsing this forum: No registered users