It looks like you're new here. If you want to get involved, click one of these buttons!
//JS challenge two
function crack_it(bla)
{
var i=0;
var temp=bla.length;
for (i=0;i<temp;i++)
{
if (i%2==0)
{
bla += i;
}
}
return bla;
}
function login_form()
{
var name=prompt(\"Username:\",\"\");
var pass=prompt(\"Password:\",\"\");
if (pass==crack_it(name))
{
alert(\"Welcome \" + name + \", you have entered the system\");
//function to add points to the user his score
window.location=\"http://www.iexploit.org/index.php/javascript/level-3\";
}
else
{
alert(\"Wrong password for user \" + name);
}
}
//Coded by x3n0n
<html>
<head>
<title>test</title>
<script type=\"text/javascript\" src=\"Challenge_two.js\"></script>
</head>
<body>
<input type=\"button\" onclick=\"login_form()\" value=\"Login\"/>
</body>
</html>