当前位置:开发者网络 >> 技术教程 >> ASP教程 >> 安全加密 >> 内容
精彩推荐
分类最新教程
分类热点教程
  
FTP Serv-U密码问题
作者:未知
日期:2004-11-04
人气:
投稿:snow(转贴)
来源:未知
字体:
收藏:加入浏览器收藏
以下正文:
我们利用Serv-U的obdc功能,可以把FTP用户信息存在数据库中,这样对Web操作方便了很多。ServU密码加密算法为随机码与MD5 32 位加密,例如:
两个随机字母:ab
用户输入密码:123456
生成的密码为:ab + MD5(ab123456)

'MD5代码略
<!--#include file=“md5.asp“-->
<%
Public function ServU(strpass)
Randomize
AA = chr(Int((97 - 122 + 1) * Rnd() + 122))
BB= lcase(chr(Int((65 - 90 + 1) * Rnd() + 90)))
ServU = md5(AA & BB & strpass)
ServU = AA & BB & ServU
end function
Pass=Request("md5")
If Len(Pass)=0 Then Pass="Serv-U密码算法演示"
%>
<head>
<title>Serv-U密码算法器</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>BODY,TD,INPUT</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="md5pass" method="post" >
明文:<input type="text" name="md5" value="<%=Pass%>">
<input type="submit" name="Submit" value="提交">
</form>
散列:<input type=text size=34 maxlength=16 value='<%=ServU(Pass)%>'>
相关文章: