Share your repls and programming experiences

← Back to all posts
website hacking game
MrEconomical (2276)


hacker, hacker is a coding game that involves "hacking" or editing the source code to solve a set of challenges. in most browsers, inspecting element allows you to view and tamper with the source code of a page, but these effects will only last until you reload the page. however, depending on how the website was designed, you may be able to do some pretty cheaty stuff before your changes get reset. personally, i think this is very cool. hacker, hacker is game specifically about tampering with the source code.


a few notes:


this game DOES require some basic understanding of javascript and html as it is written in javascript, and in order to solve the challenges you must edit javascript code.


to view and edit source code, simply right click and inspect element. here, you can see everything about the web page that is running.


only edit the javascript / html related to the level or challenge you are on (see the console). editing anything else might break your game. also, don't do something like make yourself win automatically. i know it is a hacking game, and you are supposed to tamper with code, but please play the game as it was intented to be played because it is just more fun that way. :)


DISCLAIMER: i am not responsible for anything you may decide to "hack" on other webpages after seeing this game


<div class = "bold">GOOD LUCK, AND HAVE FUN!</div>
Hyderite (0)

yeah i cant even get through the first level

maxina (40)

Dude, great idea! I want to create my own version of something similar to this!

Lethdev2019 (199)

use win([level no], this.legit = true) to advance any level.
@MrEconomical as it said before if got determined and found this in 5 mins. "nice try".

gentechnolgy (0)

im confused on where i edit it in level_0.js

AmazingMech2418 (1014)

This is easy if you exclude level 7... Why did you have to make the variables local in a function? I just had to un-obfuscate the hexadecimal...

AmazingMech2418 (1014)

The only way I can complete level 7 is if I use the win function. Is it supposed to be that way? In the console, I can't edit the JavaScript variables or code for level 7. The only thing I can do is inject a fake form of the function, but then, it just runs the win function anyways.

ironblockhd (418)

I am next level hacker, i hacked the game machanism: win.bind({legit:true})("insert level")

avibeskrowni (142)

legit = true;

but actually i made it through to level six in about five minutes and level seven finished in twenty.

he's right, obfuscations ARE hard

IsaacGarcia4 (0)

You can just do lol

btecht (3)

Really cool game. I very much enjoyed the game.

CodingAP (4)

Great Idea! I'm going to make my own style of this game if you don't mind

NateFarquhar (0)

Where’s the cool stuff

iiviigames (0)

After level 3 (with the find the buttons) it totally stopped loading.

hg0428 (184)

I can not edit the Javascript.

bgrubert (187)

Beat it! Level 7 hint: redefine the function win()! PS. Great game never seen anything like it!

SpicedSpices (296)

This is actually a really cool game and concept! There is one small thing you need to fix though. If you just put in this code, you will win:{legit: true}, 4). It is setting legit to true so you will always win. The number at the end is any level. This game is really neat and you should keep working on it. Can't wait to see more!


how to do the many buttons one? (im very bad XD)

MT1815 (0)

@CoolJames1610 you replace the int in variable "pos" with 1 and click the first button

IsaacLuna (0)

@MT1815 Oh lol I just searched win_button in inspect and it shows you where it is... I guess theres a buncha different ways to win?

kaiserb1 (13)

@MT1815 To keep the interest of the others, I'll share only some hint:
I use built-in debugger in Google Chrome in order to understand how script works. I don't know JS, but I know many others. I found where script keeps track on moves and I attacked this array.

MT1815 (0)

@kaiserb1 that's an efficient solving method. Thanks for sharing

anthang888 (0)

Just saying the way to beat level six is literally to type: number in the console :D
Hopefully this helped
Also do{legit: true}, 7) to beat the whole game, but technically it's cheating

launcherman08 (22)

I am very confused on level 2 (XD). This game is awesome!

kaiserb1 (13)

I did it. Level 7 was challenging, but I manage to pass it

kaiserb1 (13)

No one need help?

Numka (0)

@kaiserb1 I would like to get some help. I can open level_7.js in debugger and open formatted version, but I can't understand how do I access 'c', because it seems that script exposes nothing.

kaiserb1 (13)

@Numka Yes, the script is obfuscated. I used a breakpoint to stop execution of the script and then step by step execution in debugger. Hope this helps.

Numka (0)

@kaiserb1 thanks, but it doesn't help that much. Is my approach correct at least? I'm trying to overwrite 'c' as global variable and pass 'o' where I want to.

Numka (0)

@kaiserb1 nvm, I found a way. It was fun, i thought of the method at first try, but then I was intimidated by obfuscated script.

septicarm713 (0)

@kaiserb1 I get to level 7, but my JS knowledge is a little limited. I have no clue what I'm doing. I had a few of my friends and I read through all of the 600 lines of code and found nothing. I don't know what you and @Numka are talking about in terms of breakpoints and global variables, but if you'd like to help out that would be great.

kaiserb1 (13)

@septicarm713 Are you familiar with Chrome debugging tool?

septicarm713 (0)

@kaiserb1 I am not familiar with the chrome debugging tools but I will look into it.

kaiserb1 (13)

@septicarm713 In Google Chrome press Ctrl+Shift+I. You will see differenet subviews. Look for Sources. When you click on it , will see Event Listener Breakpoints. Mark Mouse. When you click on the board for your move, the script will stop execution and you can l go true it step by step. In Watch menu add the variable of intersest. Hope this help.

ChezCoder (1593)

Um @MrEconomical , can u help me make a hacker game like urs? Reply to me plz and I will invite u to colab AND u get credit!

ChezCoder (1593)

@MrEconomical if you want, you can join my colab. If u don't want u can ignor it. :)

KellerWorthen (41)

this game is so fun, but im stuck on level 2. I'm no expert at javascript.

HaydenFrobenius (2)

I found a trick. on every level, just type{legit: true}, 5) in the console but replace the 5 with the level number. I be a TRUE HACKER.

Haaruun (98)

@HaydenFrobenius i was fine w/ you sharing it but now your just taking credit

Tricksyz (18)

@Navfal Put var money = 38745634 in console; that's what I did.

Navfal (0)

I have no idea about javascript. LOL
For the level 1 password, I went into the sources and found it, is that how it should be done?