⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stopsqlin.asp

📁 雷客图ASP站长安全助手 功能: 1、ASP木马查找(能够查出现在几乎所有的ASP木马) 2、文件篡改检查 3、可疑文件搜索 4、Access数据库保护 5、记录入侵者信息
💻 ASP
字号:
 <%
'************** ASPSecurity SQL 防注入**************
' Copyright 2006
' Create:2006-4-06
' Update:2006-4-14
'***************************************************
	
If Request.Form<>"" Then StopInjection(Request.Form)

If Request.QueryString<>"" Then StopInjection(Request.QueryString)

If Request.Cookies<>"" Then StopInjection(Request.Cookies)
	
	
Function StopInjection(values)
	For Each N_Get In values
		Dim L_Get, L_Get2
		For Each L_Get In values
			L_Get2 = values(L_Get)
			Set regEx = New RegExp
			regEx.IgnoreCase = True
			regEx.Global = True
			regEx.Pattern = "(\bselect\b|\sand\s|'|;|\sdeclare\s)"
			If regEx.Test(L_Get2) Then
				Alert()
				response.End()
			End If
			Set regEx = Nothing
		Next
	Next
End Function 
	
	
Sub Alert()
	Dim str
	str = "<"&"Script Language=JavaScript"&">"
	str = str & "alert('== 雷客图ASP站长安全助手检测到了危险字符,已经禁止本次提交 ==\n');window.close();"
	str = str & "<"&"/Script"&">"
	response.write  str
End Sub

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -