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
Noobzor
Noobzor
Posts: 9
Joined: Wed Jul 19, 2017 11:25 am
Reputation: 2

How to hack nw.js based games?

Post by Leviathan_Carnifex »

Hello everyone! I need some tips or tutorials how to hack [Link] (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!):
[Link]
[Link]
[Link]
[Link]

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 »

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

User avatar
FreeER
Expert Cheater
Expert Cheater
Posts: 116
Joined: Fri Mar 10, 2017 7:11 pm
Reputation: 28

Re: How to hack nw.js based games?

Post by FreeER »

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 [Link] 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 ([Link]). 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: 658
Joined: Mon May 08, 2017 4:08 am
Reputation: 458

Re: How to hack nw.js based games?

Post by gir489 »

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

User avatar
FreeER
Expert Cheater
Expert Cheater
Posts: 116
Joined: Fri Mar 10, 2017 7:11 pm
Reputation: 28

Re: How to hack nw.js based games?

Post by FreeER »

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...
[Link] 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 [Link] 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: Shekine