www.webdeveloper.com
Results 1 to 6 of 6

Thread: all about password.

  1. #1
    Join Date
    Dec 2009
    Posts
    12

    all about password.

    i just want to create a password in my javascript webpage, and after the user inputted the right password he will be directed to other wegpage that i created.


    heres my code

    <html>
    <head>
    <title>"level 1"</title>
    </head>
    <body>
    <script type="text/javascript">

    alert ("hi challenger! please press ok and tell me youre name");
    var a = prompt("so your name is? ", " to be honest! I FORGOT!")
    alert ("ahh, ok! so youre name is " + a);


    document.write("if you want to challenge yourself then you've come to the right place!<br>first! i would like you to find the password to gain access to level 2");
    </script>

    <script language="text/JavaScript">
    {
    var a="null";
    function check()
    {
    if (document.a.c.value == a)
    {
    document.location.href="cary1.html/"+document.a.c.value+".htm";
    }
    else
    {
    alert ("Try again");
    }
    }
    }
    </script>

    <tr>
    <td width="100%" height="267" valign="top"><b><font size="7" face="Arial">Level 1</font></b><p>&nbsp;</p>
    <div align="center">
    <center>
    <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="15%" id="AutoNumber4">
    <tr>
    <td width="100%">
    <p align="center"><font size="1" face="Tahoma"><br>
    </font><font size="2" face="Tahoma">Password/font><form name="a" action="javascript:check()">

    <p align="center">
    <input type="login" name="c" maxlength="25" size="16"><br>
    <br>
    <input type="submit" value=" Log In "></p>
    </form></p>
    </td>
    </tr>
    </table>
    </center>
    </div>
    </font></b></p>
    </td>
    </tr>



    </body>
    </html>


    oops! i forgot to say, i want to write the password in the page source so that it can be view by the users, what i want to create are a maze-like webpage where you will need to find the password.


    thanks!

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by cary1234 View Post
    what i want to create are a maze-like webpage where you will need to find the password.
    No way. At least not 100&#37; in a secure way. Javascript is a client-side language, thus the code is to be seen by the user, a way or another. Easily enough for an average coder to decipher whichever you might have ciphered.

    JavaScript was not invented for this kind of job. Use a server-side solution for that.

  3. #3
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Actually this can and has been done. See http://www.webdeveloper.com/forum/sh...41&postcount=1

    It works by encrypting your protected content with a thoroughly tested and secure algorithm, which even the world's best cryptographers can't break.

    Enjoy!
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  4. #4
    Join Date
    Dec 2009
    Posts
    12

    thanks for your responses sir jeff mott, kor

    thank you very much.

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by Jeff Mott View Post
    It works by encrypting your protected content with a thoroughly tested and secure algorithm, which even the world's best cryptographers can't break.
    If so, CIA must have been already very interested in that algorithm.

  6. #6
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Quote Originally Posted by Kor View Post
    If so, CIA must have been already very interested in that algorithm.
    In fact, the NSA has approved use of the AES algorithm for top secret material.
    Last edited by Jeff Mott; 12-05-2009 at 05:34 PM.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles