Level 1: Log In

Level 1 of hackertest.net is really simple if you have a little knowledge of HTML and javascript. With that you can always try googling the answers. But the key to hacking is learning.

The mission does not gives any kind of intro or hint, no worries. We do always have the usual steps to start from. First thing to hacking is HTML the source code of the web page, it gives a lot vital information that will make an hack easy.

You can open the source code by pressing ctrl+U in firefox. Lets check out the source code and see what we got?

<form name="a" action="javascript:check()">
<p align="center">
<input type="login" name="c" maxlength="25" size="16"><br>
<br>
<input type="submit" value=" Log In "></p>
</form>

Here it is, the form tag tells us what to do. When we enter a password and press enter we are taken to a javascript function named check, using the action attribute. Time to look out for the check function and find out what it does?

<script language=JavaScript>
{
var a="null";
function check()
{
if (document.a.c.value == a)
{
document.location.href="http://www.hackertest.net/"+document.a.c.value+".htm";
}
else
{
alert ("Try again");
}
}
}
</script>

Ok. Here it is as well. Now if you see inside check we compare the value we entered i.e. document.a.c.value to a variable a. Just figure out the value of a and move on.

For those of you who are still wondering what to do. The answer is null.

Good luck!!!

Follow me

Abhishek Gupta

I am Abhishek from Lucknow (India). I have been working as a software engineer from last 6+ years, and its my passion to learn new things and implement them as a practice.
Follow me

Latest posts by Abhishek Gupta (see all)

Leave a Reply