!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/Configuration/Option/   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:     Commands.php (4.25 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\Configuration\Option;

use 
InvalidArgumentException;
use 
Predis\Command\FactoryInterface;
use 
Predis\Command\RawFactory;
use 
Predis\Command\RedisFactory;
use 
Predis\Configuration\OptionInterface;
use 
Predis\Configuration\OptionsInterface;

/**
 * Configures a connection factory to be used by the client.
 */
class Commands implements OptionInterface
{
    
/**
     * {@inheritdoc}
     */
    
public function filter(OptionsInterface $options$value)
    {
        if (
is_callable($value)) {
            
$value call_user_func($value$options);
        }

        if (
$value instanceof FactoryInterface) {
            return 
$value;
        } elseif (
is_array($value)) {
            return 
$this->createFactoryByArray($options$value);
        } elseif (
is_string($value)) {
            return 
$this->createFactoryByString($options$value);
        } else {
            throw new 
InvalidArgumentException(sprintf(
                
'%s expects a valid command factory',
                static::class
            ));
        }
    }

    
/**
     * Creates a new default command factory from a named array.
     *
     * The factory instance is configured according to the supplied named array
     * mapping command IDs (passed as keys) to the FCQN of classes implementing
     * Predis\Command\CommandInterface.
     *
     * @param OptionsInterface $options Client options container
     * @param array            $value   Named array mapping command IDs to classes
     *
     * @return FactoryInterface
     */
    
protected function createFactoryByArray(OptionsInterface $options, array $value)
    {
        
/**
         * @var FactoryInterface
         */
        
$commands $this->getDefault($options);

        foreach (
$value as $commandID => $commandClass) {
            if (
$commandClass === null) {
                
$commands->undefine($commandID);
            } else {
                
$commands->define($commandID$commandClass);
            }
        }

        return 
$commands;
    }

    
/**
     * Creates a new command factory from a descriptive string.
     *
     * The factory instance is configured according to the supplied descriptive
     * string that identifies specific configurations of schemes and connection
     * classes. Supported configuration values are:
     *
     * - "predis" returns the default command factory used by Predis
     * - "raw" returns a command factory that creates only raw commands
     * - "default" is simply an alias of "predis"
     *
     * @param OptionsInterface $options Client options container
     * @param string           $value   Descriptive string identifying the desired configuration
     *
     * @return FactoryInterface
     */
    
protected function createFactoryByString(OptionsInterface $optionsstring $value)
    {
        switch (
strtolower($value)) {
            case 
'default':
            case 
'predis':
                return 
$this->getDefault($options);

            case 
'raw':
                return 
$this->createRawFactory($options);

            default:
                throw new 
InvalidArgumentException(sprintf(
                    
'%s does not recognize `%s` as a supported configuration string',
                    static::class,
                    
$value
                
));
        }
    }

    
/**
     * Creates a new raw command factory instance.
     *
     * @param OptionsInterface $options Client options container
     */
    
protected function createRawFactory(OptionsInterface $options): FactoryInterface
    
{
        
$commands = new RawFactory();

        if (isset(
$options->prefix)) {
            throw new 
InvalidArgumentException(sprintf(
                
'%s does not support key prefixing'RawFactory::class
            ));
        }

        return 
$commands;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getDefault(OptionsInterface $options)
    {
        
$commands = new RedisFactory();

        if (isset(
$options->prefix)) {
            
$commands->setProcessor($options->prefix);
        }

        return 
$commands;
    }
}

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