网站防止注入入侵的一些有效代码和方法 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

    style="display:block;padding:0px 10px;" class="ContentFont">

    代码一:

    <%

    '--------定义部份------------------

    Dim  Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr

    '自定义需要过滤的字串,用  "防 "  分隔

    Fy_In  =  "’’’’防;防and防exec防insert防select防delete防update防count防*防%防chr防mid防master防 truncate防char防declare防 <防 >防=防 |防-防_ "

    Fy_Inf  =  split(Fy_In, "防 ")

    If  Request.Form. < > " "  Then

    For  Each  Fy_Post  In  Request.Form

    For  Fy_Xh=0  To  Ubound(Fy_Inf)

    If  Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh)) < >0  Then

    Response.Write  " alert(’’’’网长友情提示 大侠↓请不要在参数中包含非法字符尝试注入攻击

最新文章