Bill: PHP protection Xss,sql, code execution, file inclusion and many other high-risk vulnerabilities

Source: Internet
Author: User

version : v1.1
Update time : 2013-05-25
what 's new: Optimizing Performance
function Description :

can effectively protect xss,sql injection, code execution, file inclusion and many other high-risk vulnerabilities.


How to use:

  1. Upload waf.php to the directory of files to include
  2. To add protection to the page, there are two ways to do this, depending on the situation two:


a). Page anti-injection, cross-site, add code
to the page you need to protect
Copy Code
  1. Require_once (' waf.php ');
If you want to prevent the whole station, in a common file in the site, such as the database link file config.inc.php, to invoke this code. Frequently used PHP system to add files

Phpcms V9 \phpcms\base.php

PHPWIND8.7 \data\sql_config.php

DEDECMS5.7 \data\common.inc.php

DiscuzX2 \config\config_global.php

Wordpress \wp-config.php

Metinfo \include\head.php



b). At the top of each file, add the code as follows: Find the Auto_prepent_file in php.ini and modify it to:

Copy Code
    1. Automatically add files before or after any PHP document;
    2. Auto_prepend_file = waf.php path;

Patch File Download Link:
PHP Code patch php_patch.zip (3 K) ASP code patch Asp.zip (2 K)

Bill: PHP protection Xss,sql, code execution, file inclusion, and many other high-risk vulnerabilities

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.