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 3
  • x3n0n
    Posts: 110
    Here is number 3: (Just finished it)

    //Challenge_three Stage 1
    function brb()
    {
    var c=confirm(\"Wrong page, redirect?\");
    if (c==true)
    {
    window.location=\"http://www.iexploit.org/\";
    }
    else
    if (navigator.appCodeName==\"Mozilla\" && navigator.appName==\"Netscape\")
    {
    alert(\"Congratulations, you have chosen the right browser\");
    window.location=\"http://www.iexploit.org/index.php/javascript/level-3.2\";
    }
    else
    {
    wrong();
    }
    }

    function wrong()
    {
    alert(\"Sorry, try harder\");
    window.location=\"http://www.iexploit.org/index.php/javascript/level-3.1\";
    }

    //Challenge_three Stage 2
    function login()
    {
    var name=prompt(\"Username:\",\"\");
    var pass=prompt(\"Password:\",\"\");
    if (name!=navigator.appCodeName)
    {
    user=\"root\";
    pass=\"root\";
    }
    if (pass==navigator.appName)
    {
    document.write(\"Welcome \" + name);
    //function to add points to the user his score
    setTimeout('window.location=\"http://www.iexploit.org/index.php/javascript/level-4\"',2000);
    }
    }
    //Coded by x3n0n


    So this one exists of 2 parts.
    Part 1: You just have to access the page with a firefox browser, if you don't you can't access the second page (Or you just look for the next page in the source file) :p

    Part 2: Logon with the credentials that are asked, which can be found on the previous page (if you don't know how to find them) :P

    Example:
    Page 1:
    <html>
    <head>
    <title>test</title>
    <script type=\"text/javascript\" src=\"Challenge_three.js\"></script>
    </head>
    <body onload=\"brb()\">
    <!-- content -->
    </body>
    </html>


    Page 2:
    <html>
    <head>
    <title>test</title>
    <script type=\"text/javascript\" src=\"Challenge_three.js\"></script>
    </head>
    <body>
    <input type=\"button\" onclick=\"login()\" value=\"Login\"/>
    </body>
    </html>


    This is what I have so far ;)
    I'll see if I can code another one tomorow ;) (or maybe tonight)

    (If you have suggestions or remarks, please give them to me) ;)
  • Xin
    Posts: 3,251
    Nice :) bare in mind we already have quite a few JS challenges so focus on more advanced ones
    Xin
  • x3n0n
    Posts: 110
    Could you put the ones you allready have somewhere I can see them?
    That way I know at what level of difficulty I need to code, and also that I make sure that I don't code the same challenges (like JS Challenge 1, i guess :p )