hmm idk ? [nkasper]
11 years ago

0

hi im stuck on this one can anyone give a hint :)

40replies
25voices
383views
CygnusH33L
11 years ago

0

Check the source code and look at using javascript alerts :P

Chromo_xxx
11 years ago

0

i don’t really understand how to use javascript;alert. tell me pls

PlayDay
11 years ago

0

Open up the browser console (Ctrl+Shift+K for Firefox) and use the alert function of Javascript to see the variable that the password is stored in. If you don’t know how to use the function maybe searching it up on Google will help.

J [ColdIV]
11 years ago

0

You can type in the URL bar
javascript:alert(variablename);

Luke [flabbyrabbit]
11 years ago

0

Just to throw in my two cents, if you are using console in either firebug, inspect element or whatever the IE alternative is then you can use:
console.log(variablename);

shadoWalker [wapLord]
11 years ago

0

God Damn you guys are very helpful thank you

Trascan
11 years ago

0

This was trickey. Hade to install FF and firebug to make it.

J [ColdIV]
11 years ago

0

You actually don’t have to you can use the console in chrome or just the javascript:alert or flabby’s way

scarecrow7
11 years ago

0

hi all

i’ve a question : in javascript level 5 test why when i select cancel button i’m redirected directly to : http://www.hackthis.co.uk/levels/

daMage
11 years ago

0

The script is made that way; basically if you don’t give the correct password, you are redirected to /levels/


0

press esc on the same time you press cancel…..you will not be redirected…:)

sorry for my eng!:(

imedovic
11 years ago

0

i’m so stupid still can’t find a.length lol

chain of 4 caracters, i find the 2 first letter but i can’t find the b still don’t know how to calculate it :s

[deleted user]
11 years ago

0

Ok this could be said to be close to being a spoiler so if you don’t want to know then don’t look! >> The first thing you need to do is press the cancel and then the Esc key a fraction after the cancel button. This will hold you on the j5.php page and not push you back to the levels directory. The Javascript you want to find is this script on the source:

You don’t need this bit unless you want to try and work out:

What’s important to you and what you will need is in the next three lines.
Remeber this is javascript. And we know we can see what the cookies contain
just by typing into the url window of the browser javascript:alert(document.cookie);

d = String.fromCharCode(c,-(37-Math.floor(1806/13)),Math.sqrt(b-2)27,(b8)-36);
p=prompt(“Password:”,“”);

On this next line the code is saying: if ‘p’ is equal to ’d' and ’d' is equal to ‘p’
then do this bit of code: window.location = “/levels/j5.php?pass=”+p;

but you need to find out the value of ‘p’ to enter the password which is
contained in ’d' otherwise the code: window.location = “/levels/”;
will be used and the browser will go back to the levels page.

if (p==d)

So how could we find out the value of what we need.
If you typed javascript:alert(p); all you would get is a null string.
So what will we need to do pass the level? What do we want to know?
{
window.location = “/levels/j5.php?pass=”+p;
} else {
window.location = “/levels/”;
}

Hope this helps you understand what the script is doing! :)


0

there you go , full tutorial from anonra . if that you cant understand i dont know what to say :)

heavenlyMe
11 years ago

0

predefined value for a variable is important :)

Skip [Sirskip]
11 years ago

0

I figured this out one way, but could somebody possibly pm me how to do it in chromes console if there is a way. It keeps telling me certain values arent defined

Reznorock
10 years ago

0

Never thought this level could be as easy as Main1 -_-

Shmeigo
10 years ago

0

WHAT IS THIS??

                        a = window.location.host + "";  
                      b = a.length;  
                       c += ((5*10)*2);  
                        d = String.fromCharCode(c,-(37-Math.floor(1806/13)),Math.sqrt(b-2)*27,(b*8)-36);  
                        p=prompt("Password:","");  
                       if (p==d) {  
                         window.location = "/levels/j5.php?pass="+p;  
                     } else {  
                            window.location = "/levels/";  
                       }  
Shmeigo
10 years ago | edited 10 years ago

0

nevermind didn’t see anonra’s post

Shmeigo
10 years ago

0

javascript:alert(variable); doesn’t work for me :(

any suggestions?

J [ColdIV]
10 years ago

0

Yea.
[quote=flabbyrabbit]Just to throw in my two cents, if you are using console in either firebug, inspect element or whatever the IE alternative is then you can use:
Code:
console.log(variablename);[/quote]

Shmeigo
10 years ago

0

how do i enter that into firebug?

J [ColdIV]
10 years ago

0

You open firebug click on console and enter it in a box at the right (for me it is on the right)

Shmeigo
10 years ago

0

awesome thanks for the help

malingas
10 years ago

0

yeeeehaaaa… tnx COLDIV

[deleted user]
10 years ago

0

One of the simplest ways to complete this level is to use the URL bar to alert the variable, you don’t need to solve the maths to do that.

aborge
10 years ago

0

Where do you find that a =, b= d=, code in the source code? I have read throught the whole source, and cant find any of the variables. Click esc right after closing the window then view source code.


0

@aborge: You can find them in JavaScript file. :|

aborge
10 years ago | edited 10 years ago

0

I just solved it @freewind1012 found the file and created some code to solve d :)
Finally got it

midnightclub2
10 years ago

0

hint to find js link:

near the end of the source code, there’s this code

so cheers :)

Cyan Wind [freewind1012]
10 years ago | edited 10 years ago

0

@midnightclub2: The next time you want to “help”, please make sure that you understand something well. Did you know what you were saying?

midnightclub2
10 years ago

0

freewind1012: no i dont know what im saying, maybe you know better?

[IAmDevil]
10 years ago

0

Damn this @midnightclub2 seems to be high all time. So far i didn’t understand even a single post of his and I’m quite sure others also haven’t! :/

midnightclub2
10 years ago

0

you soon will

Cyan Wind [freewind1012]
10 years ago | edited 10 years ago

0

@midnightclub2: Do you know why that file has numbers?

midnightclub2
10 years ago

0

not really, but you dont really need to know why to find the important codes. Enlighten me on the numbers please :)

Reply has been removed
[deleted user]
10 years ago | edited 10 years ago

0

Use scratchpad (Shift + F4) in Firefox to run that JS code and it will give you the password.

Cyan Wind [freewind1012]
10 years ago | edited 10 years ago

0

@midnightclub2:

The numbers on that file is automatically generated everytime when a new page is loaded. Therefore, even someone searches every inch in source code, no way he can find the exact JavaScript file with that numbers again.

The next time you want to help, make sure that you are helpful!

midnightclub2
10 years ago | edited 10 years ago

0

right. well im not the website designer, neither do i replay the level when im bored :P
but still, the link to the critical javascript code still lies at the bottom of the source code :)

and pls, i have no intention to mislead… if you thought so…

heavenangel
9 years ago | edited 9 years ago

0

i got it.
when you feel like giving up just dig a little beeper.
use logics

You must be logged in to reply to this discussion. Login
1 of 41

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss