他有个检测函数放在check.inc中//

看看吧:“

sub check()
Fy_Url=Request.ServerVariables("QUERY_STRING")
Fy_a=split(Fy_Url,"&")
redim Fy_Cs(ubound(Fy_a))
On Error Resume Next
for Fy_x=0 to ubound(Fy_a)
Fy_Cs(Fy_x) = left(Fy_a(Fy_x),instr(Fy_a(Fy_x),"=")-1)
Next
For Fy_x=0 to ubound(Fy_Cs)
If Fy_Cs(Fy_x)<>"" Then
If Instr(LCase(Request(Fy_Cs(Fy_x))),"'")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"and")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"select")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"union")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"from")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x)))," ")<>0 Then
response.Write("嘿嘿,不要你注射!屏蔽了关键字,但是这个屏蔽程序却不好——如何突破呢?")
Response.End
End If
End If
Next
end sub

粗略一看,过滤的很好。所以白天试了很久都不能成功,所以后来乖乖的和老师做论文去了。。。(痛苦)

晚上仔细的研究了一下,发现有点突破:

关键是这一句:

Fy_Url=Request.ServerVariables("QUERY_STRING")

通过servervalue/Fy_Cs(Fy_x)来判断的!

恩,有点问题,假如Fy_Url不符合呢?后面的过滤不就是枉然吗?

通过这个思路”我仔细的提交了下面的代码:

http://www.cnnb.net.cn/lake2/Challenge/challenge.asp?%69d=1%20and%201=1

终于是成功了!

posted on 2007-07-20 17:56  %5C  阅读(209)  评论(0编辑  收藏  举报