• C#程序中防SQL注入的简单字符串替换


    Acc = Acc.Replace("[", "……");

    Acc = Acc.Replace("]", "……");

    Acc = Acc.Replace("and", "");

    Acc = Acc.Replace("=", "{");

    Acc = Acc.Replace("<", "}");

    Acc = Acc.Replace(">", "}");

    Acc = Acc.Replace(";", ":");

    Acc = Acc.Replace("'", "’");

    Acc = Acc.Replace("&", "’");

    Acc = Acc.Replace("'", "’");

    Acc = Acc.Replace("--", "’");

    Acc = Acc.Replace("==", "’");

    Acc = Acc.Replace("'", "’");

    Acc = Acc.Replace("'", "’");

    Acc = Acc.Replace("/", "");

    Acc = Acc.Replace("script", "");

    Acc = Acc.Replace("SCRIPT", "‘");

    Acc = Acc.Replace("Script", "’");

    Acc = Acc.Replace("script", "’");

    Acc = Acc.Replace("object", "’");

    Acc = Acc.Replace("OBJECT", "’");

    Acc = Acc.Replace("Object", "’");

    Acc = Acc.Replace("object", "’");

    Acc = Acc.Replace("applet", "’");

    Acc = Acc.Replace("APPLET", "’");

    Acc = Acc.Replace("Applet", "’");

    Acc = Acc.Replace("applet", "’");

    Acc = Acc.Replace("select", "’");

    Acc = Acc.Replace("execute", "’"); 

    Acc = Acc.Replace("exec", "’");

    Acc = Acc.Replace("join", "’");

    Acc = Acc.Replace("union", "’");

    Acc = Acc.Replace("where", "’");

    Acc = Acc.Replace("insert", "’");

    Acc = Acc.Replace("delete", "’");

    Acc = Acc.Replace("update", "’");

    Acc = Acc.Replace("like", "’");

    Acc = Acc.Replace("drop", "’");

    Acc = Acc.Replace("create", "’");

    Acc = Acc.Replace("rename", "’");

    Acc = Acc.Replace("count", "’");

    Acc = Acc.Replace("chr", "’");

    Acc = Acc.Replace("mid", "’");

    Acc = Acc.Replace("truncate", "’");

    Acc = Acc.Replace("nchar", "’");

    Acc = Acc.Replace("char", "’");            

    Acc = Acc.Replace("alter", "z");            

    Acc = Acc.Replace("cast", "z");            

    Acc = Acc.Replace("exists", "z");

  • 相关阅读:
    解决Android Studio Gradle DSL method not found: 'android()'
    【转】关于ListView中notifyDataSetChanged()刷新数据不更新原因
    设计模式-单例模式
    IE浏览器让DIV居中
    Java通过DOM解析XML
    git 配置文件位置;git配置文件设置
    git config配置
    dos2unix
    文件的编码问题解决
    git diff old mode 100644 new mode 100755
  • 原文地址:https://www.cnblogs.com/huyueping/p/3101455.html
Copyright © 2020-2023  润新知