我下了一个传说水吧聊天室的数据库,但是其中的用户密码全部是: a7YA/6^-Lu@2:L 这种形式,其实上述密码是:123456
现我想请大大或者高手帮忙,写一段代码或者脚本将其直接还原,请帮忙,下面是其加密的代码:(dbfunc.asp)
就是红色的那段:
<%
rem 断开连接
sub connclose()
if isobject(conn) then
conn.close
set conn=nothing
end if
end sub
rem 打开连接
sub connopen
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open connstr
if err then response.Write("打开数据库失败!"):response.End()
end sub
rem 数据库中已有此呢称
function dbuserexist(str)
set subrs=conn.execute("select * from user where username='"+str+"'")
if not (subrs.eof and subrs.bof) then dbuserexist=true
rsclose(subrs)
end function
rem 数据集关闭
sub rsclose(rs)
if isobject(rs) then
rs.close
set rs=nothing
end if
end sub
rem 对欲存入库中的数据进行规范化(代码来源:传说水吧 去掉了以前的给出错误提示)
function trdb(mess)
rem 这里有可能加上所有脏话的限制
mess=server.HTMLEncode(mess)
mess=replace(mess,chr(34),""")
mess=replace(mess,"'","'")
mess=replace(mess," "," ")
mess=replace(mess,chr(10),"")
trdb=replace(mess,chr(13),"<br>")
end function
rem 对提交的密码进行单向加密,并做规范处理
function trpass(preString)
Dim texts
Dim seed
Dim i,length
prestring = trim(preString)
length = len(preString)
seed = length
Randomize(length)
texts = ""
for i = 1 to length
seed = int(94*rnd(-asc(mid(preString,i,1))-seed*asc(right(prestring,1)))+32)
texts = texts & chr(seed) & chr(int(94*rnd(-seed)+32))
next
texts=replace(texts,"'","")
trpass=replace(texts,chr(34),"")
end function
sub page_errmsg() %>
<table width="400" border="0" align="center">
<tr>
<td height="26" background="PIC/admin_bg_11.gif"><b><img src="PIC/warning.gif" width="16" height="16">
系统错误信息</b></td>
</tr>
<tr>
<td>
<%If Err.Number<>0 Then' 错误处理%>
<center>
<b>后台管理系统页面错误报告</b>
</center>
错误号:<%= Err.Number %><br>
错误描述:<%= Err.Description %><br>
错误源:<%= Err.Source %><br>
错误发生行:<%=Err.Line%>
<%end if%>
</td>
</tr>
<tr>
<td align="center">
<input type="button" name="Submit" value="返回前页" onClick="javascript:history.back();">
</td>
</tr>
</table>
<%
response.end()
end sub%>