Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.222.227.24
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
1 /
vendor /
facade /
flare-client-php /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Concerns
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Context
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Contracts
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Enums
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Glows
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Http
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Middleware
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Solutions
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Stacktrace
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Time
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Truncation
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Api.php
1.65
KB
-rw-r--r--
2020-11-17 16:24
Flare.php
6.35
KB
-rw-r--r--
2020-11-17 16:24
Frame.php
1.25
KB
-rw-r--r--
2020-11-17 16:24
Report.php
6.62
KB
-rw-r--r--
2020-11-17 16:24
View.php
1.09
KB
-rw-r--r--
2020-11-17 16:24
helpers.php
514
B
-rw-r--r--
2020-11-17 16:24
Save
Rename
<?php namespace Facade\FlareClient; use Exception; use Facade\FlareClient\Concerns\HasContext; use Facade\FlareClient\Context\ContextContextDetector; use Facade\FlareClient\Context\ContextDetectorInterface; use Facade\FlareClient\Enums\MessageLevels; use Facade\FlareClient\Glows\Glow; use Facade\FlareClient\Glows\Recorder; use Facade\FlareClient\Http\Client; use Facade\FlareClient\Middleware\AddGlows; use Facade\FlareClient\Middleware\AnonymizeIp; use Illuminate\Contracts\Container\Container; use Illuminate\Pipeline\Pipeline; use Throwable; class Flare { use HasContext; /** @var \Facade\FlareClient\Http\Client */ private $client; /** @var \Facade\FlareClient\Api */ private $api; /** @var array */ private $middleware = []; /** @var \Facade\FlareClient\Glows\Recorder */ private $recorder; /** @var string */ private $applicationPath; /** @var \Illuminate\Contracts\Container\Container|null */ private $container; /** @var ContextDetectorInterface */ private $contextDetector; /** @var callable|null */ private $previousExceptionHandler; /** @var callable|null */ private $previousErrorHandler; public static function register(string $apiKey, string $apiSecret = null, ContextDetectorInterface $contextDetector = null, Container $container = null) { $client = new Client($apiKey, $apiSecret); return new static($client, $contextDetector, $container); } public function __construct(Client $client, ContextDetectorInterface $contextDetector = null, Container $container = null, array $middleware = []) { $this->client = $client; $this->recorder = new Recorder(); $this->contextDetector = $contextDetector ?? new ContextContextDetector(); $this->container = $container; $this->middleware = $middleware; $this->api = new Api($this->client); $this->registerDefaultMiddleware(); } public function getMiddleware(): array { return $this->middleware; } public function registerFlareHandlers() { $this->registerExceptionHandler(); $this->registerErrorHandler(); return $this; } public function registerExceptionHandler() { $this->previousExceptionHandler = set_exception_handler([$this, 'handleException']); return $this; } public function registerErrorHandler() { $this->previousErrorHandler = set_error_handler([$this, 'handleError']); return $this; } private function registerDefaultMiddleware() { return $this->registerMiddleware(new AddGlows($this->recorder)); } public function registerMiddleware($callable) { $this->middleware[] = $callable; return $this; } public function getMiddlewares(): array { return $this->middleware; } public function glow( string $name, string $messageLevel = MessageLevels::INFO, array $metaData = [] ) { $this->recorder->record(new Glow($name, $messageLevel, $metaData)); } public function handleException(Throwable $throwable) { $this->report($throwable); if ($this->previousExceptionHandler) { call_user_func($this->previousExceptionHandler, $throwable); } } public function handleError($code, $message, $file = '', $line = 0) { $exception = new \ErrorException($message, 0, $code, $file, $line); $this->report($exception); if ($this->previousErrorHandler) { return call_user_func( $this->previousErrorHandler, $message, $code, $file, $line ); } } public function applicationPath(string $applicationPath) { $this->applicationPath = $applicationPath; return $this; } public function report(Throwable $throwable, callable $callback = null) { $report = $this->createReport($throwable); if (! is_null($callback)) { call_user_func($callback, $report); } $this->sendReportToApi($report); } public function reportMessage(string $message, string $logLevel, callable $callback = null) { $report = $this->createReportFromMessage($message, $logLevel); if (! is_null($callback)) { call_user_func($callback, $report); } $this->sendReportToApi($report); } public function sendTestReport(Throwable $throwable) { $this->api->sendTestReport($this->createReport($throwable)); } private function sendReportToApi(Report $report) { try { $this->api->report($report); } catch (Exception $exception) { } } public function reset() { $this->api->sendQueuedReports(); $this->userProvidedContext = []; $this->recorder->reset(); } private function applyAdditionalParameters(Report $report) { $report ->stage($this->stage) ->messageLevel($this->messageLevel) ->setApplicationPath($this->applicationPath) ->userProvidedContext($this->userProvidedContext); } public function anonymizeIp() { $this->registerMiddleware(new AnonymizeIp); return $this; } public function createReport(Throwable $throwable): Report { $report = Report::createForThrowable( $throwable, $this->contextDetector->detectCurrentContext(), $this->applicationPath ); return $this->applyMiddlewareToReport($report); } public function createReportFromMessage(string $message, string $logLevel): Report { $report = Report::createForMessage( $message, $logLevel, $this->contextDetector->detectCurrentContext(), $this->applicationPath ); $report->groupByException(); return $this->applyMiddlewareToReport($report); } protected function applyMiddlewareToReport(Report $report): Report { $this->applyAdditionalParameters($report); $report = (new Pipeline($this->container)) ->send($report) ->through($this->middleware) ->then(function ($report) { return $report; }); return $report; } }