!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/guzzlehttp/guzzle/tests/   drwxrwxr-x
Free 15.62 GB of 61.93 GB (25.23%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Server.php (2.84 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace GuzzleHttp\Tests;

use 
GuzzleHttp\Client;
use 
GuzzleHttp\Message\MessageFactory;
use 
GuzzleHttp\Message\Response;
use 
GuzzleHttp\Message\ResponseInterface;
use 
GuzzleHttp\RingBridge;
use 
GuzzleHttp\Tests\Ring\Client\Server as TestServer;

/**
 * Placeholder for the RingPHP-Client server that makes it easier to use.
 */
class Server
{
    public static 
$url 'http://127.0.0.1:8125/';
    public static 
$port 8125;

    
/**
     * Queue an array of responses or a single response on the server.
     *
     * Any currently queued responses will be overwritten.  Subsequent requests
     * on the server will return queued responses in FIFO order.
     *
     * @param array $responses Responses to queue.
     * @throws \Exception
     */
    
public static function enqueue(array $responses)
    {
        static 
$factory;
        if (!
$factory) {
            
$factory = new MessageFactory();
        }

        
$data = [];
        foreach (
$responses as $response) {
            
// Create the response object from a string
            
if (is_string($response)) {
                
$response $factory->fromMessage($response);
            } elseif (!(
$response instanceof ResponseInterface)) {
                throw new \
Exception('Responses must be strings or Responses');
            }
            
$data[] = self::convertResponse($response);
        }

        
TestServer::enqueue($data);
    }

    
/**
     * Get all of the received requests
     *
     * @param bool $hydrate Set to TRUE to turn the messages into
     *      actual {@see RequestInterface} objects.  If $hydrate is FALSE,
     *      requests will be returned as strings.
     *
     * @return array
     * @throws \RuntimeException
     */
    
public static function received($hydrate false)
    {
        
$response TestServer::received();

        if (
$hydrate) {
            
$c = new Client();
            
$factory = new MessageFactory();
            
$response array_map(function($message) use ($factory$c) {
                return 
RingBridge::fromRingRequest($message);
            }, 
$response);
        }

        return 
$response;
    }

    public static function 
flush()
    {
        
TestServer::flush();
    }

    public static function 
stop()
    {
        
TestServer::stop();
    }

    public static function 
wait($maxTries 5)
    {
        
TestServer::wait($maxTries);
    }

    public static function 
start()
    {
        
TestServer::start();
    }

    private static function 
convertResponse(Response $response)
    {
        
$headers array_map(function ($h) {
            return 
implode(', '$h);
        }, 
$response->getHeaders());

        return [
            
'status'  => $response->getStatusCode(),
            
'reason'  => $response->getReasonPhrase(),
            
'headers' => $headers,
            
'body'    => base64_encode((string) $response->getBody())
        ];
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.2866 ]--