Share your repls and programming experiences

← Back to all posts
website hacking game
h
MrEconomical (371)

PLEASE READ BEFORE PLAYING

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.

<br><br>

a few notes:

<br><br>

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.

<br><br>

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

<br><br>

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. :)

<br><br>

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

<br><br>

<div class = "bold">GOOD LUCK, AND HAVE FUN!</div>
Commentshotnewtop
mamamia5x (43)

This game seems really cool, but I never really got to enjoy it. My school laptop has removed inspection mode, so I can't enjoy it.

Lamby777 (45)

@mamamia5x ikr, so glad I'm actually using replit at home rn, I always code at school.

mamamia5x (43)

@Lamby777 I have a school laptop that I get to take home. They blocked it at my home too. Your lucky.

Lamby777 (45)

@mamamia5x I take mine home I just have my own laptop that I use because it runs windows not chrome os

mamamia5x (43)

@Lamby777 My brother won a laptop, but I barely use it know. I could play it on that.

AdamZow (3)

Control u works on restricted school laptops so that you can see all of the raw code itself. @mamamia5x

mamamia5x (43)

@AdamZow Yeah, but in this game I need to edit it.

mchapy1 (14)

Great game, stuck on level one. I turned autocorrect on to fill the password out automatically, nothing happened. I don't see any other obvious signs of the password. Great game!

HaydenFrobenius (2)

@mchapy1 you need to open the console and click on sources and then on the side, click the javascript file of the level you're on. That will show you how the main code works. BTW, the password is "superstrongpassword123"

CollinKunsman1 (27)

I'm already stuck on the first level... :'(

Haaruun (48)

@iamawesome10901 win.call({legit:true}, 7)
im not telling you the real way tho :P

KellerWorthen (2)

@iamawesome10901 You got all the way to level 7 ?!?!?!?!

AdCharity (157)

You should look up firefox's x ray goggles so everyone can play :) (just a suggestion since I can't use them anymore; school blocked em)

AdCharity (157)

btw repl posts are put in a text box, so they don't support standard HTML. does do markdown tho. Nice project.

ChezCoder (23)

BEST GAME IN THE WORLD PLEASE CREATE ANOTHER ONE!!! I'M ADDICTED
Edit: If you make another game like this, can you make it so that the user has to use the javascript console instead of inspect element? I can't inspect so I have to rerun the code over and over again.

HaydenFrobenius (2)

@ChezCoder Yes! Pls make another one!

mwilki7 (512)

very entertaining to play
reminds me of those cheat engine challenges

kaiserb1 (10)

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

kaiserb1 (10)

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 (10)

@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 (10)

@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.

[deleted]

I'm stuck on lvl 2! Help!

youalie (1)

how do u do lvl 4 help

HaydenFrobenius (2)

@youalie type this code into the console win.call({legit: true}, 4)

[deleted]

Hint for lvl 3?

[deleted]

Thanks! I only know a bit about html so im finding all the levels hard XD @MrEconomical

[deleted]

wait no I meant lvl 2 the carrot one @MrEconomical

HaydenFrobenius (2)

@CoolJames1610 type this code into the console win.call({legit: true}, 3);

AdCharity (157)

@CoolJames1610 console: money = 1000000000000000000000000000000
You can buy carrots now congrats

Lamby777 (45)

How do you win level 7? I'm stumped!

HaydenFrobenius (2)

@Lamby777 win.call({legit: true}, 7)

Lamby777 (45)

@HaydenFrobenius WOOOOOOOOOW. :/ The var name was hidden in plain sight lol

jacobhutcheson (1)

win(1) win(2) win(3) win(4) win(5) this game is easy

MrEconomical (371)

@jacobhutcheson I don't know how to fix that without making the game very hard by putting everything in one file so I won't

[deleted]

how to do lvl 2 the carrot one @jacobhutcheson

IsaacGarcia4 (0)

You can just do win.call lol

btecht (3)

Really cool game. I very much enjoyed the game.

CodingAP (0)

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 (36)

I can not edit the Javascript.

bgrubert (39)

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

SpicedSpices (0)

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: win.call({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!

[deleted]

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 (10)

@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 win.call({legit: true}, 7) to beat the whole game, but technically it's cheating