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


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

namespace Laravel\Lumen\Exceptions;

use 
Exception;
use 
Illuminate\Auth\Access\AuthorizationException;
use 
Illuminate\Contracts\Debug\ExceptionHandler;
use 
Illuminate\Contracts\Support\Responsable;
use 
Illuminate\Database\Eloquent\ModelNotFoundException;
use 
Illuminate\Http\Exceptions\HttpResponseException;
use 
Illuminate\Http\JsonResponse;
use 
Illuminate\Http\Response;
use 
Illuminate\Support\Arr;
use 
Illuminate\Validation\ValidationException;
use 
Psr\Log\LoggerInterface;
use 
Symfony\Component\Console\Application as ConsoleApplication;
use 
Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use 
Symfony\Component\HttpKernel\Exception\HttpException;
use 
Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use 
Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use 
Throwable;

class 
Handler implements ExceptionHandler
{
    
/**
     * A list of the exception types that should not be reported.
     *
     * @var array
     */
    
protected $dontReport = [];

    
/**
     * Report or log an exception.
     *
     * @param  \Throwable  $e
     * @return void
     *
     * @throws \Exception
     */
    
public function report(Throwable $e)
    {
        if (
$this->shouldntReport($e)) {
            return;
        }

        if (
method_exists($e'report')) {
            if (
$e->report() !== false) {
                return;
            }
        }

        try {
            
$logger app(LoggerInterface::class);
        } catch (
Exception $ex) {
            throw 
$e// throw the original exception
        
}

        
$logger->error($e->getMessage(), ['exception' => $e]);
    }

    
/**
     * Determine if the exception should be reported.
     *
     * @param  \Throwable  $e
     * @return bool
     */
    
public function shouldReport(Throwable $e)
    {
        return ! 
$this->shouldntReport($e);
    }

    
/**
     * Determine if the exception is in the "do not report" list.
     *
     * @param  \Throwable  $e
     * @return bool
     */
    
protected function shouldntReport(Throwable $e)
    {
        foreach (
$this->dontReport as $type) {
            if (
$e instanceof $type) {
                return 
true;
            }
        }

        return 
false;
    }

    
/**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Throwable  $e
     * @return \Symfony\Component\HttpFoundation\Response
     *
     * @throws \Throwable
     */
    
public function render($requestThrowable $e)
    {
        if (
method_exists($e'render')) {
            return 
$e->render($request);
        } elseif (
$e instanceof Responsable) {
            return 
$e->toResponse($request);
        }

        if (
$e instanceof HttpResponseException) {
            return 
$e->getResponse();
        } elseif (
$e instanceof ModelNotFoundException) {
            
$e = new NotFoundHttpException($e->getMessage(), $e);
        } elseif (
$e instanceof AuthorizationException) {
            
$e = new HttpException(403$e->getMessage());
        } elseif (
$e instanceof ValidationException && $e->getResponse()) {
            return 
$e->getResponse();
        }

        return 
$request->expectsJson()
                        ? 
$this->prepareJsonResponse($request$e)
                        : 
$this->prepareResponse($request$e);
    }

    
/**
     * Prepare a JSON response for the given exception.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Throwable  $e
     * @return \Illuminate\Http\JsonResponse
     */
    
protected function prepareJsonResponse($requestThrowable $e)
    {
        return new 
JsonResponse(
            
$this->convertExceptionToArray($e),
            
$this->isHttpException($e) ? $e->getStatusCode() : 500,
            
$this->isHttpException($e) ? $e->getHeaders() : [],
            
JSON_PRETTY_PRINT JSON_UNESCAPED_SLASHES
        
);
    }

    
/**
     * Convert the given exception to an array.
     *
     * @param  \Throwable  $e
     * @return array
     */
    
protected function convertExceptionToArray(Throwable $e)
    {
        return 
config('app.debug'false) ? [
            
'message' => $e->getMessage(),
            
'exception' => get_class($e),
            
'file' => $e->getFile(),
            
'line' => $e->getLine(),
            
'trace' => collect($e->getTrace())->map(function ($trace) {
                return 
Arr::except($trace, ['args']);
            })->
all(),
        ] : [
            
'message' => $this->isHttpException($e) ? $e->getMessage() : 'Server Error',
        ];
    }

    
/**
     * Prepare a response for the given exception.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Throwable  $e
     * @return \Illuminate\Http\Response
     */
    
protected function prepareResponse($requestThrowable $e)
    {
        
$response = new Response(
            
$this->renderExceptionWithSymfony($econfig('app.debug'false)),
            
$this->isHttpException($e) ? $e->getStatusCode() : 500,
            
$this->isHttpException($e) ? $e->getHeaders() : []
        );

        
$response->exception $e;

        return 
$response;
    }

    
/**
     * Render an exception to a string using Symfony.
     *
     * @param  \Throwable  $e
     * @param  bool  $debug
     * @return string
     */
    
protected function renderExceptionWithSymfony(Throwable $e$debug)
    {
        
$renderer = new HtmlErrorRenderer($debug);

        return 
$renderer->render($e)->getAsString();
    }

    
/**
     * Render an exception to the console.
     *
     * @param  \Symfony\Component\Console\Output\OutputInterface  $output
     * @param  \Throwable  $e
     * @return void
     */
    
public function renderForConsole($outputThrowable $e)
    {
        (new 
ConsoleApplication)->renderThrowable($e$output);
    }

    
/**
     * Determine if the given exception is an HTTP exception.
     *
     * @param  \Throwable  $e
     * @return bool
     */
    
protected function isHttpException(Throwable $e)
    {
        return 
$e instanceof HttpExceptionInterface;
    }
}

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