為什麼我沒看明白密碼和腳本的關聯性
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
al="`1234567890-=~!@#$%^&*()_+qwer"
+"tyuiop[]QWERTYUIOP{}|asdfghjkl;A"
+"SDFGHJKL:zxcvbnm,./ZXCVBNM<>?";
ab1="";
bctr=0;
function ckPwd(){
tst=document.isn.username.value
+"*"+document.isn.passwrd.value+"*";
ls=document.pd.pe.value;
a=eval(ls.substring(0,2))-91;
ls=ls.substring(2,ls.length);
nls="";
flg=0;
while (ls.length>12){
ab=eval(ls.substring(0,2))-89;
ab1=(ab1==""?""+ab:ab1);
oab1=ab1;
ls=ls.substring(2,ls.length);
for (var i=0;i<ab;i++){
nr=eval(ls.substring(0,2))-a;
ls=ls.substring(2,ls.length);
nls+=al.charAt(nr);
}
nls+="*";
if (nls.indexOf(tst)>-1){
ls="";
flg=1;
}
}
if (flg==1){
tstOk();
}
else{
bctr++;
if (bctr>3){
location.href="nopass.htm";
}
else{
alert("對不起,用戶名/密碼錯誤."
+" 你已試登錄"+bctr+"次.");
}
}
}
function tstOk(){
ab1=ab1+""+a;
alert("正確,開始登錄!");
location.href="pwds.htm?"+ab1;
}
// End Hiding -->
</SCRIPT>
<body>
<FORM NAME="pd">
<!-- Paste the element from the pseudo-encrypter here -->
<!-- Paste this element into your script -->
<INPUT TYPE='hidden' NAME='pe' VALUE='9393693658789606190557772053938953313395586858685868976834793758313033975834793758313033 '>
</FORM>
<FORM NAME="isn">
<TABLE BORDER=2 CELLPADDING=5 CELLSPACING=0 BGCOLOR=BLUE>
<TR><TD COLSPAN=2 ALIGN=CENTER><FONT SIZE=4 COLOR=WHITE FACE="楷體_GB2312"><B>請您輸入</B></FONT></TD></TR>
<TR><TD><FONT SIZE=3 COLOR=WHITE><B>UserName:</B></FONT></TD>
<TD><INPUT TYPE="text" NAME="username" VALUE="" SIZE=10></TD></TR>
<TR><TD><FONT SIZE=3 COLOR=WHITE><B>Password:</B></FONT></TD>
<TD><INPUT TYPE="password" NAME="passwrd" VALUE="" SIZE=10></TD></TR>
<TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE="button" NAME="btn" VALUE=" 登錄 " onClick="ckPwd();return false;"></TD></TR>
</TABLE></FORM>
<TABLE BORDER=1 WIDTH=486>
<TR><TD COLSPAN=3 ALIGN=CENTER><FONT FACE="楷體_GB2312"><B>你可以使用如下號碼:</B></FONT></TD</TR>
<TR><TD><FONT FACE="helvetica,arial,geneva">User Name:John<BR>Password: 4$3gb%a</TD>
<TD><FONT FACE="helvetica,arial,geneva">User Name: Mary<BR>Password: hHhHhH</TD>
<TD><FONT FACE="helvetica,arial,geneva">User Name: Humphrey<BR>Password: humphrey</TD></TR>
</TABLE>
使用自己的算法在本地對用戶名密碼驗證。