龙岩易富通网络科技有限公司

龙岩小程序开发,龙岩分销系统

ASP防注入漏洞方法

2015.09.10 | 32阅读 | 0条评论 | 未命名

[php] <% dim sql_leach,sql_leach_0,Sql_DATA,SQL_Get,Sql_Post sql_leach = "',and,exec,insert,select,delete,update,count,*,%,chr,mid,master,truncate,char,declare" sql_leach_0 = split(sql_leach,",") If Request.QueryString<>"" Then For Each SQL_Get In Request.QueryString For SQL_Data=0 To Ubound(sql_leach_0) if instr(Request.QueryString(SQL_Get),sql_leach_0(Sql_DATA))>0 Then Response.Write "请不要尝试进行SQL注入!" 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_leach_0) if instr(Request.Form(Sql_Post),sql_leach_0(Sql_DATA))>0 Then Response.Write "请不要尝试进行SQL注入!" Response.end end if next next end if %> [/php] 防止暴库的办法,在数据库文件前面加上On Error Resume Next [php] <% On Error Resume Next dim conn,connstr,db %> [/php] 本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/wjq3714/archive/2009/05/17/4195793.aspx

赞 (

发表评论