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


Viewing file:     CouchDBHandler.php (2.55 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

/*
 * 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\Formatter\FormatterInterface;
use 
Monolog\Formatter\JsonFormatter;
use 
Monolog\Level;
use 
Monolog\LogRecord;

/**
 * CouchDB handler
 *
 * @author Markus Bachmann <markus.bachmann@bachi.biz>
 * @phpstan-type Options array{
 *     host: string,
 *     port: int,
 *     dbname: string,
 *     username: string|null,
 *     password: string|null
 * }
 * @phpstan-type InputOptions array{
 *     host?: string,
 *     port?: int,
 *     dbname?: string,
 *     username?: string|null,
 *     password?: string|null
 * }
 */
class CouchDBHandler extends AbstractProcessingHandler
{
    
/**
     * @var mixed[]
     * @phpstan-var Options
     */
    
private array $options;

    
/**
     * @param mixed[] $options
     *
     * @phpstan-param InputOptions $options
     */
    
public function __construct(array $options = [], int|string|Level $level Level::Debugbool $bubble true)
    {
        
$this->options array_merge([
            
'host'     => 'localhost',
            
'port'     => 5984,
            
'dbname'   => 'logger',
            
'username' => null,
            
'password' => null,
        ], 
$options);

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

    
/**
     * @inheritDoc
     */
    
protected function write(LogRecord $record): void
    
{
        
$basicAuth null;
        if (
null !== $this->options['username'] && null !== $this->options['password']) {
            
$basicAuth sprintf('%s:%s@'$this->options['username'], $this->options['password']);
        }

        
$url 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname'];
        
$context stream_context_create([
            
'http' => [
                
'method'        => 'POST',
                
'content'       => $record->formatted,
                
'ignore_errors' => true,
                
'max_redirects' => 0,
                
'header'        => 'Content-type: application/json',
            ],
        ]);

        if (
false === @file_get_contents($urlfalse$context)) {
            throw new 
\RuntimeException(sprintf('Could not connect to %s'$url));
        }
    }

    
/**
     * @inheritDoc
     */
    
protected function getDefaultFormatter(): FormatterInterface
    
{
        return new 
JsonFormatter(JsonFormatter::BATCH_MODE_JSONfalse);
    }
}

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