№程序高手请进,一个用脚本做的非常简单的交互式密码程序,但怎么也找不出密码所在,一个不可逆算法???解出给500分,up有分。下面是一个html页面,如果输入正确密码网页会自动跳转到 "密码"+".html"有文件去。 我已初步对程序作了分析注释,但找不出关键,无法逆算回去找出密码,请大家帮忙试一试。谢谢。最好写个密码逆算的公式。
解出密码者,当然还要写出逆算公式的,给500分。。这个脚本密码程序是由一个html页面的密码登陆器生成的。
参见如下页面,也可看他的原码作参考。
http://51js.1000box.net/51js-baoku/baoku/0144.htm
<script>var pass=new Array()
var t3=""
var lim=4    //(密码为4位)
pass[0]="ICEs1420FR4MxT3"
pass[1]="V7ZwpGeSMPCKir"
pass[2]="pEIyID7MSC37a2y"
pass[3]="GyyTNs5VUiPp5f"    //经过分析应该是截取上面lim中值,再截取密码位数值进行判断。好像只对pass[3]进行处理其。
pass[4]="4VPntHQBUdAlOrfP"
pass[5]="58VPntHQBUdAlOrf"//你可以设置后缀为其它文件格式,默认为.html
var extension=".html"
var enablelocking=0
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
var temp3=''
var cur=0
function max(which){
return (pass[Math.ceil(which)+(3&15)].substring(0,1))
}function testit(input){
temp=numletter.indexOf(input)
var temp2=temp^parseInt(pass[phase1-1+(1|3)].substring(0,2))
temp2=numletter.substring(temp2,temp2+1)
return (temp2)
}
function submitentry(){
t3=''
verification=document.password1.password2.value
phase1=Math.ceil(Math.random())-6+(2<<2)
var indicate=true
for (i=(1&2);i<window.max(Math.LOG10E);i++)
t3+=testit(verification.charAt(i))
for (i=(1&2);i<lim;i++){
if (t3.charAt(i)!=pass[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))
     //这里应该是判断的地方,但你自己输入的密码已经编码。。
indicate=false
}
if (verification.length!=window.max(Math.LOG10E))
   //判断位数。。?????
indicate=false
if (indicate)
window.location=verification+extension
else
alert("密码错误,请再输入!")
}
</script>
<table border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFBD">
  <tr>
    <td width="100%"><form name="password1"><div align="center"><center><p><strong>Enter password: </strong><input
      type="text" name="password2" size="15"><br>
      <input type="button" value="Submit" onClick="submitentry()"></p>
      </center></div>
    </form>
    </td>
  </tr>
</table>