您的位置:首页 > 编程语言 > ASP

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

2006-09-21 09:56 295 查看
<%@ 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)
%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: