28,391
社区成员
发帖
与我相关
我的任务
分享
Sub CloseConn()
conn.close()
set conn=nothing
end sub
if request("repl")<>"off" then
Call ChkData()
end if
sub ChkData()
'--------定义部份------------------
Dim XH_Post,XH_Get,XH_In,XH_Inf,XH_Xh,XH_db,XH_dbstr
'自定义需要过滤的字串,用 "|" 分隔
XH_In = "'|;|exec|insert|select|delete%20from|update|count|*|%|chr|mid|master|truncate|char|declare|drop%20table|from|net%20user|xp_cmdshell|/add|net%20localgroup%20administrators|Asc|char"
'----------------------------------
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
PMsg = "处理数据时发生错误!<br />数据类型不匹配!"
Call PopMsg("数据类型")
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
PMsg = "处理数据时发生错误!<br />数据类型不匹配!"
Call PopMsg("数据类型")
End if
Next
Next
End if
'----------------------------------
end sub