Results 1 to 9 of 9

Thread: Java script help: please

  1. #1
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Java script help: please

    Hello everybody I´m trying to understand what this means. It´s like a Whats the word game and i don´t now the answer there for I ask you other computer understanding people.

    <script type="text/javascript">
    function login()
    {
    if (document.form.pw.value.substr(1, 7) == unescape("%68%65%78%65%64%70%77"))
    {
    alert('Correct password! Access granted!');
    document.form.submit();
    }
    else
    {
    alert('Wrong password! Access denied!');
    }
    }
    </script>
    <form name="form" method="post">
    Password: <input type="password" name="pw"> <input type="button" onClick="login();" value="Login">
    </form>

    What in goods name thoose this mean? wath is the word?

    if you know it. Please help me..

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's "hexedpw."

    Code:
    <script type="text/javascript">
    function login()
    {
    if (document.form.pw.value.substr(1, 7) == unescape("%68%65%78%65%64%70%77")) // if the second to eighth characters (string starts at 0) are equal to "hexedpw" (url encoded)
    {
    alert('Correct password! Access granted!'); // Tell the user they've passed
    document.form.submit(); // Submit the form
    }
    else
    {
    alert('Wrong password! Access denied!'); // Tell the user they've failed
    }
    }
    </script>
    <form name="form" method="post">
    Password: <input type="password" name="pw"> <input type="button" onClick="login();" value="Login">
    </form>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hei I thoght it was that word too but it ain´t . I think it have something to do with de substr(1,7) thing.. What do you think?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Read the comments. I put them there for a reason.
    Quote Originally Posted by Me
    // if the second to eighth characters (string starts at 0) are equal to "hexedpw" (url encoded)
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That means? that the word is? I dont really undeerstand.. it is just 7 letters.... I am new on this Iám only 14

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The second to eighth characters of the password must be "hexedpw."
    Put a character in front of it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very muck .. I did put an a before it and that was the thing.. Do you think you can help me with this one..

    <script type="text/javascript">
    var pw = prompt("Password?");
    var nan = "wordpass";
    if (pw.indexOf("s") == -1 && parseInt(pw) == 666)
    {
    alert('Correct password! Access granted!');
    self.location = "/Hackerfight/?s=www&ss=testmissions&pw="+pw;
    }
    else
    {
    alert('Wrong password! Access denied!');
    if (! confirm("Try again?"))
    self.location = "/Hackerfight/";
    else
    self.location = "/Hackerfight/www/testmissions/";
    }
    </script>

    This one I hardly understand do you know any thing about it? The word ...I mean..

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What you want is a Javascript tutorial.
    http://www.w3schools.com/js/default.asp

    It must not have s in it, and when run through the parseInt() function, it must return 666. This means it must start with "666." That might be the whole password, it might not. Further checking is done by a server-side script.
    Last edited by Twey; 08-26-2005 at 04:16 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Aug 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hei.. I have just a last question and I have wroten it upp.. If you can just tell me that one you are the best ( You alredy are the best..)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •