网络编程 
首页 > 网络编程 > 浏览文章

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

(编辑:jimmy 日期: 2024/9/22 浏览:3 次 )
复制代码 代码如下:
<%
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
%>

上一篇:asp生成三维饼图的函数
下一篇:ASP下的两个防止SQL注入式攻击的Function
一句话新闻
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap