ASP过滤SQL非法字符过滤SQL非法字符function ReSql(Str) const KillKey="execute|select|update|delete|insert||%20|;|,|=|==|CHR(32)|CHR(9)|CHR(34)|CHR(39)|CHR(13)|CHR(10)|*" 需要过滤得字符以“|”隔开,最后结束的字符必须是|
ASP过滤SQL非法字符
'过滤SQL非法字符
function ReSql(Str)
const KillKey="execute|select|update|delete|insert|'|%20|;|,|=|==|CHR(32)|CHR(9)|CHR(34)|CHR(39)|CHR(13)|CHR(10)|*" '需要过滤得字符以“|”隔开,最后结束的字符必须是|
KillWord=Split(KillKey,"|")
Word=LCase(Trim(Str))
For i=LBound(KillWord) To UBound(KillWord)
If Instr(Word,KillWord(i))>0 Then
Word=replace(Word,KillWord(i),"")
else
Word=Word
End If
Word=Word
Next
ReSql=Word
end function
原标题:ASP过滤SQL非法字符
关键词:ASP
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。