PDA

View Full Version : Encrypted Password script



Jacky1
03-02-2008, 04:51 PM
1) Script Title:
Encrypted Password script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex9/password.htm

3) Describe problem:
Sorry, I wasn't sure where to put this thread. :(

I was trying to do this script, can be found here: http://www.dynamicdrive.com/dynamicindex9/password.htm

I've got my password, username, passcode and usercode.

I inserted the code into Dreamweaver, but it doesn't work. When I preview it, and type in the correct details, it just says to check the combination.

This is the code I used:


<script>
//Encrypted Password script- By Rob Heslop
//Script featured on Dynamic Drive
//Visit http://www.dynamicdrive.com

function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = (here i put the passcode)
usercode = (here i put the usercode)
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==134603040&&passcode==126906300)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=password+".htm"}
else{
alert("password/username combination wrong")}
}
</script>

<form name="password1">
<strong>Enter username: </strong>
<input type="text" name="username2" size="15">
<br>
<strong>Enter password: </strong>
<input type="password" name="password2" size="15">

<input type="button" value="Submit" onClick="submitentry()">
</form>

Where it says: '(here i put the pass/user code)' i put in the details. Is that all I should do to make it work?

Thanks in advance.

Jacky1
03-02-2008, 05:46 PM
Help!?!!

I'm really stuck. :(