admin_pwd.asp

来自「雷客图ASP站长安全助手 功能: 1、ASP木马查找(能够查出现在几乎所有的」· ASP 代码 · 共 83 行

ASP
83
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/chkAdmin.asp"-->
<!--#include file="config.asp" -->
<!--#include file="inc/conn.asp" -->
<!--#include file="inc/md5.asp" -->
<%
'***************ASPSecurity 后台密码修改*****************
' Copyright 2006
' Create:2006-1-14
' Update:2006-4-17
'********************************************************
%>
<!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">
<link rel="stylesheet" rev="stylesheet" href="inc/control.css" type="text/css" media="all" />
</head>
<body class="ContentBody">
<div class="MainDiv">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
    <th class="CTitle">雷客图ASP站长安全助手 修改管理密码
  </tr>
  <tr>
    <td class="CPanel">
        <div id="updateInfo" style="background:ffffe1;border:1px solid #89441f;padding:4px;display:none"></div>

	<table width="100%" border="0" cellpadding="0" cellspacing="0">
	 <tr>
		 <td valign="top" style="padding:5px;width:140px"><img src="images/Icon/ControlPanel.png" width="128" height="128"/></td>
		 <td valign="top">
<%
if request.Form("new_pwd1")="" and request.Form("new_pwd2")="" then
%>
		 <form name="form1" method="post" action="">
		 <div align="left" style="padding:5px;line-height:170%;clear:both;font-size:12px">
		     <p>
			     <b>输入旧密码:</b>			     
			     <input name="old_pwd" type="password" size="20" style="border:1px solid #999">
			     <br/>
			     <b>输入新密码:</b>			     
			     <input name="new_pwd1" type="password" id="new_pwd1" size="20" style="border:1px solid #999">
			     <br/>
		         <b>确认新密码:</b>		         
		         <input name="new_pwd2" type="password" id="new_pwd2" size="20" style="border:1px solid #999">
		         </p>
		     <p>
		        &nbsp;<input type="submit" name="Submit" value="提交" style="border:1px solid #999">
		       <input type="reset" name="Submit2" value="重置"  style="border:1px solid #999">
		       <br/>
		          </p>
		 </div>    
		 </form>
<%
else
	If request.Form("new_pwd1")<>request.Form("new_pwd2") then
		response.write("两次的密码不一致<br><br><a href='javascript:history.go(-1);'>请返回重新输入</a>")
	else
		Set rs = Server.CreateObject("ADODB.Recordset")
		SQL="select * from [admin] where id=1"
		rs.Open SQL,Conn,1,3
		If rs("pwd") <> MD5(request.Form("old_pwd")) Then
			response.write("密码错误!<br><br><a href='javascript:history.go(-1);'>请返回重新输入</a>")
		Else
			rs("pwd") = MD5(request.Form("new_pwd1"))
			rs.update
			response.write("更新密码成功!")
		End If
		rs.close
		set rs = nothing
		
	end if
end if
%> 
	 </tr>
	</table>
</td></tr></table>

</div>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?