!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/root/scripts_backup/apache/   drwxr-xr-x
Free 1.49 GB of 7.22 GB (20.59%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     virtdocrootfix.php (2.29 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

if (!file_exists('/etc/apache2/apache2.conf'))
    return;

$conf file('/etc/apache2/apache2.conf');

$vhosts = array();

for (
$i 0$i count($conf); $i++)
{
    
$line $conf[$i];
    if (
stristr($line,'<VirtualHost ') !== false)
    {
        
$i++;
        
$servername '';
        
$virtualdocroot '';
        
$serveralias '';
        do
        {
            
$line $conf[$i];
            
$array explode(' ',$line,2);
            
$array[0] = trim($array[0]);
            
$array[1] = trim($array[1]);
            if (
$array[0] == 'ServerName')
            {
                
$servername $array[1];
            }
            if (
$array[0] == 'VirtualDocumentRoot' && stristr($array[1],"%0") !== false)
            {
                
$virtualdocroot $array[1];
            }
            if (
$array[0] == 'ServerAlias')
            {
                
$serveralias $array[1];
            }
            
$i++;
        } while(!
stristr($conf[$i],'</VirtualHost>'));
        if (
$servername != '' && $virtualdocroot != '')
            
$vhosts[] = array('ServerName' => $servername'ServerAlias' => $serveralias'VirtualDocumentRoot' => $virtualdocroot);
    }
}

$checksum '';

if (
file_exists('/etc/apache2/virtdocrootcheck.md5'))
    
$checksum file_get_contents('/etc/apache2/virtdocrootcheck.md5');
else
    
file_put_contents('/etc/apache2/virtdocrootcheck.md5',md5(print_r($vhosts,true)));

if (
$checksum != '')
{
    
$md5 md5(print_r($vhosts,true));
    if (
$checksum == $md5)
    {
        echo 
'no changes';
        return;
    }
    else
        
file_put_contents('/etc/apache2/virtdocrootcheck.md5',$md5);
}

$handle fopen('/etc/apache2/conf.d/virtdocrootfix.conf','w+');

foreach(
$vhosts as $vhost)
{
    
$array explode(' ',$vhost['ServerAlias']);
    
$serveralias '';
    foreach(
$array as $alias)
    {
        if (
ereg("\*\..*",$alias))
        {
            
$serveralias $alias;
            break;
        }
    }
    if (
$serveralias == '') continue;

    
$docroot substr($vhost['VirtualDocumentRoot'],0,stripos($vhost['VirtualDocumentRoot'],"/%0"));
    
$array explode('/',$vhost['VirtualDocumentRoot']);
    
$username $array[2];

    if (!
file_exists("/home/$username/data/php-bin/php"))
        continue;

    
fwrite($handle,"
    <Directory 
$docroot/$serveralias>
        FCGIWrapper /home/
$username/data/php-bin/php .php
        FCGIWrapper /home/
$username/data/php-bin/php .php3
        FCGIWrapper /home/
$username/data/php-bin/php .php4
        FCGIWrapper /home/
$username/data/php-bin/php .php5
        FCGIWrapper /home/
$username/data/php-bin/php .phtml
        Options +ExecCGI +Includes
    </Directory>\n"
);
}
fclose($handle);

echo 
exec('apache2ctl graceful');

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0409 ]--