以后地位:首页 > 建站常识 > 列表

ASP网站防注入函数

点击: 次时候:2016/12/7关头词:上海网页建造 asp 防注入
Response.Buffer = TrueConst EnableStopInjection = TrueIf EnableStopInjection = True ThenIf Request.QueryString <> "" Then C

ASP网站防注入函数

Response.Buffer = TrueConst EnableStopInjection = TrueIf EnableStopInjection = True ThenIf Request.QueryString <> "" Then Call StopInjection(Request.QueryString)If Request.Cookies <> "" Then Call StopInjection(Request.Cookies)If Request.Form <> "" Then Call StopInjection(Request.Form)End IfSub StopInjection(Values)Dim regExSet regEx = New RegExpregEx.IgnoreCase = TrueregEx.Global = TrueregEx.Pattern = "'|;|#|([\s\b+()]+(select|update|insert|delete|declare|@|exec|dbcc|alter|drop|create|backup|if|else|end|and|or|add|set|open|close|use|begin|retun|as|go|exists)[\s\b+]*)"Dim sItem, sValueFor Each sItem In ValuessValue = Values(sItem)If regEx.Test(sValue) ThenResponse.Write "请不要利用敏感字符 3djiangyin.com"Response.EndEnd IfNextSet regEx = NothingEnd Sub
预定建站
收费供给网站优化
支付关头词