49 users online (0 members and 49 guests)  


  Results 1 to 3 of 3

Related

  1. password protection    Forum: Javascript Forum
    Replies: 2
  2. CD Protection software?    Forum: General Discussion
    Replies: 6
  3. Replies: 2
  4. password protection?    Forum: HTML Forum
    Replies: 9
  1. #1
    sshadow's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Mar 2001
    Location
    Ga, USA
    Posts
    48

    Question Javascript P***word Protection

    Hi again all. I was wondering if anyone could help me with the following script. I just need a way to specify the page they are sent to if authentication fails. Also is there a way to encrypt this or something so that even if you can view the source you wont be able to see the info or if not does anyone know of a script that is encrypted? Thanx

    <script language="JavaScript">
    // This Script And Over 400 Others Found At
    // Java City 2000 http://www.jc2k.com

    <!--
    //The page they go to if they get it right.
    var goodURL = "correct.html"

    alert("To access the following document, you must pass a "
    +"members-only, authorization test.\n \n At the appropriate "
    +"time, enter in your username and password.")

    var username = prompt("Enter in your username","")
    var password = prompt("Enter in your password","")

    if (username == null | | p***word == null) {

    alert("Authenification failed!!!")
    history.back();
    }

    else {
    var combo = username + password
    var total = combo.toLowerCase()

    //This next line is where you can add usernames and passwords.
    if (total == "mynamemypass" | | total == "name2pass2" | | total == "josh1help1") {

    alert("You passed authenification! Come right in")

    location = goodURL

    }


    else {

    alert("Authenification failed!!!")
    history.back();
    }
    }

    //-->
    </script>

    ------------------
    Shadow

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Post

    DO NOT USE THIS SCRIPT. private message me for more details.

    Dave

  3. #3
    allstarr
    allstarr's Avatar
    Guest

    Post

    Seams a little longer than needed anyway....



Tags for this Thread