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

来源:互联网 发布:淘宝新锐卖家入驻 编辑:程序博客网 时间:2024/06/03 15:08
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

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

<%@ Page language="vb"%>
<script runat="server">
dim heike(2) as string
dim i as integer
'定义黑客代码
public Sub heikeword(a as string)
heike(0)="1234"
heike(1)="125"
dim re as System.Text.RegularExpressions.Regex

for i=0 to 1
re=new System.Text.RegularExpressions.Regex(heike(i))
if(re.Match(a).Success)
response.write (heike(i)+"  ")
response.write ("success")
end if
next
end sub
</script>
<%

dim a as string="1234345"  '就是要检测的内容
heikeword(a)
%>
转自:动态网制作指南 www.knowsky.com<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击