!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/queuepro/vendor/laravel/framework/src/Illuminate/Foundation/Console/   drwxrwxr-x
Free 13.26 GB of 57.97 GB (22.88%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     KeyGenerateCommand.php (2.97 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Illuminate\Foundation\Console;

use 
Illuminate\Console\Command;
use 
Illuminate\Console\ConfirmableTrait;
use 
Illuminate\Encryption\Encrypter;

class 
KeyGenerateCommand extends Command
{
    use 
ConfirmableTrait;

    
/**
     * The name and signature of the console command.
     *
     * @var string
     */
    
protected $signature 'key:generate
                    {--show : Display the key instead of modifying files}
                    {--force : Force the operation to run when in production}'
;

    
/**
     * The name of the console command.
     *
     * This name is used to identify the command during lazy loading.
     *
     * @var string|null
     */
    
protected static $defaultName 'key:generate';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'Set the application key';

    
/**
     * Execute the console command.
     *
     * @return void
     */
    
public function handle()
    {
        
$key $this->generateRandomKey();

        if (
$this->option('show')) {
            return 
$this->line('<comment>'.$key.'</comment>');
        }

        
// Next, we will replace the application key in the environment file so it is
        // automatically setup for this developer. This key gets generated using a
        // secure random byte generator and is later base64 encoded for storage.
        
if (! $this->setKeyInEnvironmentFile($key)) {
            return;
        }

        
$this->laravel['config']['app.key'] = $key;

        
$this->info('Application key set successfully.');
    }

    
/**
     * Generate a random key for the application.
     *
     * @return string
     */
    
protected function generateRandomKey()
    {
        return 
'base64:'.base64_encode(
            
Encrypter::generateKey($this->laravel['config']['app.cipher'])
        );
    }

    
/**
     * Set the application key in the environment file.
     *
     * @param  string  $key
     * @return bool
     */
    
protected function setKeyInEnvironmentFile($key)
    {
        
$currentKey $this->laravel['config']['app.key'];

        if (
strlen($currentKey) !== && (! $this->confirmToProceed())) {
            return 
false;
        }

        
$this->writeNewEnvironmentFileWith($key);

        return 
true;
    }

    
/**
     * Write a new environment file with the given key.
     *
     * @param  string  $key
     * @return void
     */
    
protected function writeNewEnvironmentFileWith($key)
    {
        
file_put_contents($this->laravel->environmentFilePath(), preg_replace(
            
$this->keyReplacementPattern(),
            
'APP_KEY='.$key,
            
file_get_contents($this->laravel->environmentFilePath())
        ));
    }

    
/**
     * Get a regex pattern that will match env APP_KEY with any random key.
     *
     * @return string
     */
    
protected function keyReplacementPattern()
    {
        
$escaped preg_quote('='.$this->laravel['config']['app.key'], '/');

        return 
"/^APP_KEY{$escaped}/m";
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0057 ]--