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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/queuepro/vendor/monolog/monolog/src/Monolog/Processor/   drwxrwxr-x
Free 13.05 GB of 57.97 GB (22.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     WebProcessor.php (3.16 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

/*
 * This file is part of the Monolog package.
 *
 * (c) Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Monolog\Processor;

/**
 * Injects url/method and remote IP of the current web request in all records
 *
 * @author Jordi Boggiano <j.boggiano@seld.be>
 */
class WebProcessor implements ProcessorInterface
{
    
/**
     * @var array<string, mixed>|\ArrayAccess<string, mixed>
     */
    
protected $serverData;

    
/**
     * Default fields
     *
     * Array is structured as [key in record.extra => key in $serverData]
     *
     * @var array<string, string>
     */
    
protected $extraFields = [
        
'url'         => 'REQUEST_URI',
        
'ip'          => 'REMOTE_ADDR',
        
'http_method' => 'REQUEST_METHOD',
        
'server'      => 'SERVER_NAME',
        
'referrer'    => 'HTTP_REFERER',
    ];

    
/**
     * @param array<string, mixed>|\ArrayAccess<string, mixed>|null $serverData  Array or object w/ ArrayAccess that provides access to the $_SERVER data
     * @param array<string, string>|null                            $extraFields Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer
     */
    
public function __construct($serverData null, array $extraFields null)
    {
        if (
null === $serverData) {
            
$this->serverData = &$_SERVER;
        } elseif (
is_array($serverData) || $serverData instanceof \ArrayAccess) {
            
$this->serverData $serverData;
        } else {
            throw new 
\UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.');
        }

        if (isset(
$this->serverData['UNIQUE_ID'])) {
            
$this->extraFields['unique_id'] = 'UNIQUE_ID';
        }

        if (
null !== $extraFields) {
            if (isset(
$extraFields[0])) {
                foreach (
array_keys($this->extraFields) as $fieldName) {
                    if (!
in_array($fieldName$extraFields)) {
                        unset(
$this->extraFields[$fieldName]);
                    }
                }
            } else {
                
$this->extraFields $extraFields;
            }
        }
    }

    
/**
     * {@inheritDoc}
     */
    
public function __invoke(array $record): array
    {
        
// skip processing if for some reason request data
        // is not present (CLI or wonky SAPIs)
        
if (!isset($this->serverData['REQUEST_URI'])) {
            return 
$record;
        }

        
$record['extra'] = $this->appendExtraFields($record['extra']);

        return 
$record;
    }

    public function 
addExtraField(string $extraNamestring $serverName): self
    
{
        
$this->extraFields[$extraName] = $serverName;

        return 
$this;
    }

    
/**
     * @param  mixed[] $extra
     * @return mixed[]
     */
    
private function appendExtraFields(array $extra): array
    {
        foreach (
$this->extraFields as $extraName => $serverName) {
            
$extra[$extraName] = $this->serverData[$serverName] ?? null;
        }

        return 
$extra;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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