php-enable_functions-enumeration-script.php

來源:互聯網
上載者:User
php 危險函數枚舉 用於安全營運 和滲透測試
  1. msg("php enable_functions enumeration script");
  2. $func_arr=array('disk_total_space','disk_free_space','exec','passthru','shell_exec','system','popen','show_source','pclose','proc_open','dl','chmod','php_real_logo_guid','php_egg_logo_guid','php_ini_scanned_files','php_ini_loaded_file','readlink','linkinfo','symlink','link','set_file_buffer','exec','system','escapeshellcmd','escapeshellarg','passthru','proc_close','proc_terminate','proc_get_status','proc_nice','getmyuid','getmygid','getmyinode','putenv','getopt','sys_getloadavg','get_current_user','magic_quotes_runtime','set_magic_quotes_runtime','import_request_variables','debug_zval_dump','ini_alter','dl','pclose','popen','stream_socket_client','stream_socket_server','stream_socket_accept','stream_socket_pair','stream_get_transports','stream_wrapper_restore','get_headers','mail','mb_send_mail','openlog','syslog','closelog','flock','pfsockopen','posix_kill','apache_child_terminate','apache_get_modules','apache_get_version','apache_lookup_uri','apache_reset_timeout','apache_response_headers','virtual');
  3. $dis_func_arr = explode(",",get_cfg_var("disable_functions"));
  4. if($dis_func_arr[0]){
  5. foreach ($func_arr as $func) {
  6. if(!in_array($func,$dis_func_arr)){
  7. msg("Function: $func enable",1);
  8. }
  9. }
  10. }else{
  11. msg("disable_functions none !!!",1);
  12. }
  13. function msg($text,$type=0){
  14. $def="[*]";
  15. $color="green";
  16. if($type ==1){
  17. $def="[+]" ;
  18. $color="red";
  19. }else if ($type==-1){
  20. $def="[-]";
  21. }
  22. echo "$def $text
    ";
  23. }
  24. ?>
複製代碼
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.