Hacking JavaScript Games – Accessing private javascript variables at runtime via debugging

26
5



JavaScript private variables cannot be accessed from the console, which makes hacking the game hard and automating it from the console hard. The game I’m using is an open source PacMan JavaScript game which is entirely called from an anonymous function. I show the debugging technique I use for making bots possible.



You can support me on Patreon (watch my videos ad free and receive extra content)

Hire me for consultancy and buy my online books and training at:




Nguồn: https://nhadattv.net

Xem thêm bài viết khác: https://nhadattv.net/game/

26 COMMENTS

  1. Hello,may i ask what do i need to know to be able to make an aimbot for surviv.io, i am very interested in thia but i dont know what topics should i learn.An answer would be appreciated!

  2. Hi! Your video was so helpful and I tried it on some games and it worked. And I have a question.
    Can this game be some way hacked with developer tool and change the value of the coins? I would like to hear your opinion 🙂

    This is the link of the game:

    https://naruto.oasgames.com/en/serverlist

  3. I understand you're exposing them after setting a breakpoint, but can't you just click on the line in the js file, edit what you want, press ctrl+s to save and it does the same thing?

  4. How can I window the below code?

    this.validateInputs = function () {

    u(function () {
    if (c.toPage && c.fromPage) {
    if ('0' != c.fromPage.toString().charAt(0) && '0' != c.toPage.toString().charAt(0)) return c.firstPage = c.convertPageToIndex(c.fromPage, !0),
    c.lastPage = c.convertPageToIndex(c.toPage, !1),
    c.validateError = !1,
    c.firstPage && c.lastPage ? c.validateFromToPages() : c.displayError = a.instant('GT_BOOK_PRINT_INVALID_PAGE_RANGE');
    c.displayError = a.instant('GT_BOOK_PRINT_INVALID_PAGE_RANGE')
    } else c.displayError = '',
    c.validateError = !0
    }, 1000)
    },

  5. Try hacking Mope.io. It is a game and I would like to get unlimited coins. This has helped me a little too. Thanks!

  6. What's the diffrence between games you can hack by changing prototype functions and those where you cant?

  7. Hello there, very nice video, I am not very good at programming or hacking but could the same thing be done with this game? https://s2.soccerstar.dk/

  8. only shows 2 hearts because in programming you count starting from zero not 1 aint it? lol so if you want to see 3 you need to change it to 01234

  9. Great video, I'm working on a game where there are several "classes" within a function, which are named things like ea, Qq for example, but some variables begin with this. , for example this.health, but even in console I can't access this value, do you have any idea how I might get around this? It's confusing the hell out of me

  10. make a video on hacking of online game known as " the avengers destroyers" i bet u cant hack it although its a javascript game

  11. Hey, first of all thanks for this video. I'm new to browser games and had no idea where to start. I do have a question though, I'm trying to automate a little minigame without interfering with the timer. But to automate it I have to use a python library and thus I need to extract the javascript object, or at least some of the values, in order to use them in python. Do you know if / how this possible? Thanks!

  12. Would it be possible to turn this into a script or a chrome extension? So that someone could use this without having to manually open the debugger and set a breakpoint

  13. Hi there, First of all thanks for this great tutorial. I tried this thing but the game I am trying it on doesn't update my window (global) variable with the new values. Since its a ludo game, I think it creates a new object at every turn so the old one is left untouched. Please let me know what you think, Thanks.

  14. Just stumbled upon this, I am the guy who coded this game, cool stuff 😉 I will watch it later and tell you my thoughts

  15. The debugger is a really powerful thing. Hacking games is one of the simples things, that can come into your mind. It allows you to take control into your hands and do whatever you want. Very good explanation and demo.
    P.S. I didn't know, that you can access them from the console while on breakpoint, so I always did that via local variables. Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here