asp下的风讯用的SQL通用防注入模块提供了
- 作者: 不知深浅不长不短
- 来源: 51数据库
- 2021-10-05
复制代码 代码如下:
<%
dim fs_nosqlhack_allstr,fs_nosqlhack_str,fs_nosqlhack_comeurlget,fs_nosqlhack_comeurlpost,fs_nosqlhack_get,fs_nosqlhack_post,fs_nosqlhack_i
'on error resume next
fs_nosqlhack_allstr="'|;| and |chr(|exec |insert |select |delete from|update |mid(|master."
fs_nosqlhack_comeurlget = request.querystring
fs_nosqlhack_comeurlpost = request.form
fs_nosqlhack_str = split(fs_nosqlhack_allstr,"|")
'post
if fs_nosqlhack_comeurlpost<>"" then
for each fs_nosqlhack_post in request.form
for fs_nosqlhack_i = 0 to ubound(fs_nosqlhack_str)
if instr(lcase(request.form(fs_nosqlhack_post)),fs_nosqlhack_str(fs_nosqlhack_i))<>0 then
response.write("error!!")
response.end
end if
next
next
end if
'get
if fs_nosqlhack_comeurlget<>"" then
for each fs_nosqlhack_get in request.querystring
for fs_nosqlhack_i = 0 to ubound(fs_nosqlhack_str)
if instr(lcase(request.querystring(fs_nosqlhack_get)),fs_nosqlhack_str(fs_nosqlhack_i))<>0 then
response.write("error!!")
response.end
end if
next
next
end if
%>
推荐阅读