hack-test.com 1 :: hard start
by Arxleol on Thursday 18.03.2010, under hack-test.com, javascript, tutorial
When I first found hack-test.com I assumed it is similar to hackertest.net however after I checked the very first challenge I was pleasantly surprised. In very first challenge we have to solve mystery regarding javascript.
The very first step always to do is examining code of web page. And if you check input form of the first mission you may notice that the form invokes javascript function:
<form action="javascript:check()" name="a"> <p align="center"> <input type="text" size="16" maxlength="25" name="c"><br> <br> <input type="submit" value=" Log In "></p> </form>
Now we should find javascript function called check. And good for us you may find function in top of the page.
Here is the code you should watch out:
var a="null"; function check() { if (document.a.c.value == a) { document.location.href="/"+document.a.c.value+".htm"; } else { alert ("Try again"); } } }
As you may notice a is the variable with value null. And in the first if condition it is compared to document.a.c.value which in fact represents value entered in the text box. Because document represents all structure or contents of web page, a is name of the input form and c is the name of textbox meanwhile value is variable which contains current value of textbox.
So now you know that password is null.
Monday 05.04.2010 on 19:33
I’ve just stumbled upon your site while searching for a tutorial on an related subject. Glad I did too. There’s a lot I like. Anyway, you’ve been bookmarked and I’ll be back soon.