Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
JS Challenge 2
  • x3n0n
    Posts: 110
    Here is number two:

    //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


    So here the key to finding your way in is by typing any username in the username field and you just have to find the password corresponding to the crack_it(var1) returnvalue. Shouldn't be that hard to complete :)

    example of this:
    <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>