[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。
发表人 主题:老大,问个问题
清水鱼儿
身份:user
发帖:45
登陆次数:43
1F 发表于 2006/12/23 9:06:59
我用别人的代码,可是这页用啊D可以算出帐号和密码出来!
问你下要怎么改才可以防注入,先谢过了!

<!--#include file="Inc/conn.asp"-->
<%dim id
id=request.QueryString("id")%>
<html>
<head>
<title>图片</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from CompHonor where id="&id,conn,1,1
%>
<%if trim(rs("CompHonor"))<>"" then
      response.write "<div align=''center''><img src="&trim(rs("CompHonor"))&" border=0 ></div>"
else
      response.Write "<img src=img/nopic.jpg width=65 height=96 alt=暂时没有图片!>"
end if%>
<div align="center"><BR>
  <%=trim(rs("explain"))%><BR>
</div>
<%
rs.close
set rs=nothing
%>
</body>
</html>


嘎嘎,是我
身份:admin
发帖:1435
登陆次数:3225
2F 发表于 2006/12/23 13:23:09
<%dim id
id=request.QueryString("id")
if id="" or NOT IsNumeric(id) then
    response.write "error"
    response.end
end if

%>

清水鱼儿
身份:user
发帖:45
登陆次数:43
3F 发表于 2006/12/24 13:06:20
谢谢!呵呵!

 
标题:
消息图标:                                             
                                            
正文:



* UBB 代码开启

 
CopyRight © 心缘地方 2005-2999. All Rights Reserved