Click to See Complete Forum and Search --> : password help
shutuploser[gk]
11-03-2003, 12:25 PM
im so frustrated :mad:
im trying to get a password portect thingy where you enter username and password, i just started using javascript.
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
JavaScript is not as well suited for this task as a server-side language such as PHP or Perl is, due to security issues. I'd recommend using one of those.
smartguybot576
11-03-2003, 02:29 PM
if security is not an issue, you can find sum goodones at http://javascript.internet.com, and look at the password section.
If security is not an issue, why use a password at all?
smartguybot576
11-03-2003, 02:53 PM
we have reasons. like the members section isn't really a big security issue. and anyways, how could someone break a javascript password?
AdamGundry
11-03-2003, 03:18 PM
There are plenty of ways to break Javascript passwords, ranging from simply viewing the source to evaluating complex JS expressions, or bypassing the protection and going straight to the content. The exact method depends on the script, and not all scripts are created equal.
The best I have found is this one (http://www.codingforums.com/showthread.php?s=&threadid=10114), but like pyro said - if you need true security, use server side code.
Adam
smartguybot576
11-03-2003, 03:23 PM
is there a way to automaticly add someone to a list of users? heres the pass word code i use:
<!-- Begin
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="admin" && password=="pass") { window.location="bolt.html"; done=1; }
if (username=="member2" && password=="password2") { window.location="bolt.html"; done=1; }
if (username=="member3" && password=="password3") { window.location="bolt.html"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
shutuploser[gk]
11-06-2003, 02:53 PM
thanks so much, like smartguybot576 said, its just a members only page, no big deal if someone hacks into it.
:)
shutuploser[gk]
11-06-2003, 03:24 PM
hey, what form script did you use to go with that?
wow i sound stupid...
smartguybot576
11-06-2003, 03:27 PM
itz javascript, just put it in the <body> section of ur document
shutuploser[gk]
11-06-2003, 03:35 PM
hmmm.... ok maybe thatll work ill try it
shutuploser[gk]
11-06-2003, 03:39 PM
ok. i paste it in the <body> section, but there is no form where you enter your username and password...
if you have it in html, paste whats inside the <form> tags or try to help me out here
:D