sql_in.asp
来自「日记本(多用户版)V3.0 主要功能: 1、日记本基本功能:添加、修改日记等。」· ASP 代码 · 共 36 行
ASP
36 行
<%
'--------定义部份------------------
Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh
'自定义需要过滤的字串,用 "|" 分隔
Fy_In = "'|;|1=1|1=2|''=| and |(|)|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
Kill_IP=True
WriteSql=True
'----------------------------------
Fy_Inf = split(Fy_In,"|")
'--------POST部份------------------
If Request.Form<>"" Then
For Each Fy_Post In Request.Form
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('随然日记本防注入系统提示你↓\n\n请不要在参数中包含非法字符尝试注入!\n\n注册日记本时,请不要使用含有SQL语句的用户名!');</Script>"
Response.End
End If
Next
Next
End If
'----------------------------------
'--------GET部份-------------------
If Request.QueryString<>"" Then
For Each Fy_Get In Request.QueryString
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.QueryString(Fy_Get)),Fy_Inf(Fy_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('随然日记本防注入系统提示你↓\n\n请不要在参数中包含非法字符尝试注入!\n\n注册日记本时,请不要使用含有SQL语句的用户名!');</Script>"
Response.End
End If
Next
Next
End If
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?