Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Js 5 broken. (spoilers)


ghost's Avatar
0 0

Okay, so I did some research on getYear, put what I thought was the correct year in, then submitted. It gave me a "Good job! You got it!" then redirected me to "Wrong Answer! Why don't you do some research on the code!"

So I tried one other possibility, also wrong, except this time I just got a plain "Try again".


Mr_Cheese's Avatar
0 1

challenge is working fine.


ghost's Avatar
0 0

Hmm. Looking at the js code, I would have to disagree.

There are two options that it gives you.

1 is alert("Good job! You got it!"); window.location.href=year+".php"

Which means that if you enter what I am presuming to be the password it wants, it will redirect you to /js/js5/2006.php which is the page for the wrong answer.

Otherwise it will give you the try again message and leave you at the blank page that you get if you put in the wrong password.

Would I be correct in assuming that there is no third option? And thus there is no redirect to the "Congrats! x points has been added!" page? Or am I just a noob and totally missing something? (and believe me this is a huge possibility)

Edit: just to clarify I tried it with the broken getYear and that answer didn't work either.


ghost's Avatar
0 0

Try to find what happens in js when you use the "year" command. w3schools would be a good place to look


ghost's Avatar
0 0

"year" or "getYear"?

I know what happens when you use getYear. In the case of this script year is just a variable unless I'm reading it wrong. However, getYear is based on 1900 in some browsers. It happens to work normally in mine (IE).

Anyway, it seems to me that the issue here is that there are only two possible links to go to, and neither one is the correct one. Of course, I'm a js nub, but… I think I'm reading it right. If anyone wants to look over what I'm doing wrong via PM's, I'd be much obliged.


ghost's Avatar
0 0

You are making this way too hard on yourself man. all i did…was copy and paste something from the souce and make it a js injection and that is all. should be easy enough


ghost's Avatar
0 0

I did. That was edited out of my original post. It gave me the answer that took me to the "wrong" page. :P

EDIT: Got the answer just by messing around. Yeah, this challenge is definitely broken on IE.


I-O-W-A's Avatar
[Forever Blind To See]
0 0

the challange aint broke in IE coz thts whatt i use an i done it, its to do with the GetYear function read up on it an you'll see some interesting info on it


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

I-O-W-A wrote: the challange aint broke in IE coz thts whatt i use

You use IE?! Are you insane?!?!?!?!?! :|:|:|:|:|:|:|


ghost's Avatar
0 0

I agree with system_meltdown..

ie sucks, no matter what you say..

I've did it now just for testing.. it works..

but, I think you haven't researched enought the source-code.. Try it again..

view-source:http://www.hellboundhackers.org/challenges/js/js5/index.php


ghost's Avatar
0 0

if i remember the thing is date format :|

i just setted up one phpfusion and i cant login using IE, and i can login using firefox. man when i remmember how stupid i was few years ago when i was stubborn for IE, not wanting firefox…. firefox rulz

edit: yes its format. ive been searchin something for javascript 14 as i have no idea where to start looking so i found this. it should help you on javascript 5 greatly. http://hellboundhackers.org/readarticle.php?article_id=321


ghost's Avatar
0 0

a few years ago the best browser wasnt firefox it was opera. and in some ways it still is


ghost's Avatar
0 0

warningpossible spoiler******** ok well how do you find out which number to use as 'year' in the first place? maybe try some simple javascript commands in the address bar. like oh I don't know, what kind of command could you use to make the page alert you of which 'year' to use?