你的位置:首页 > 软件开发 > 数据库 > asp风讯用的SQL通用防注入模块

asp风讯用的SQL通用防注入模块

发布时间:2008-05-28 18:40:00
asp 风讯用的SQL通用防注入模块复制代码 <%Dim FS_NoSqlHack_AllStr,FS_NoSqlHack_Str,FS_NoSqlHack_ComeUrlGet,FS_NoSqlHack_ComeUrlPost,FS_NoSqlHack_Get,FS_NoSqlHack_Post,FS_NoSqlHack_iOn Error Resume NextFS_NoSqlHack
 

asp 风讯用的SQL通用防注入模块

复制代码

<%
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风讯用的SQL通用防注入模块

关键词:ASP

ASP
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。