首页 > 语言 > 关键词  > SQL最新资讯  > 正文

防范SQL注入攻击的新办法

2007-04-04 15:16 · 稿源:中国站长站

《防范SQL注入攻击的新办法》文章已经归档,站长之家不再展示相关内容,下文是站长之家的自动化写作机器人,通过算法提取的文章重点内容。这只AI还很年轻,欢迎联系我们帮它成长:

近段时间由于修改一个ASP程序(有SQL注入漏洞),在网上找了很多相关的一些防范办法,都不近人意,所以我将现在网上的一些方法综合改良了一下,写出这个ASP函数,供大家参考。 以下是引用片段:Function SafeRequest(ParaName) Dim ParaValue ParaValue=Request(ParaName) if IsNumeric(ParaValue) = True then SafeRequest=ParaValue exit Function elseIf Instr(LCase(ParaValue),"select ") 0 or Instr(LCase(ParaValue),"insert ") 0 or Instr(LCase(ParaValue),"delete from") 0 or Instr(LCase(ParaValue),"count(") 0 or Instr(LCase(ParaValue),"drop table") 0 or Instr(LCase(ParaValue),"update ") 0 or Instr(LCase(ParaValue),"truncate ") 0 or Instr(LCase(ParaValue),"asc(") 0 or Instr(LCase(ParaValue),"mid(") 0 or Instr(LCase(Para...

......

本文由站长之家用户“中国站长站”投稿,本平台仅提供信息索引服务。由于内容发布时间超过平台更新维护时间,为了保证文章信息的及时性,内容观点的准确性,平台将不提供完整的内容展现,本页面内容仅为平台搜索索引使用。需阅读完整内容的用户,请联系作者获取原文。

举报

  • 相关推荐
  • 大家在看

今日大家都在搜的词: