zoukankan      html  css  js  c++  java
  • 代码审计之配置

    register_globals:php<5.4.0 PHP_INI_ALL:可在任何地方设置
    <?php
    if($user == 'admin'){
    echo 'true';
    }
    ?>

    allow_url_include:在5.2.0及以后默认off PHP_INI_ALL:可在任何地方设置(allow_url_fopen)
    <?php
    include $_GET['a'];
    ?>
    a=http://127.0.0.1/php.txt

    magic_quotes_gpc:get/post/cookie-->',",\,NULL
    php5不会处理$_SERVER,client-ip,referer
    php5.4后magic_quotes_gpc取消
    4.2.3之前->PHP_INI_ALL:可在任何地方设置
    大于4.2.3:PHP_INI_PERDIR:php.ini,.htaccess,httpd.conf

    magic_quotes_runtime:-->处理',",\,NULL 加
    处理对象:数据库,文件文件中获取的数据过滤
    php5.4后magic_quotes_gpc取消
    配置范围:PHP_INI_ALL:可在任何地方设置

    magic_quotes_sybase:为on覆盖gpc
    get、post、cookie---->转义空字符和'->"
    PHP_INI_ALL,在PHP5.4.0后移除

    safe_mode:(安全模式)
    safe_mode_include_dir,safe_mode_exec_dir
    open_basedir:(可访问目录)
    注意:设置/www/a,/www/a和/www/ab都可访问

    disable_functions:( 禁用函数)
    dl()可加载自定义的php扩展突破disable_functions的限制
    php.ini only

    display_errors和error_reporting
    display_errors会先错误

      • display_errors=on时,可配置error_reporting
  • 相关阅读:
    nyoj67三角形面积
    hduoj1097A hard puzzle
    nyoj168房间安排
    nyoj73 比大小
    hduoj1021 Fibonacci Again
    hduoj1018 Big Number
    hduoj1108最小公倍数
    nyoj312 20岁生日
    hduoj1019 Least Common Multiple
    nyoj144小珂的苦恼
  • 原文地址:https://www.cnblogs.com/lly-lly/p/5390873.html
Copyright © 2011-2022 走看看