!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/ai.picotech.app/public_html/vendor/openai-php/client/src/Transporters/   drwxrwxr-x
Free 28.96 GB of 117.98 GB (24.55%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
OpenAI\Transporters;

use 
JsonException;
use 
OpenAI\Contracts\Transporter;
use 
OpenAI\Exceptions\ErrorException;
use 
OpenAI\Exceptions\TransporterException;
use 
OpenAI\Exceptions\UnserializableResponse;
use 
OpenAI\ValueObjects\Transporter\BaseUri;
use 
OpenAI\ValueObjects\Transporter\Headers;
use 
OpenAI\ValueObjects\Transporter\Payload;
use 
Psr\Http\Client\ClientExceptionInterface;
use 
Psr\Http\Client\ClientInterface;

/**
 * @internal
 */
final class HttpTransporter implements Transporter
{
    
/**
     * Creates a new Http Transporter instance.
     */
    
public function __construct(
        private readonly 
ClientInterface $client,
        private readonly 
BaseUri $baseUri,
        private readonly 
Headers $headers,
    ) {
        
// ..
    
}

    
/**
     * {@inheritDoc}
     */
    
public function requestObject(Payload $payload): array|string
    
{
        
$request $payload->toRequest($this->baseUri$this->headers);

        try {
            
$response $this->client->sendRequest($request);
        } catch (
ClientExceptionInterface $clientException) {
            throw new 
TransporterException($clientException);
        }

        
$contents = (string) $response->getBody();

        if (
$response->getHeader('Content-Type')[0] === 'text/plain; charset=utf-8') {
            return 
$contents;
        }

        try {
            
/** @var array{error?: array{message: string, type: string, code: string}} $response */
            
$response json_decode($contentstrue512JSON_THROW_ON_ERROR);
        } catch (
JsonException $jsonException) {
            throw new 
UnserializableResponse($jsonException);
        }

        if (isset(
$response['error'])) {
            throw new 
ErrorException($response['error']);
        }

        return 
$response;
    }

    
/**
     * {@inheritDoc}
     */
    
public function requestContent(Payload $payload): string
    
{
        
$request $payload->toRequest($this->baseUri$this->headers);

        try {
            
$response $this->client->sendRequest($request);
        } catch (
ClientExceptionInterface $clientException) {
            throw new 
TransporterException($clientException);
        }

        
$contents $response->getBody()->getContents();

        try {
            
/** @var array{error?: array{message: string, type: string, code: string}} $response */
            
$response json_decode($contentstrue512JSON_THROW_ON_ERROR);

            if (isset(
$response['error'])) {
                throw new 
ErrorException($response['error']);
            }
        } catch (
JsonException) {
            
// ..
        
}

        return 
$contents;
    }
}

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