JavaScript Challenge 3 :: Function again
by Arxleol on Friday 29.01.2010, under hellboundhackers.org, javascript, tutorial
As in very first HBH javascript challenge we had to analyze function this time function is very similar just a bit upgraded.
To find function just check which function is invoked when you click on Login button.
Here is the function:
<!-- function pasuser(form) { var text2='lolage' var text4='hahaomgz' if (form.text1.value==text2) { if (form.text3.value==text4) { location="index.php?text1=lol&text3=haha" } else { alert("Invalid Password") } } else { alert("Invalid UserID") } } //-->
Now let’s figure out names of text fields in form.
<input name="text1" type="text" />
As you can see value of text1 is compared to text2 in javascript function therefore username should be: lolage
<input name="text3" type="password" />
From the password field we may obviously notice that password should be: hahaomgz