如何进行有效的防守 黑客SQL ASP 入侵防守 高手进···给分

来源:百度知道 编辑:UC知道 时间:2024/06/27 16:25:22
如何进行有效的防守 黑客SQL ASP 入侵防守 高手进···一句话··如何有效防守···
还有怎么样有效防止 SQL后台入侵···有满意答案 加分
请给出你们的代码或方法的详细操作

把这段代码包含在你的每一个页面里~`比如Conn.asp

<%
'过滤判断是是否受到SQL注入攻击
dim sql_injdata
SQL_injdata = "'|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.Redirect "<script>history.go(-1);</script>"
Response.end
end if
next
Next
End If
'Get请求的注入的拦截
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.Redirect "<script>history.go(-1);</script>"
Response.end
end if
next
next
end if
%>