Thread: Javascript P***word Protection
Results 1 to 3 of 3
Related
-
password protection Forum: Javascript Forum
Replies: 2 -
CD Protection software? Forum: General Discussion
Replies: 6 -
How to validate pieces of a word or a word itself in a array? Forum: Javascript Forum
Replies: 2 -
password protection? Forum: HTML Forum
Replies: 9
-
03-27-2001, 06:30 PM #1
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
-
03-27-2001, 06:59 PM #2
DO NOT USE THIS SCRIPT. private message me for more details.
Dave
-
03-28-2001, 07:55 PM #3
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum