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

ASP
ASP页面随机添加字符实现防复制的代码
ASP中应用事务处理技巧
asp下比较全面的获取IP地址的代码
ASP实现缓存类无错版
asp下实现批量插入数据的方法
asp下用ADODB.Stream代替FSO读取文本文件
asp之基于adodb.stream的文件操作类
自己写的文件操作的function和Sub vb.net dll
kesion科讯V4.0管理员Key工具
asp 获取access系统表,查询等操作代码
asp之字符串函数示例
asp之日期和时间函数示例
ASP 关于动态数据显示页面得锚点
Asp无组件上传进度条解决方案
ASP控制每页打印行数
用ASP实现分级权限控制
ASP在服务器自动解压RAR文件
用ASP实现远程将文件批量改名的代码
在Asp程序中取得表单所有内容的代码
使用ASP实现网站的“目录树”管理的代码

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 36 ::
收藏到网摘: 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
%>