<%
'--------定义部份------------------
Dim XH_Post,XH_Get,XH_In,XH_Inf,XH_Xh,XH_db,XH_dbstr
'自定义需要过滤的字串,用 "|" 分隔
XH_In = FilterKeyWord'"'|激情|MM|sex|Sex|SEX|投资|色情|诱惑|电影|视频|周鹤|孟胜|少妇|初夜|广告|房地产|自拍|盛大|传奇|私服|奇迹|密宝|登陆器|成人用品|香港六合彩|景华图文|高艳芳|邵树兵|翻译公司|上海公司注册|公司注册|注册公司|酒店锁|感应自动门|控制系统|测名|免费手机铃声|tshirt|中华世纪网|cn@c361.com"
'----------------------------------
%>

<%
XH_Inf = split(XH_In,"|")
'--------POST部份------------------
If Request.Form<>"" Then
For Each XH_Post In Request.Form

For XH_Xh=0 To Ubound(XH_Inf)
If Instr(LCase(Request.Form(XH_Post)),XH_Inf(XH_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('请不要在参数中包含非法字符尝试注入！');</Script>"
Response.Write "非法操作！系统做了如下记录↓<br>"
Response.Write "操作IP："&Request.ServerVariables("REMOTE_ADDR")&"<br>"
Response.Write "操作时间："&Now&"<br>"
Response.Write "提交数据："&Request.Form(XH_Post)
Response.Write "<br><a href='guest.asp'>发表留言</a>&nbsp;&nbsp;<a href='index.asp'>查看留言</a>"
Response.End
End If
Next

Next
End If
'----------------------------------

'--------GET部份-------------------
If Request.QueryString<>"" Then
For Each XH_Get In Request.QueryString

For XH_Xh=0 To Ubound(XH_Inf)
If Instr(LCase(Request.QueryString(XH_Get)),XH_Inf(XH_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('请不要在参数中包含非法字符尝试注入！');</Script>"
Response.Write "非法操作！系统做了如下记录↓<br>"
Response.Write "操作IP："&Request.ServerVariables("REMOTE_ADDR")&"<br>"
Response.Write "操作时间："&Now&"<br>"
Response.Write "提交数据："&Request.QueryString(XH_Get)
Response.Write "<br><a href='guest.asp'>发表留言</a>&nbsp;&nbsp;<a href='index.asp'>查看留言</a>"
Response.End
End If
Next
Next
End If
'----------------------------------
%>