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


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

namespace Livewire;

use 
Illuminate\Support\Facades\URL;
use 
League\Flysystem\Cached\CachedAdapter;

class 
GenerateSignedUploadUrl
{
    public function 
forLocal()
    {
        return 
URL::temporarySignedRoute(
            
'livewire.upload-file'now()->addMinutes(FileUploadConfiguration::maxUploadTime())
        );
    }

    public function 
forS3($file$visibility 'private')
    {
        
$driver FileUploadConfiguration::storage()->getDriver();

        
// Flysystem V2+ doesn't allow direct access to adapter, so we need to invade instead.
        
if (method_exists($driver'getAdapter')) {
            
$adapter $driver->getAdapter();
        } else {
            
$adapter invade($driver)->adapter;
        }

        if (
$adapter instanceof CachedAdapter) {
            
$adapter $adapter->getAdapter();
        }

        
// Flysystem V2+ doesn't allow direct access to client, so we need to invade instead.
        
if (method_exists($adapter'getClient')) {
            
$client $adapter->getClient();
        } else {
            
$client invade($adapter)->client;
        }

        
// Flysystem V2+ doesn't allow direct access to bucket, so we need to invade instead.
        
if (method_exists($adapter'getBucket')) {
            
$bucket $adapter->getBucket();
        } else {
            
$bucket invade($adapter)->bucket;
        }

        
$fileType $file->getMimeType();
        
$fileHashName TemporaryUploadedFile::generateHashNameWithOriginalNameEmbedded($file);
        
$path FileUploadConfiguration::path($fileHashName);

        
$command $client->getCommand('putObject'array_filter([
            
'Bucket' => $bucket,
            
'Key' => $path,
            
'ACL' => $visibility,
            
'ContentType' => $fileType ?: 'application/octet-stream',
            
'CacheControl' => null,
            
'Expires' => null,
        ]));

        
$signedRequest $client->createPresignedRequest(
            
$command,
            
'+' FileUploadConfiguration::maxUploadTime() . ' minutes'
        
);

        return [
            
'path' => $fileHashName,
            
'url' => (string) $signedRequest->getUri(),
            
'headers' => $this->headers($signedRequest$fileType),
        ];
    }

    protected function 
headers($signedRequest$fileType)
    {
        return 
array_merge(
            
$signedRequest->getHeaders(),
            [
                
'Content-Type' => $fileType ?: 'application/octet-stream'
            
]
        );
    }
}

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