论坛: 网站建设 标题: 这些代码是什么意思 复制本贴地址    
作者: eidos [eidos]    论坛用户   登录
本帖由 [日月双星] 从 << 菜鸟乐园>> 转移而来

<!--#include file="articleconn.asp"-->
<%
dim rs
dim sql
userid=replace(trim(request("userid")),"'","")
password=replace(trim(Request("password")),"'","")

sql="select * from users where userid='"&userid&"'and password='"&password&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
if request.cookies("userid")<>"" or request.cookies("password")<>"" then
response.cookies("okerer")="yesok"
else
   
    sql="update users set nos=nos+1,logintime=now()+1 where id="&rs("ID")
    conn.Execute(sql)
    okgo=date()+1
    response.cookies("userid")=""
    response.cookies("password")=""
    response.cookies("userid")=rs("userid")
    response.cookies("password")=rs("password")
    response.cookies("okerer")="yesok"
    response.cookies("userid").expires=okgo
    response.cookies("password").expires=okgo 
end if
   
else
  response.write"<script>alert('用户名或密码错误,不接受!');history.back();</Script>"
  response.end
end if
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
  response.redirect Request.ServerVariables("HTTP_REFERER")
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
</head>

<body>

</body>

</html>


地主 发表时间: 04-08-10 10:59

回复: Liven [liven]   论坛用户   登录
一段登陆用的HTNL代码,好象还要用到SQL数据库!

B1层 发表时间: 04-08-10 15:45

回复: qiezic [qiezic]      登录
就这些代码是看不出来用什么数据库的!

B2层 发表时间: 04-08-10 16:48

回复: wlbyyh [wlbyyh]   论坛用户   登录
用这样的判断语句不是有漏洞吗?
哪个站的啊?

B3层 发表时间: 04-08-12 10:11

回复: lqfrla [lqfrla]   论坛用户   登录
登陆机制也太简单了

B4层 发表时间: 04-08-12 10:32

回复: pwycctv [pwycctv]   论坛用户   登录
有articleconn.asp这个文件的代码吗?

B5层 发表时间: 04-08-13 09:38

论坛: 网站建设

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号