当前位置: 首页 > 图文教程 > 网络编程 > ASP > asp下的风讯用的SQL通用防注入模块提供了

ASP
飞云写的防CC攻击的ASP程序插件 打包下载
随机调用n条数据的方法分析
一个强健 实用的asp+ajax二级联动菜单(有演示和附源程序打包下载)
asp 读取 utf-8格式文档并生成utf-8格式文档的乱码问题
实现纯真IP txt转mdb数据库的方法
用实现ASP批量删除目录及文件的代码
[ASP]RegExp对象提供简单的正则表达式支持功能使用说明
用ASP生成UTF-8网页文件的两种方法
asp利用fso给文件夹和文件改名的代码
asp 采集实战代码
解决采集时出现msxml3.dll 错误的方法
asp实现二进制字符串转换为Unicode字符串
asp 用InStr查找特定字符串的代码
[推荐]ASP编程通用函数收藏大全
去除HTML代码中所有标签的两种方法
asp Chr 函数 数字转字母的方法
asp快速开发方法之数据操作实例代码
asp去除所有的超级链接的两种方法 替换与正则
asp下实现截取字符串特定部分内容函数
asp下取得客户端IP地址函数 转换IP地址函数

ASP 中的 asp下的风讯用的SQL通用防注入模块提供了


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 40 ::
收藏到网摘: n/a

复制代码 代码如下:

<%
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
%>