Discuz!NT 포럼 통합 ASP 프로그램 포럼 강좌
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(' !
!');history.back();</script>")
Response.end
else
if rs("password")<>md5(Password) then
Response.Write ("<script>alert(' !
!');history.back();</script>")
Response.end
else
if rs("secques")<>Answer then
Response.Write ("<script>alert(' !
!');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(' !
!');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(' !
!');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(' !
!');history.back();</script>")
Response.end
else
if rs("password")<>md5(Password) then
Response.Write ("<script>alert(' !
!');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(' !
!');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(' !
!');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(' !
!');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(' !
!');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
%>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Discuz!NT 포럼 통합 ASP 프로그램 포럼텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.