检测是否还有黑客代码的asp.net函数

查询是否还有黑客代码的asp.net函数,非常适合留言簿、bbs、聊天室

1@ Page language="vb"
 1<script runat="server">   
 2dim heike(2) as string   
 3dim i as integer   
 4'定义黑客代码   
 5public Sub heikeword(a as string)   
 6heike(0)="1234"   
 7heike(1)="125"   
 8dim re as System.Text.RegularExpressions.Regex   
 9  
10for i=0 to 1   
11re=new System.Text.RegularExpressions.Regex(heike(i))   
12if(re.Match(a).Success)   
13response.write (heike(i)+" ")   
14response.write ("success")   
15end if   
16next   
17end sub   
18</script>
1 
2
3dim a as string="1234345" '就是要检测的内容   
4heikeword(a)   
Published At
Categories with Web编程
Tagged with
comments powered by Disqus