當前位置:首頁 > 建站常識 > 列表

ASP網站防注入函數

點擊:時(shí)間: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 "請不要使用(yòng)敏感字符 021jz.com.cn"Response.EndEnd IfNextSet regEx = NothingEnd Sub
預約建站
免費提供網站優化(huà)
領取關鍵詞