zxcvbnm,./木马密码生成和还原程序有参考华夏 心海箫音 代码。
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%
function Ccode(code) for templen1=1 to 10 mmcode="" for j=1 to 10 mmcode=mmcode+chr(asc(mid(code,j,1))+templen1-int(j*1.1)) next Ccode=strReverse(mmcode) if mid(Ccode,templen1+1,10-templen1)=left("zxcvbnm,./",10-templen1) and templen1<>10 then result=left(Ccode,templen1) next Ccode = result end function
function Epass(pass) temppass=StrReverse(left(pass&"zxcvbnm,./",10)) templen=len(pass) mmpassword="" for j=1 to 10 mmpassword=mmpassword+chr(asc(mid(temppass,j,1))-templen+int(j*1.1)) next Epass=replace(mmpassword,"'","B") end function
action = Trim(Request.Form("actionType")) word = trim(request.form("word"))
if action = "encode" then newpass = Epass(word)
elseif action = "decode" then newpass = Ccode(word) else newpass = "" end if
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Pass</title> </head>
<body> <form name=form1 method=post action=''> <table width="100%" border="0" cellspacing="1" cellpadding="4"> <tr> <td width="10%">Source:</td> <td width="90%"><input name='word' type=text value='<%=word%>' size="50"></td> </tr> <tr> <td>Result:</td> <td><input name='newpass' type=text value='<%=newpass%>' size="50"></td> </tr> <tr> <td colspan="2"><input name="actionType" type="radio" checked value="encode"> Encode <input type="radio" name="actionType" value="decode"> Decode</td> </tr> <tr> <td colspan="2"><input name="submit" type="submit" value="Submit"></td> </tr> </table> </form> </body> </html> 【转自世纪安全网 http://www.21safe.com】
|