设为首页
加入收藏
联系我们
ASP技术 PHP技术 CGI技术 JSP技术 .NET技术 建站技术 VB技术 C++技术 DELPHI技术 编程相关技术
 源码中国-技术中心 >> ASP技术 >> 安全加密 >> FTP Serv-U密码问题
字号:【 】 
FTP Serv-U密码问题
http://edu.cn700.com (点击数: 时间:2004-11-29)
我们利用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)%>'>
 上一篇文章:SHA256 加密的ASP实现
 下一篇文章:全面防御asp网站防黑客攻击[我的原创]
姓 名:  1分 2分 3分 4分 5分
进入论坛 | 发表评论 | 查看评论 | 打印此文 | 关闭窗口 
 
 ▍最新文章
关于我们 | 版权声明 | 广告服务 | 帮助中心 | 联系我们 | 网站地图 | 发布源码 | 设为首页 |