📄 qqcf_chkstr.asp
字号:
<%
'==================================
' 乘风多用户计数器v3.4 Mssql版
' 制 作:乘 风
' 网 站:http://www.qqcf.com
' 系统演示:http://www.qqcf.com/?action=try
' 最新版本下载:http://www.qqcf.com/?action=down
' 声 明:
' 本软件系免费程序,提供给个人免费使用,请保留版权使用。
' 付费版提供升级服务和技术支持。
' 未经作者许可禁止用于任何商业用途。
' 乘风其它作品:乘风多用户计数器Access版、乘风多用户记数器php版、乘风免费电影程序
' 乘风网站推广系统、乘风网址程序、乘风广告管理、系统乘风论坛等。
' 此段版权注释不会影响网页打开速度,请勿删除!
' 2005年12月5日
'===================================
%>
<%
'dim sql_injdata
SQL_injdata = "'|and|exec|insert|delete|update|chr|mid|from|"&_
"truncate|char|declare|object|script|applet|execute|join|"&_
"union|where|like|drop|create|rename|truncate|alter|nchar|alter|"&_
"cast|exists|xp_cmdshell"
'SQL_injdata = "'|""|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|xp_cmdshell|net user|/add|exec%20master.dbo.xp_cmdshell|net localgroup administrators|count|:|drop|from|--|(|)|chr"
SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Lcase(Request.QueryString(SQL_Get)),Sql_Inj(Sql_DATA))>0 Then
Response.Write "参数中包含非法字符"&Sql_Inj(Sql_DATA)
Response.end
end if
next
Next
End If
'这样我们就实现了get请求的注入的拦截,但是我们还要过滤post请求,所以我们还得继续考虑request.form,这个也是以数组形式存在的,,我们只需要再进一次循环判断即可。代码如下
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Lcase(Request.Form(Sql_Post)),Sql_Inj(Sql_DATA))>0 Then
Response.Write "参数中包含非法字符"&Sql_Inj(Sql_DATA)
Response.end
end if
next
next
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -