过滤所有不健康不合法的文字和字符(ASP函数)
作者:飘逸online 日期:2008-11-10
今天接到网警的电话~说网站中含有网络信息安全过滤词,要求把这些过滤词都限定~
就按word里的文字,写了一个过滤函数,在所有提交的页面都做了过滤~
程序代码Function ie521(a)
checkstr=request(a)
'网络信息安全过滤词
siftwords="过滤词一|过滤词二|过滤词三|过滤词四|过滤词五"
sift_word=split(siftwords,"|")
sift_num=ubound(sift_word)
for i=0 to sift_num
if InStr(checkstr,sift_word(i))>0 then
response.Write "<script>alert('对不起,含有网络信息安全过滤词:"& sift_word(i) &"');history.back();</script>"
response.End()
exit for
end if
next
end function
把页面中的request和request.form和QueryString替换成ie521就可以了~
评论: 0 | 引用: 0 | 查看次数: -
发表评论
上一篇
下一篇

文章来自:
Tags: