打印

[asp] 怎样防止'or'='or'登陆网站后台

怎样防止'or'='or'登陆网站后台,急啊,在线等
你说呢?
姚明2.2高,你就做不出一扇不能让姚明过去的门?

你都已经写出了这个漏洞的特征了……随便过滤=或者单引号都可以呀。
汗。
乐于助人、严格管理、言多必失。无知者无罪。Keep your waiting,I am back.
编程资源:http://book.kuhanzhu.com
对管理有异议,请前往事务区进行投诉。请勿PM。
一个'替换成两个''
' => ''
在conn.asp中加入如下代码:
if request.querystring<>"" then  '如果用GET提交参数
for each formname in request.querystring
if instr("'or'='or'",request.querystring(formname))<>0 then '如果提交的参数中有过滤的字符
response.redirect "你的转向地址"
end if
next
end if
if request.form<>"" then  '如果用post提交参数
for each formname in request.form
if instr("'or'='or'",request.form(formname))<>0 then '如果提交的参数中有过滤的字符
response.redirect "你的转向地址"
end if
next
end if

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
存储过程就能防止SQL注入!!!

TOP