zoukankan      html  css  js  c++  java
  • asp中防止脚本注入攻击

    <%
      SQL_injdata 
    = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
      SQL_inj 
    = split(SQL_Injdata,"|")

      
    If Request.QueryString<>"" Then
        
    For Each SQL_Get In Request.QueryString
          
    For SQL_Data=0 To Ubound(SQL_inj)
            
    if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
              Response.Write 
    "<script Language=JavaScript>alert('非法连接!!')</script>"
              Response.end
            
    end if
          
    next
        
    Next
      
    End If

      
    If Request.Form<>"" Then
        
    For Each Sql_Post In Request.Form
          
    For SQL_Data=0 To Ubound(SQL_inj)
            
    if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
              Response.Write 
    "<script Language=JavaScript>alert('非法连接!!')</script>"
        Response.end
            
    end if
          
    next
        
    next
      
    end if
    %>

    申明

    非源创博文中的内容均收集自网上,若有侵权之处,请及时联络,我会在第一时间内删除.再次说声抱歉!!!

    博文欢迎转载,但请给出原文连接。

  • 相关阅读:
    2019 牛客多校第五场 B generator 1
    POJ 1797 Heavy Transportation
    POJ 3352 Road Construction
    POJ 2553 The Bottom of a Graph
    POJ 1236 Network of Schools
    POJ 1144 Network
    POJ 3761 Bubble Sort
    2019 牛客多校第三场 B Crazy Binary String
    2019 牛客多校第三场 H Magic Line
    Codeforces Round #592 (Div. 2)
  • 原文地址:https://www.cnblogs.com/Athrun/p/1126267.html
Copyright © 2011-2022 走看看