zoukankan      html  css  js  c++  java
  • 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.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.End
       End if
      Next
     Next
    End if
  • 相关阅读:
    关于c语言的左移运算
    如何修改mac的root密码
    LaTeX语法笔记
    texlive测试是否安装成功
    latex学习(四)tlmgr
    latex学习(三)
    latex学习(二)
    Latex学习(一)
    引导修复软件boot-repair
    MySQL远程连接和备份还原
  • 原文地址:https://www.cnblogs.com/Davidisontheway/p/1440204.html
Copyright © 2011-2022 走看看