asp 简单安全过滤sql防注入程序

作者:袖梨 2022-07-02

 Function ReplaceCode(Str,tagStr)
  Str = Replace(Str,Chr(32),tagStr)
  Str = Replace(Str,Chr(9),tagStr)
  Str = Replace(Str," ",tagStr)
  Str = Replace(Str," ",tagStr)
  Str = Replace(Str,"(",tagStr)
  Str = Replace(Str,")",tagStr)
  Str = Replace(Str,"<",tagStr)
  Str = Replace(Str,">",tagStr)
  Str = Replace(Str,"""",tagStr)
  Str = Replace(Str,"?",tagStr)
  Str = Replace(Str,"*",tagStr)
  Str = Replace(Str,"|",tagStr)
  Str = Replace(Str,",",tagStr)
  Str = Replace(Str,".",tagStr)
  Str = Replace(Str,"/",tagStr)
  Str = Replace(Str,"",tagStr)
  Str = Replace(Str,"-",tagStr)
  Str = Replace(Str,"@",tagStr)
  Str = Replace(Str,"#",tagStr)
  Str = Replace(Str,"$",tagStr)
  Str = Replace(Str,"%",tagStr)
  Str = Replace(Str,"&",tagStr)
  Str = Replace(Str,"+",tagStr)
  Str = Replace(Str,":",tagStr)
  Str = Replace(Str,"",tagStr)
  Str = Replace(Str,"",tagStr)
  Str = Replace(Str,"",tagStr)
  Str = Replace(Str,"",tagStr)
  Str = Replace(Str,"",tagStr)
  Str = Replace(Str,"",tagStr)
  ReplaceCode = Str
 End Function 

相关文章

精彩推荐