Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default How 2 Make A Password Enabled Area Using Javascript!

    Hey,

    Protecting private pages with passwords:

    Javscript offers a variety of methods by which to password-protect your webpage(s). And some of the methods are very hack proof. However look else where if you are looking for maximum security!

    This script is just an example of how javascript can be used to achieve password protection. This is the first part of the script:

    <SCRIPT>
    <!--

    var wrong="if the password the person has enterd is incorrect put the page link 2 where they will be re-directed to here!"
    var password="Type The Password You Wish In Here";
    var name = prompt ("put what u want the text in the dialog box 2 say in here","the password u enterd here from earlier");
    if (name == password) { (confirm("welcome!"))}
    else {location.href=wrong}

    //-->
    </SCRIPT>

    --------------------------------------------------------------------------

    Here is a working version of it...

    <SCRIPT>
    <!--

    var wrong="sorry.html";
    var password="crazyfool";
    var name = prompt ("enter the password","crazyfool");
    if (name == password) {(confirm("welcome!"))}
    else {location.href=wrong}

    //-->
    </SCRIPT>

    --------------------------------------------------------------------------

    1. Add the script and comment tags to the HEAD bit of your HTML document.
    2. Type the javascript, changing the password to your own password.
    3. Test the script in your browser to see if it works.

    I hope that has helped someone... If noone :eusa_thin

    Thanks
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  2. #2
    Join Date
    Jun 2004
    Posts
    753
    Tokens
    0

    Default

    it is a good idea but javascript wudnt be the best thing to use as if you right click and view source u can see wot pass it is to get to the restircted page
    My sites

    Mangacars.co.uk

    Ppxgames.com

    Uploadforfree.NET (EXPIRED)

    PixelLoft.NET

    Css-Gyro.com

    Neonfusion.NET

    [Zainx / Lofty]

  3. #3
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    I Was Gonna Menchan That, But Decided Against It :eusa_wall
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  4. #4
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    java script is a VERY insecure way to password a page, becuse the password is in the sorse.
    You realy need php or cgi to make a viable password script.

    There are ways where the pw isnt in the script, but the pw and user name if one is wanted appear in the page url meaning other pople could read it off.

  5. #5
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    well, it could be used for n00bs lol gimmie some rep go on lol i took alllllll that time and effort :eusa_wall
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  6. #6
    Join Date
    Aug 2004
    Location
    Sawley
    Posts
    771
    Tokens
    1,631
    Habbo
    T0X!C-uk

    Latest Awards:

    Default

    Very unsecure way to make passworded areas the best thing to do is use php or htaccess is also good.

    Javascript passwords are best used in javascipt areas such as java games e.g. runescape etc as the source cannt be viewed and also a database is used

  7. #7
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    it is actually, if u go to any microsoft site, u cannot view the source, so if u had the code for that, noone would have 2 view the source 2 see it :eusa_clap omg all i wanted was a little rep just 2 show someone thinks that i made the effort but no, someone bad reps me for asking
    Last edited by iRoss; 14-02-2005 at 05:20 PM.
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  8. #8
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    ? The microsoft websites sorese is all there, They just write it in a starte line to make it hard for people to read?

  9. #9
    Join Date
    Jul 2004
    Location
    Webby Forums!
    Posts
    1,879
    Tokens
    0

    Latest Awards:

    Default

    One javascript on I found meant you couldnt get to the source before entering the right pass..


    Chilimagik.net // Reviews, Band Biographies, News, Pics + Loads More!!
    [Thybag.co.uk - Vive la revolutione]

  10. #10
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by splintercell!
    One javascript on I found meant you couldnt get to the source before entering the right pass..
    Yea but if u disbale javascript, wich i could do with the devolpsers tool bar on fire fox, o could go in and get the pass from the script easy as pie (mmm pie)

    So with javascripst thers no real way of doing it. Athogh there are places that host free scripst you can sign up for, many including passoword protection, form handlers etc.
    Before i had a php enbaled host i used http://scripthost.com/
    Last edited by Mentor; 14-02-2005 at 08:49 PM.

Page 1 of 2 12 LastLast

Posting Permissions

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