| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 413 人关注过本帖
标题:从哪里下载ASP安全教程 诸如防注入之类的?
只看楼主 加入收藏
feyyee
Rank: 1
等 级:新手上路
帖 子:76
专家分:0
注 册:2006-12-14
结帖率:100%
收藏
 问题点数:0 回复次数:4 
从哪里下载ASP安全教程 诸如防注入之类的?
从哪里下载ASP安全教程 诸如防注入之类的?
搜索更多相关主题的帖子: 教程 ASP 
2007-06-23 22:27
恒天
Rank: 1
等 级:新手上路
威 望:2
帖 子:165
专家分:0
注 册:2007-6-1
收藏
得分:0 
dim qs,errc,iii
qs=request.servervariables("query_string")
dim deStr(18)
deStr(0)="net user"
deStr(1)="xp_cmdshell"
deStr(2)="/add"
deStr(3)="exec%20master.dbo.xp_cmdshell"
deStr(4)="net localgroup administrators"
deStr(5)="select"
deStr(6)="count"
deStr(7)="asc"
deStr(8)="char"
deStr(9)="mid"
deStr(10)="'"
deStr(11)=":"
deStr(12)=""""
deStr(13)="insert"
deStr(14)="delete"
deStr(15)="drop"
deStr(16)="truncate"
deStr(17)="from"
deStr(18)="%"
errc=false
for iii= 0 to ubound(deStr)
if instr(qs,deStr(iii))<>0 then
errc=true
end if
next
if errc then
Response.Write("对不起,非法URL地址请求!")
response.end
end if

放在连接文件的上面
2007-06-24 12:58
谁与争疯
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:海南省
等 级:版主
威 望:191
帖 子:15071
专家分:17513
注 册:2007-4-22
收藏
得分:0 
过滤掉相应的字符和关键字,方法可以用replace等。

字符和关键字自己找了。

论坛是我家灌水靠大家
2007-06-24 13:06
放任一切
Rank: 2
等 级:新手上路
威 望:4
帖 子:217
专家分:0
注 册:2007-3-22
收藏
得分:0 

<%
''过滤提交表单中的SQL

''==========================

function ForSqlForm(form_title)

dim fqys,errc,i,items

dim nothis(18)

nothis(0)="net user"

nothis(1)="xp_cmdshell"

nothis(2)="/add"

nothis(3)="exec%20master.dbo.xp_cmdshell"

nothis(4)="net localgroup administrators"

nothis(5)="select"

nothis(6)="count"

nothis(7)="asc"

nothis(8)="char"

nothis(9)="mid"

nothis(10)="''"

nothis(11)="iframe"

nothis(12)=""""

nothis(13)="insert"

nothis(14)="delete"

nothis(15)="drop"

nothis(16)="truncate"

nothis(17)="from"

nothis(18)="%"

''nothis(19)="@"

errc=false

for i= 0 to ubound(nothis)

for each items in request.Form

if instr(form_title,nothis(i))<>0 then

response.write("<div class='menu'>")

response.write("你所填写的信息:" & server.HTMLEncode(request.Form(items)) & "<br>含非法字符:" & nothis(i))

response.write("</div>")

response.write("对不起,你所填写的信息含非法字符!<a href=""#"" onclick=""history.back()"">返回</a>")

response.End()

end if

next

next

end function

''==========================
%>
还可以自己加

2007-06-24 15:22
学前班
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-6-9
收藏
得分:0 
我也想要啊
2007-06-25 17:55
快速回复:从哪里下载ASP安全教程 诸如防注入之类的?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013026 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved