Asp后台密码查看或修改?
<!--#includefile="../inc/dbconn.asp"--><!--#includefile="../inc/func.asp"--><%Respons...
<!--#include file="../inc/dbconn.asp" -->
<!--#include file="../inc/func.asp" -->
<%Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"%>
<%
if request.form("operation")="login" then
dim sn
sn=request.form("sn")
if lcase(sn)<>lcase(session("psn")) then
call showerr("系统提示:请输入正确的验证码!")
end if
dim admin
admin=request.form("admin")
admin=replace(admin,"'","")
dim pwd
pwd=request.form("pwd")
pwd=replace(pwd,"'","")
dim rs
set rs=conn.execute("select * from admin where admin='"&admin&"' and pwd='"&pwd&"'")
if rs.eof then
call showerr("输入的帐号或密码不正确,请正确填写!")
end if
session("key")="freesky_zhangdan"
session("manage")=admin
session("qx")=rs("qx")
'response.write rs("qx")
'response.end
call showmsg("用户登录成功!","main.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图文印象网站管理中心</title>
<link href="images/style.css" rel="stylesheet" type="text/css">
</head>
<body BACKGROUND="Images/bg.gif">
<table width="100%" height="466" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td><table width="524" height="276" border="0" align="center" cellpadding="0" cellspacing="0" background="images/admin_login.gif">
<tr> <td width="524" height="276"><form name="form1" method="post" action="index.asp">
<table width="91%" height="121" border="0" cellpadding="0" cellspacing="0"> <tr>
<td width="44%"> </td><td width="18%"> </td><td width="38%"> </td></tr> <tr> <td height="25"> </td><td height="25"><div align="center">用户名:</div></td><td height="25">
<input name="admin" type="text" class="ipt1" id="admin">
</td></tr>
<tr> <td height="25"> </td><td height="25"><div align="center">密 码:</div></td><td height="25">
<input name="pwd" type="password" class="ipt1" id="pwd">
</td></tr>
<tr>
<td height="25"> </td>
<td height="25"><div align="center">验证码:</div></td>
<td height="25"><input name="sn" type="text" class="ipt1" id="sn" size="10">
<img src="code.asp"></td>
</tr>
<tr> <td> </td><td colspan="2"><div align="center"> <input name="Submit" type="submit" class="ipt2" value="提交">
<input name="Submit2" type="reset" class="ipt2" value="重置"> <input name="operation" type="hidden" id="operation" value="login">
</div></td></tr> </table>
</form></td></tr> </table></td></tr> </table>
</body>
</html>
<%
call COCLS
%> 展开
<!--#include file="../inc/func.asp" -->
<%Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"%>
<%
if request.form("operation")="login" then
dim sn
sn=request.form("sn")
if lcase(sn)<>lcase(session("psn")) then
call showerr("系统提示:请输入正确的验证码!")
end if
dim admin
admin=request.form("admin")
admin=replace(admin,"'","")
dim pwd
pwd=request.form("pwd")
pwd=replace(pwd,"'","")
dim rs
set rs=conn.execute("select * from admin where admin='"&admin&"' and pwd='"&pwd&"'")
if rs.eof then
call showerr("输入的帐号或密码不正确,请正确填写!")
end if
session("key")="freesky_zhangdan"
session("manage")=admin
session("qx")=rs("qx")
'response.write rs("qx")
'response.end
call showmsg("用户登录成功!","main.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图文印象网站管理中心</title>
<link href="images/style.css" rel="stylesheet" type="text/css">
</head>
<body BACKGROUND="Images/bg.gif">
<table width="100%" height="466" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td><table width="524" height="276" border="0" align="center" cellpadding="0" cellspacing="0" background="images/admin_login.gif">
<tr> <td width="524" height="276"><form name="form1" method="post" action="index.asp">
<table width="91%" height="121" border="0" cellpadding="0" cellspacing="0"> <tr>
<td width="44%"> </td><td width="18%"> </td><td width="38%"> </td></tr> <tr> <td height="25"> </td><td height="25"><div align="center">用户名:</div></td><td height="25">
<input name="admin" type="text" class="ipt1" id="admin">
</td></tr>
<tr> <td height="25"> </td><td height="25"><div align="center">密 码:</div></td><td height="25">
<input name="pwd" type="password" class="ipt1" id="pwd">
</td></tr>
<tr>
<td height="25"> </td>
<td height="25"><div align="center">验证码:</div></td>
<td height="25"><input name="sn" type="text" class="ipt1" id="sn" size="10">
<img src="code.asp"></td>
</tr>
<tr> <td> </td><td colspan="2"><div align="center"> <input name="Submit" type="submit" class="ipt2" value="提交">
<input name="Submit2" type="reset" class="ipt2" value="重置"> <input name="operation" type="hidden" id="operation" value="login">
</div></td></tr> </table>
</form></td></tr> </table></td></tr> </table>
</body>
</html>
<%
call COCLS
%> 展开
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
展开全部
注册个密码是123的。再到数据库找出来,粘到要用的地方就是了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
是不是你自已做的哦?
不是的话想看密码,把前面
if request.form("operation")="login" then
dim sn
sn=request.form("sn")
if lcase(sn)<>lcase(session("psn")) then
call showerr("系统提示:请输入正确的验证码!")
end if
删了.
再把
不是的话想看密码,把前面
if request.form("operation")="login" then
dim sn
sn=request.form("sn")
if lcase(sn)<>lcase(session("psn")) then
call showerr("系统提示:请输入正确的验证码!")
end if
删了.
再把
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
首先,备份你现在这个ASP文件(复制一份),然后编辑内容如下:
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim adminname
dim hailongpwd
if request.QueryString("action")="search" then
dim word,engine
word = request.Form("word")
engine = request.Form("search")
Select case engine
end select
end if
if request("action")="adminlogin" then
if request("CheckCode")<>Session("CheckCode") then
Response.Write("<script language=javascript>alert('请输入正确的认证
码!');this.location.href='admin.asp';</script>")
session("adminlogin")=""
Response.End
end if
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据
请不要乱该参数!');this.location.href='admin.asp';</script>")
response.end
end if
adminname=MD5(trim(replace(request("adminname"),"'","")))
adminpwd=MD5(trim(replace(request
("202cb962ac59075b964b07152d234b70ac59075b964b0715"),"'","")))
if adminname="" and adminpwd="" then
Response.Write("<script language=javascript>alert('请输入用户名或密
码!');this.location.href='admin.asp';</script>")
Response.End
end if
if adminname="admin" and adminpwd="123456" then
session("adminlogin")=sessionvar
session("issuper")=rs("admin_id")
session.timeout=50
Session("CheckCode")=""
rs.close
set rs=nothing
end if
elseif request("action")="logout" then
session("adminlogin")=""
session("issuper")=""
Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
if session("adminlogin")=sessionvar then
frame=request("frame")
if frame="" then
%>
存盘后可以用用户名admin 密码123456进行登陆,登陆到后台后进行密码修改,修改后把你备份的文件内容恢复到这个文件覆盖,密码123456就失效了。操作不明白的可以hi我。
哦,这个页面登陆成功后应该是一个白页面,因为没有跳转,你看一下目录下应该有index.asp或default.asp之类的文件,登陆后跳转过去就行了。
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim adminname
dim hailongpwd
if request.QueryString("action")="search" then
dim word,engine
word = request.Form("word")
engine = request.Form("search")
Select case engine
end select
end if
if request("action")="adminlogin" then
if request("CheckCode")<>Session("CheckCode") then
Response.Write("<script language=javascript>alert('请输入正确的认证
码!');this.location.href='admin.asp';</script>")
session("adminlogin")=""
Response.End
end if
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据
请不要乱该参数!');this.location.href='admin.asp';</script>")
response.end
end if
adminname=MD5(trim(replace(request("adminname"),"'","")))
adminpwd=MD5(trim(replace(request
("202cb962ac59075b964b07152d234b70ac59075b964b0715"),"'","")))
if adminname="" and adminpwd="" then
Response.Write("<script language=javascript>alert('请输入用户名或密
码!');this.location.href='admin.asp';</script>")
Response.End
end if
if adminname="admin" and adminpwd="123456" then
session("adminlogin")=sessionvar
session("issuper")=rs("admin_id")
session.timeout=50
Session("CheckCode")=""
rs.close
set rs=nothing
'这里是我加出来的,下面的admin.asp可以换成index.asp或default.asp,具体看你的后台首页是哪个文件而定。
Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
elseif request("action")="logout" then
session("adminlogin")=""
session("issuper")=""
Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
if session("adminlogin")=sessionvar then
frame=request("frame")
if frame="" then
%>
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim adminname
dim hailongpwd
if request.QueryString("action")="search" then
dim word,engine
word = request.Form("word")
engine = request.Form("search")
Select case engine
end select
end if
if request("action")="adminlogin" then
if request("CheckCode")<>Session("CheckCode") then
Response.Write("<script language=javascript>alert('请输入正确的认证
码!');this.location.href='admin.asp';</script>")
session("adminlogin")=""
Response.End
end if
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据
请不要乱该参数!');this.location.href='admin.asp';</script>")
response.end
end if
adminname=MD5(trim(replace(request("adminname"),"'","")))
adminpwd=MD5(trim(replace(request
("202cb962ac59075b964b07152d234b70ac59075b964b0715"),"'","")))
if adminname="" and adminpwd="" then
Response.Write("<script language=javascript>alert('请输入用户名或密
码!');this.location.href='admin.asp';</script>")
Response.End
end if
if adminname="admin" and adminpwd="123456" then
session("adminlogin")=sessionvar
session("issuper")=rs("admin_id")
session.timeout=50
Session("CheckCode")=""
rs.close
set rs=nothing
end if
elseif request("action")="logout" then
session("adminlogin")=""
session("issuper")=""
Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
if session("adminlogin")=sessionvar then
frame=request("frame")
if frame="" then
%>
存盘后可以用用户名admin 密码123456进行登陆,登陆到后台后进行密码修改,修改后把你备份的文件内容恢复到这个文件覆盖,密码123456就失效了。操作不明白的可以hi我。
哦,这个页面登陆成功后应该是一个白页面,因为没有跳转,你看一下目录下应该有index.asp或default.asp之类的文件,登陆后跳转过去就行了。
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/md5.asp"-->
<%
dim adminname
dim hailongpwd
if request.QueryString("action")="search" then
dim word,engine
word = request.Form("word")
engine = request.Form("search")
Select case engine
end select
end if
if request("action")="adminlogin" then
if request("CheckCode")<>Session("CheckCode") then
Response.Write("<script language=javascript>alert('请输入正确的认证
码!');this.location.href='admin.asp';</script>")
session("adminlogin")=""
Response.End
end if
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.Write("<script language=javascript>alert('你提交的路径有误,禁止从站点外部提交数据
请不要乱该参数!');this.location.href='admin.asp';</script>")
response.end
end if
adminname=MD5(trim(replace(request("adminname"),"'","")))
adminpwd=MD5(trim(replace(request
("202cb962ac59075b964b07152d234b70ac59075b964b0715"),"'","")))
if adminname="" and adminpwd="" then
Response.Write("<script language=javascript>alert('请输入用户名或密
码!');this.location.href='admin.asp';</script>")
Response.End
end if
if adminname="admin" and adminpwd="123456" then
session("adminlogin")=sessionvar
session("issuper")=rs("admin_id")
session.timeout=50
Session("CheckCode")=""
rs.close
set rs=nothing
'这里是我加出来的,下面的admin.asp可以换成index.asp或default.asp,具体看你的后台首页是哪个文件而定。
Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
elseif request("action")="logout" then
session("adminlogin")=""
session("issuper")=""
Response.write "<script>window.document.location.href='./admin.asp';</script>"
end if
if session("adminlogin")=sessionvar then
frame=request("frame")
if frame="" then
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我滴孩来,这么点小问题还用100分啊。有钱人。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询