!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/laravel-crm/vendor/doctrine/dbal/src/Driver/PgSQL/   drwxrwxrwx
Free 12.99 GB of 57.97 GB (22.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Doctrine\DBAL\Driver\PgSQL;

use 
Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
use 
ErrorException;
use 
SensitiveParameter;

use function 
addslashes;
use function 
array_filter;
use function 
array_keys;
use function 
array_map;
use function 
array_slice;
use function 
array_values;
use function 
func_get_args;
use function 
implode;
use function 
pg_connect;
use function 
preg_match;
use function 
restore_error_handler;
use function 
set_error_handler;
use function 
sprintf;

use const 
PGSQL_CONNECT_FORCE_NEW;

final class 
Driver extends AbstractPostgreSQLDriver
{
    
/** {@inheritDoc} */
    
public function connect(
        #[
SensitiveParameter]
        array 
$params
    
): Connection {
        
set_error_handler(
            static function (
int $severitystring $message) {
                throw new 
ErrorException($message0$severity, ...array_slice(func_get_args(), 22));
            },
        );

        try {
            
$connection pg_connect($this->constructConnectionString($params), PGSQL_CONNECT_FORCE_NEW);
        } catch (
ErrorException $e) {
            throw new 
Exception($e->getMessage(), '08006'0$e);
        } finally {
            
restore_error_handler();
        }

        if (
$connection === false) {
            throw new 
Exception('Unable to connect to Postgres server.');
        }

        
$driverConnection = new Connection($connection);

        if (isset(
$params['application_name'])) {
            
$driverConnection->exec('SET application_name = ' $driverConnection->quote($params['application_name']));
        }

        return 
$driverConnection;
    }

    
/**
     * Constructs the Postgres connection string
     *
     * @param array<string, mixed> $params
     */
    
private function constructConnectionString(
        #[
SensitiveParameter]
        array 
$params
    
): string {
        
// pg_connect used by Doctrine DBAL does not support [...] notation,
        // but requires the host address in plain form like `aa:bb:99...`
        
$matches = [];
        if (isset(
$params['host']) && preg_match('/^\[(.+)\]$/'$params['host'], $matches) === 1) {
            
$params['hostaddr'] = $matches[1];
            unset(
$params['host']);
        }

        
$components array_filter(
            [
                
'host' => $params['host'] ?? null,
                
'hostaddr' => $params['hostaddr'] ?? null,
                
'port' => $params['port'] ?? null,
                
'dbname' => $params['dbname'] ?? 'postgres',
                
'user' => $params['user'] ?? null,
                
'password' => $params['password'] ?? null,
                
'sslmode' => $params['sslmode'] ?? null,
                
'gssencmode' => $params['gssencmode'] ?? null,
            ],
            static fn (
$value) => $value !== '' && $value !== null,
        );

        return 
implode(' 'array_map(
            static fn (
$valuestring $key) => sprintf("%s='%s'"$keyaddslashes($value)),
            
array_values($components),
            
array_keys($components),
        ));
    }
}

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