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

preview_player
Показать описание
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.

---

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

Рекомендации по теме
Комментарии
Автор

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

platzhersch
Автор

This is the most straightforward, informative and clear explanation of javascript debugging. Thank you!

nsns
Автор

This is exactly what I was looking for. I'd love to see more videos like this. Maybe a playlist.

martyrdm
Автор

new game: drink a shot everytime he writes "Pacman" wrong

nel-rom
Автор

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

axpers
Автор

I’m learning, my problem is I’m unable to put breakpoint to the webpage game I’m experimenting, the game isn’t open source, it’s random webpage game, is that the reason evilTester ?

porcupinee
Автор

This is so Ive been learning javascript for a while and its nice to see i have theoretical knowledge to hack something :D I havent thought about that before, nice vid mate

jakubfrei
Автор

thanks for this. currently trying to tear apart a simple javascript beat-em-up and this gave me so much useful knowledge.

woffyreal
Автор

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!

isolatedsushi
Автор

What about hacking multiplayer games? I play a game where I am sure some people are using hacks, and its really annoying.

Nicurru
Автор

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

atrocityx
Автор

Funny! I recently hacked the arcade rom to achieve the same thing! Infinite lives, and start at level 253 so you quickly get to the kill screen on level 255

CallousCoder
Автор

this was a really cool hacking example! what browser do you use?

tanercoder
Автор

how can i access a private variable without using breakpoint thing? just javascript codes. for example window.pacman = pacman without breakpoint. or can i set an breakpoint without debugger console?

doktoburu
Автор

How to end the game and put my highscore?
I mean how to end the game if u can't die?

adebagus
Автор

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!

btutorials
Автор

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.

digitzero
Автор

Hi, There is a game called starve.io I don't know if it is server sided but I just wanted to know if it's possible to get an item in the game by using a code.

kshauni
Автор

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

epida
Автор

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

anonymanonym