求教ASP如何在前台实现文本形式批量录入MD5加密

gitti0 2012-06-23 04:16:51
大家好,我下载了一个MD5录入系统,我想求教ASP如何在前台实现文本形式批量录入MD5加密,此程序只能单一录入,代码如下,请懂的人帮我修改一下
谢谢
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!-- #include file ="include/head.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=rsuu("sitename")%> Power BY Zmke.Net</title>
<meta content="<%=rsuu("keywords")%>" name="keywords" />
<meta name="description" content="<%=rsuu("sitedescription")%>" />
<link rel="stylesheet" href="images/zmke.css" type="text/css">
</head>

<body bgcolor="#E2EFF7">


<div style="background-color:#5C87B2;background-image:url(images/bg_top.jpg);text-align:center; font-size:36px;border:#5C87B2;height:100px;width:100%;color:#FFFFFF;">


</div>
<div style="background-color:#E2EFF7;border:#5C87B2;width:100%;font-size:12px;"><p> </p><p> </p><p> </p>
<form id="form1" name="form1" method="post" action="index.asp">
<center>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>

<td><div style="text-align:center"><input name="zf" type="text" style="height:40;width:400px;font-size:30px" value="" maxlength="60" /></div></td>
</tr>
<tr>

<td height="40"><div align="center"><a href="index.asp">MD5加密</a> <a href="jiemi.asp">MD5解密</a></div></td>
</tr>
<tr>
<td style="text-align:center;" ><input type="submit" style="font-size:14px;height:30px;width:90px;" name="Submit" value="MD5加密" class="inputbutten" >
<input type="reset" style="font-size:14px;height:30px;width:90px;" name="submit2" value="重 写" class="inputbutten" ></td>
</tr>
</table>
</center>
</form>


</div>
<p> </p>

<%
if trim(request.form("zf"))<>"" then
lszm=trim(request.form("zf"))
md5jiami32=md5(trim(request.form("zf")),32)
md5jiami16=md5(trim(request.form("zf")),16)

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from zmke_md5 where zmke_name='"&lszm&"'"
rs.open sql,conn,1,3
if rs.eof or rs.bof then
rs.addnew
rs("zmke_name")=lszm
rs("md5_16")=md5jiami16
rs("md5_32")=md5jiami32
rs.update
rs.close
end if
%>
<script>
function copy(obj){
window.clipboardData.setData("text",obj.innerText)
}
</script>

<style>

.a{cursor:hand;}

</style>
<table border="1" width="500" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" style="font-size:12px;line-height:200%">
<tr>
<TD><div align="center">原内容</div></TD>
<td width="60"><div align="center">加密类型</div></td>
<td width="253"><div align="center">加密结果</div></td></tr>
<tr>
<TD rowspan="2"><div align="center">
<% response.write server.HTMLEncode(trim(request.form("zf")))%>
</div></TD>
<td width="60"><div align="center">MD5(16)</div></td>
<td width="253"><font color=red><div style="margin-left:30px;" onclick=copy(this) class=a title="点击复制"><% response.Write(md5jiami16)%></div></font></td>
</tr>
<tr>
<td width="60"><div>
<div align="center">MD5(32)</div>
</div></td>
<td width="253"><font color=red><div style="margin-left:30px;" onclick=copy(this) class=a title="点击复制"><% response.Write(md5jiami32)%></div></td>
</tr>
</table>

<%end if%>
</div>
<p> </p>
<p> </p>
<div style="font-size:12px;text-align:center">
<!-- #include file ="include/copyright.asp" -->

</div>
</body>
</html>
...全文
139 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gitti0 2012-07-01
  • 打赏
  • 举报
回复
没人原帮,我终于自已搞定
tandjava 2012-06-24
  • 打赏
  • 举报
回复
呵呵。看看
gitti0 2012-06-24
  • 打赏
  • 举报
回复
谢谢calmcrime您的回答,此程序后台可批量录入数字,只是不能录入字母加混合,我不懂后台处理字符串,循环添加,我是想如何修改代码实现字母及混合批量录入,或以文本上传方式批量录入,后台录入代码如下:
<!--#include file="../conn.asp"-->
<!--#include file="../md5.asp"-->
<!-- #include file ="inc/Admin_Chk.asp" -->
<%
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>数字MD5结果生成页</title>
<style type="text/css">
<!--
.STYLE1 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>

<body style="font-size:12px;">
<h2 align="center"><span class="STYLE1"><a href="creatnum_md5.asp">返回设置页面</a></span><br />
</h2> <%

start=request.form("start_num")
finish=request.form("finish_num")
for i= start to finish
md5jiami32=md5(i,32)
md5jiami16=md5(i,16)

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from zmke_md5 where zmke_name='"&i&"'"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
rs.addnew
rs("zmke_name")=i
rs("md5_16")=md5jiami16
rs("md5_32")=md5jiami32
rs.update
response.Write("生成完成:")
response.Write(i & "=md5=" & md5jiami16 & "=md5=" & md5jiami32 & "<br>")
end if
next
response.Write("<b><font size=3 color=red>所有结果均已生成完毕!</font></b>")
rs.close
%>

</body>
</html>

<!--#include file="../conn.asp"-->
<!--#include file="../md5.asp"-->
<!-- #include file ="inc/Admin_Chk.asp" -->
<%
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>数字MD5结果生成设置</title>
<style type="text/css">
<!--
.STYLE1 {
color: #FF0000;
font-size: 14px;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="creatnum_md5end.asp">
<div align="center">
<h3>数字解密MD5值生成设置</h3>
</div>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle">开始数字
<input name="start_num" type="text" style="height:40;width:100px;font-size:20px" value="" maxlength="60"></td>
<td align="center" valign="middle">到</td>
<td align="center" valign="middle">结束数字
<input name="finish_num" type="text" style="height:40;width:100px;font-size:20px" value="" maxlength="60"></td>
</tr>
<tr>
<td align="center" valign="middle"> </td>
<td align="center" valign="middle"> </td>
<td align="center" valign="middle"> </td>
</tr>
<tr>
<td align="center" valign="middle"> </td>
<td align="center" valign="middle"><input type="submit" style="font-size:14px;height:30px;width:90px;" name="Submit" value="开始生成" class="inputbutten" ></td>
<td align="center" valign="middle"> </td>
</tr>
</table>
<form>
<h4 align="center">请根据您的服务器的实际能力设置每次生成范围,本地建议每次生成5000个</h4>
<p align="center"> </p>
<p align="center" class="STYLE1">说明:本版本暂时只支持数字MD5自动生成,开始数字及结束数字分别是指:开始加密的数值和结束加密的数值.</p>
<p align="center" class="STYLE1">程序加密开始后,由开始数值开始加密并写入数据库,每次递加1后再次加密,直到结束数字值为止 </p>
<p></p>
</body>
</html>
zyc10a 2012-06-24
  • 打赏
  • 举报
回复
我也想学习
001007009 2012-06-23
  • 打赏
  • 举报
回复
将自定义的某种格式的字符串,提交给后台,后台处理字符串,循环添加。

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧