a pastebin project

Detect apache mod with PHP

  1. /**
  2. * return true if the module $name is activated in apache
  3. *
  4. * @param string $name module name
  5. * @return boolean
  6. * @author Samdha <contact@samdha.net>
  7. **/
  8. function detect_apache_mod($name) {
  9.         $save = ob_get_clean();
  10.         ob_start();
  11.         phpinfo();
  12.         $phpinfo = ob_get_clean();
  13.         if ($save !== false) {
  14.                 ob_start();
  15.                 echo $save;
  16.         }
  17.         return (strpos($phpinfo, $name) !== false);
  18. }
  19.  
  20. if (detect_apache_mod('mod_evasive')) sleep(1);

advertising

Create a Paste

Please enter your new post below (or upload a file instead):





Please note that information posted here will not expire by default. If you want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords.

worth-right fantasy-obligation
fantasy-obligation
fantasy-obligation