复制代码 代码如下:
登陆时记录cookies页面代码
<!--#include file="md5.asp"--> //32位md5加密文件,一定得调用,该文件到处有,我就不提供了
<%
dim Username,Password,Question,Answer,Expires,Verify
Username=replace(trim(Request.form("Username")),"'","''") //用户名
Password=replace(trim(Request.form("Password")),"'","''") //用户密码
Question=replace(trim(Request.form("Question")),"'","''") //密码问题
Answer=replace(trim(Request.form("Answer")),"'","''") //密码答案
Expires=replace(trim(Request.form("Expires")),"'","''") //cookies记录时长
Verify=replace(trim(Request.form("Verify")),"'","''") //验证码
//此处加上提交的验证,如xxx不能为空等或字段长度等
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号错误!');history.back();</script>")
Response.end
else
if rs("password")<>md5(Password) then
Response.Write ("<script>alert('提示!\n\n用户密码错误!');history.back();</script>")
Response.end
else
if rs("secques")<>Answer then
Response.Write ("<script>alert('提示!\n\n安全答案错误!');history.back();</script>")
Response.end
else
Dim DES,DESCode
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Encode(""&rs("password")"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = Expires
if Expires<>0 then
Response.Cookies("dnt").Expires = DateAdd("N", Expires, Now())
end if
Response.Cookies("dnt").Domain = ".xxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
end if
end if
end if
rs.close
set rs=nothing
//此处加登陆后转向或向其他操作,具体你自己看着办
%>
===========================================================================================
注册页面代码(注册完后同时登陆状态)
<!--#include file="md5.asp"--> //32为md5加密文件,一定得调用,该文件到处有,我就不提供了
<%
dim Username,Password,CheckPassword,Email,Question,Answer,Verify
Username=replace(trim(Request.form("Username")),"'","''") //用户名
Password=replace(trim(Request.form("Password")),"'","''") //用户密码
CheckPassword=replace(trim(Request.form("CheckPassword")),"'","''") //密码验证
Question=replace(trim(Request.form("Question")),"'","''") //密码问题
Answer=replace(trim(Request.form("Answer")),"'","''") //密码答案
Expires=replace(trim(Request.form("Expires")),"'","''") //cookies记录时长
Verify=replace(trim(Request.form("Verify")),"'","''") //验证码
//此处加上提交的验证,如xxx不能为空等或字段长度等
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if not rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号已被注册使用!');history.back();</script>")
Response.end
end if
rs.close
set rs=nothing
sql="select * from [dnt_users] where Email='"&Email"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if not rs.eof then
Response.Write ("<script>alert('提示!\n\n电子邮箱已被注册使用!');history.back();</script>")
Response.end
end if
rs.close
set rs=nothing
ip = request.servervariables("http_x_forwarded_for")
if ip = "" then ip = request.servervariables("remote_addr")
sql="insert into [dnt_users] (username,nickname,password,secques,gender,adminid,groupid,groupexpiry,extgroupids,regip,joindate,lastip,lastvisit,lastactivity,lastpost,lastpostid,lastposttitle,posts,digestposts,oltime,pageviews,credits,extcredits1,extcredits2,extcredits3,extcredits4,extcredits5,extcredits6,extcredits7,extcredits8,avatarshowid,email,bday,sigstatus,tpp,ppp,templateid,pmsound,showemail,newsletter,invisible,newpm,newpmcount,accessmasks,onlinestate) values ('"&Username"',' ','"&MD5(Password)"','"&Answer"',0,0,10,0,' ','"&ip"','"&now()"','"&ip"','"&now()"','"&now()"','"&now()"',0,' ',0,0,0,0,0,'0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00',0,'"&Email"',' ',1,0,0,0,1,1,1,0,1,1,0,1)"
set rs=conn.execute(sql)
sql="select uid from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
Uid=rs(0)
sql="insert into [dnt_userfields] (uid,avatar,avatarwidth,avatarheight,authtime,authflag) values ('"&Uid"','avatars\common\0.gif',0,0,'"&now()"',0)"
set rs=conn.execute(sql)
sql="update [dnt_statistics] set totalusers=totalusers+1,lastusername='"&Username"',lastuserid='"&Uid"'"
set rs=conn.execute(sql)
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号错误!');history.back();</script>")
Response.end
else
if rs("password")<>md5(Password) then
Response.Write ("<script>alert('提示!\n\n用户密码错误!');history.back();</script>")
Response.end
else
Dim DES,DESCode
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Encode(""&rs("password")"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = 0
Response.Cookies("dnt").Domain = ".xxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
end if
end if
rs.close
set rs=nothing
//此处加注册后转向或向另外一个用户表添加同步用户数据,具体你自己看着办
%>
===========================================================================================
编辑页面代码(编辑密码后无需重新登陆)
<!--#include file="md5.asp"--> //32为md5加密文件,一定得调用,该文件到处有,我就不提供了
<%
dim Username,Password,CheckPassword,Email,Question,Answer,Verify
Username=replace(trim(Request.form("Username")),"'","''") //用户名
Password=replace(trim(Request.form("Password")),"'","''") //用户密码
CheckPassword=replace(trim(Request.form("CheckPassword")),"'","''") //密码验证
Question=replace(trim(Request.form("Question")),"'","''") //密码问题
Answer=replace(trim(Request.form("Answer")),"'","''") //密码答案
Expires=replace(trim(Request.form("Expires")),"'","''") //cookies记录时长
Verify=replace(trim(Request.form("Verify")),"'","''") //验证码
//此处加上提交的验证,如xxx不能为空等或字段长度等
if Password<>"" then
if Password<>CheckPassword then
Response.Write ("<script>alert('提示!\n\n验证密码与用户密码不相同!');history.back();</script>")
Response.end
end if
Password=MD5(Password)
else
Password=U_Password //U_Password为你的32位MD5加密密码,在验证时读取出来用来这里验证
end if
if AnswerTrue="true" then
if Question<>0 then
Answer=mid(MD5(Answer+MD5(Question)),16,8)
else
Answer=" "
end if
else
Answer=U_Secques //U_Secques为你的密码答案,在验证时读取出来用来这里验证
end if
ip = request.servervariables("http_x_forwarded_for")
if ip = "" then ip = request.servervariables("remote_addr")
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=Conn.execute(Sql)
If Rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号错误!');history.back();</script>")
Response.end
else
sql="select * from [dnt_users] where email='"&Email"' and username<>'"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if not rs.eof then
response.write ("<script>alert('友情提示!\n\n邮箱已被使用!');history.back();</script>")
response.end
else
sql="update [dnt_users] set password='"&Password"',secques='"&Answer"',email='"&Email"' where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Encode(""&Password"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = 0
Response.Cookies("dnt").Domain = ".xxxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
end if
end if
rs.close
set rs=nothing
//此处加编辑后转向或向另外一个用户表添加同步用户数据,具体你自己看着办
%>
=============================================================================================
退出验证cookies页面代码
<%
Response.Cookies("dnt")("userid") = ""
Response.Cookies("dnt")("password") = ""
Response.Cookies("dnt")("tpp") = ""
Response.Cookies("dnt")("ppp") = ""
Response.Cookies("dnt")("pmsound") = ""
Response.Cookies("dnt")("invisible") = ""
Response.Cookies("dnt")("referer") = ""
Response.Cookies("dnt")("sigstatus") = ""
Response.Cookies("dnt")("expires") = ""
Response.Cookies("dnt").Expires = ""
Response.Cookies("dnt").Domain = ".xxx.com"
Response.Cookies("dnt").Secure = False
Response.Write ("<script>alert('提示!\n\n用户注销登陆完毕!');self.opener.location.reload();window.close();</script>")
Response.end
%>
==============================================================================================
验证cookies页面代码,这是我为了简单随手写的一段验证代码,基本都是大同小异,具体你根据你的asp程序验证文件来修改
%>
Dim DES,DESCode
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Decode(""&request.cookies("dnt")("password")"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
//下面是读取数据库来验证你的cookies是否正确
dim U_UId,U_UserName,U_Password,U_Secques,U_Email
Sql="select uid,username,password,secques,email from [dnt_users] where uid='"&request.cookies("dnt")("userid")"' and password='"&DESCode"'" //为了方便,cookies用户和密码我就不加过滤函数了,如你使用时一定加上,否则被注入,就过滤些单引号及一些比较敏感的就可以了
Set Rs=Conn.execute(Sql)
if not rs.eof then
founduser = true
U_UId = Rs(0)
U_UserName = Rs(1)
U_Password = Rs(2)
U_Secques = Rs(3)
U_Email = Rs(4)
else
founduser = false
end if
rs.close
set rs=nothing
%>
登陆时记录cookies页面代码
<!--#include file="md5.asp"--> //32位md5加密文件,一定得调用,该文件到处有,我就不提供了
<%
dim Username,Password,Question,Answer,Expires,Verify
Username=replace(trim(Request.form("Username")),"'","''") //用户名
Password=replace(trim(Request.form("Password")),"'","''") //用户密码
Question=replace(trim(Request.form("Question")),"'","''") //密码问题
Answer=replace(trim(Request.form("Answer")),"'","''") //密码答案
Expires=replace(trim(Request.form("Expires")),"'","''") //cookies记录时长
Verify=replace(trim(Request.form("Verify")),"'","''") //验证码
//此处加上提交的验证,如xxx不能为空等或字段长度等
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号错误!');history.back();</script>")
Response.end
else
if rs("password")<>md5(Password) then
Response.Write ("<script>alert('提示!\n\n用户密码错误!');history.back();</script>")
Response.end
else
if rs("secques")<>Answer then
Response.Write ("<script>alert('提示!\n\n安全答案错误!');history.back();</script>")
Response.end
else
Dim DES,DESCode
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Encode(""&rs("password")"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = Expires
if Expires<>0 then
Response.Cookies("dnt").Expires = DateAdd("N", Expires, Now())
end if
Response.Cookies("dnt").Domain = ".xxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
end if
end if
end if
rs.close
set rs=nothing
//此处加登陆后转向或向其他操作,具体你自己看着办
%>
===========================================================================================
注册页面代码(注册完后同时登陆状态)
<!--#include file="md5.asp"--> //32为md5加密文件,一定得调用,该文件到处有,我就不提供了
<%
dim Username,Password,CheckPassword,Email,Question,Answer,Verify
Username=replace(trim(Request.form("Username")),"'","''") //用户名
Password=replace(trim(Request.form("Password")),"'","''") //用户密码
CheckPassword=replace(trim(Request.form("CheckPassword")),"'","''") //密码验证
Question=replace(trim(Request.form("Question")),"'","''") //密码问题
Answer=replace(trim(Request.form("Answer")),"'","''") //密码答案
Expires=replace(trim(Request.form("Expires")),"'","''") //cookies记录时长
Verify=replace(trim(Request.form("Verify")),"'","''") //验证码
//此处加上提交的验证,如xxx不能为空等或字段长度等
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if not rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号已被注册使用!');history.back();</script>")
Response.end
end if
rs.close
set rs=nothing
sql="select * from [dnt_users] where Email='"&Email"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if not rs.eof then
Response.Write ("<script>alert('提示!\n\n电子邮箱已被注册使用!');history.back();</script>")
Response.end
end if
rs.close
set rs=nothing
ip = request.servervariables("http_x_forwarded_for")
if ip = "" then ip = request.servervariables("remote_addr")
sql="insert into [dnt_users] (username,nickname,password,secques,gender,adminid,groupid,groupexpiry,extgroupids,regip,joindate,lastip,lastvisit,lastactivity,lastpost,lastpostid,lastposttitle,posts,digestposts,oltime,pageviews,credits,extcredits1,extcredits2,extcredits3,extcredits4,extcredits5,extcredits6,extcredits7,extcredits8,avatarshowid,email,bday,sigstatus,tpp,ppp,templateid,pmsound,showemail,newsletter,invisible,newpm,newpmcount,accessmasks,onlinestate) values ('"&Username"',' ','"&MD5(Password)"','"&Answer"',0,0,10,0,' ','"&ip"','"&now()"','"&ip"','"&now()"','"&now()"','"&now()"',0,' ',0,0,0,0,0,'0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00',0,'"&Email"',' ',1,0,0,0,1,1,1,0,1,1,0,1)"
set rs=conn.execute(sql)
sql="select uid from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
Uid=rs(0)
sql="insert into [dnt_userfields] (uid,avatar,avatarwidth,avatarheight,authtime,authflag) values ('"&Uid"','avatars\common\0.gif',0,0,'"&now()"',0)"
set rs=conn.execute(sql)
sql="update [dnt_statistics] set totalusers=totalusers+1,lastusername='"&Username"',lastuserid='"&Uid"'"
set rs=conn.execute(sql)
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号错误!');history.back();</script>")
Response.end
else
if rs("password")<>md5(Password) then
Response.Write ("<script>alert('提示!\n\n用户密码错误!');history.back();</script>")
Response.end
else
Dim DES,DESCode
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Encode(""&rs("password")"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = 0
Response.Cookies("dnt").Domain = ".xxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
end if
end if
rs.close
set rs=nothing
//此处加注册后转向或向另外一个用户表添加同步用户数据,具体你自己看着办
%>
===========================================================================================
编辑页面代码(编辑密码后无需重新登陆)
<!--#include file="md5.asp"--> //32为md5加密文件,一定得调用,该文件到处有,我就不提供了
<%
dim Username,Password,CheckPassword,Email,Question,Answer,Verify
Username=replace(trim(Request.form("Username")),"'","''") //用户名
Password=replace(trim(Request.form("Password")),"'","''") //用户密码
CheckPassword=replace(trim(Request.form("CheckPassword")),"'","''") //密码验证
Question=replace(trim(Request.form("Question")),"'","''") //密码问题
Answer=replace(trim(Request.form("Answer")),"'","''") //密码答案
Expires=replace(trim(Request.form("Expires")),"'","''") //cookies记录时长
Verify=replace(trim(Request.form("Verify")),"'","''") //验证码
//此处加上提交的验证,如xxx不能为空等或字段长度等
if Password<>"" then
if Password<>CheckPassword then
Response.Write ("<script>alert('提示!\n\n验证密码与用户密码不相同!');history.back();</script>")
Response.end
end if
Password=MD5(Password)
else
Password=U_Password //U_Password为你的32位MD5加密密码,在验证时读取出来用来这里验证
end if
if AnswerTrue="true" then
if Question<>0 then
Answer=mid(MD5(Answer+MD5(Question)),16,8)
else
Answer=" "
end if
else
Answer=U_Secques //U_Secques为你的密码答案,在验证时读取出来用来这里验证
end if
ip = request.servervariables("http_x_forwarded_for")
if ip = "" then ip = request.servervariables("remote_addr")
sql="select * from [dnt_users] where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=Conn.execute(Sql)
If Rs.eof then
Response.Write ("<script>alert('提示!\n\n用户帐号错误!');history.back();</script>")
Response.end
else
sql="select * from [dnt_users] where email='"&Email"' and username<>'"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
if not rs.eof then
response.write ("<script>alert('友情提示!\n\n邮箱已被使用!');history.back();</script>")
response.end
else
sql="update [dnt_users] set password='"&Password"',secques='"&Answer"',email='"&Email"' where username='"&Username"'" //为了方便,此处我就不加过滤函数了,如你使用时一定加上,否则被注入
set rs=conn.execute(sql)
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Encode(""&Password"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = 0
Response.Cookies("dnt").Domain = ".xxxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
end if
end if
rs.close
set rs=nothing
//此处加编辑后转向或向另外一个用户表添加同步用户数据,具体你自己看着办
%>
=============================================================================================
退出验证cookies页面代码
<%
Response.Cookies("dnt")("userid") = ""
Response.Cookies("dnt")("password") = ""
Response.Cookies("dnt")("tpp") = ""
Response.Cookies("dnt")("ppp") = ""
Response.Cookies("dnt")("pmsound") = ""
Response.Cookies("dnt")("invisible") = ""
Response.Cookies("dnt")("referer") = ""
Response.Cookies("dnt")("sigstatus") = ""
Response.Cookies("dnt")("expires") = ""
Response.Cookies("dnt").Expires = ""
Response.Cookies("dnt").Domain = ".xxx.com"
Response.Cookies("dnt").Secure = False
Response.Write ("<script>alert('提示!\n\n用户注销登陆完毕!');self.opener.location.reload();window.close();</script>")
Response.end
%>
==============================================================================================
验证cookies页面代码,这是我为了简单随手写的一段验证代码,基本都是大同小异,具体你根据你的asp程序验证文件来修改
%>
Dim DES,DESCode
Set DES=Server.CreateObject("DiscuzNT.DES")
DESCode=DES.Decode(""&request.cookies("dnt")("password")"","Z143D2VBML") //Z143D2VBML为你的DES加密密钥,请用记事本打开CONFIG目录里的general.config文件,找到<Passwordkey>Z846D4VVZL</Passwordkey>这行,<Passwordkey>与</Passwordkey>中间的英文就是你的密钥,把密钥修改成你的文件的
Set DES=Nothing
//下面是读取数据库来验证你的cookies是否正确
dim U_UId,U_UserName,U_Password,U_Secques,U_Email
Sql="select uid,username,password,secques,email from [dnt_users] where uid='"&request.cookies("dnt")("userid")"' and password='"&DESCode"'" //为了方便,cookies用户和密码我就不加过滤函数了,如你使用时一定加上,否则被注入,就过滤些单引号及一些比较敏感的就可以了
Set Rs=Conn.execute(Sql)
if not rs.eof then
founduser = true
U_UId = Rs(0)
U_UserName = Rs(1)
U_Password = Rs(2)
U_Secques = Rs(3)
U_Email = Rs(4)
else
founduser = false
end if
rs.close
set rs=nothing
%>
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月24日
2024年11月24日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]