!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)

/uploads/script/vendor/enlightn/security-checker/src/   drwxr-xr-x
Free 13.23 GB of 57.97 GB (22.83%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Enlightn\SecurityChecker;

class 
AdvisoryAnalyzer
{
    
/**
     * @var array
     */
    
private $advisories;

    public function 
__construct($advisories)
    {
        
$this->advisories $advisories;
    }

    
/**
     * Returns an array of vulnerabilities for the given package and version.
     *
     * @param string $package
     * @param string $version
     * @param string|null|int $time
     * @return array
     */
    
public function analyzeDependency($package$version$time null)
    {
        if (! isset(
$this->advisories[$package])) {
            return [];
        }

        
$vulnerabilities = [];

        if (
is_string($time)) {
            
$time strtotime($time) ?: null;
        }

        foreach (
$this->advisories[$package] as $advisory) {
            
$packageBranchName $this->normalizeVersion($version);

            foreach (
$advisory['branches'] as $branch => $versionInfo) {
                if (
$this->isDevPackage($version)) {
                    
$branchName preg_replace('/.x$/'''$branch);

                    if (
$branchName !== $packageBranchName) {
                        continue;
                    }

                    if (
is_null($time) || is_null($versionInfo['time']) || $time $versionInfo['time']) {
                        continue;
                    }
                } else {
                    
$passed false;

                    foreach (
$versionInfo['versions'] as $versionConstraint) {
                        
$constrainedVersion str_replace(['>''<''='], ''$versionConstraint);
                        
$operator str_replace($constrainedVersion''$versionConstraint) ?: '=';

                        if (
version_compare($version$constrainedVersion$operator)) {
                            continue;
                        } else {
                            
$passed true;

                            break;
                        }
                    }

                    if (
$passed) {
                        continue;
                    }
                }

                
$vulnerabilities[] = [
                    
'title' => isset($advisory['title']) ? $advisory['title'] : null,
                    
'link' => isset($advisory['link']) ? $advisory['link'] : null,
                    
'cve' => isset($advisory['cve']) ? $advisory['cve'] : null,
                ];
            }
        }

        return 
$vulnerabilities;
    }

    public function 
analyzeDependencies($dependencies)
    {
        
$vulnerabilities = [];

        foreach (
$dependencies as $package => $versionInfo) {
            
$advisories $this->analyzeDependency($package$versionInfo['version'], $versionInfo['time']);

            if (! empty(
$advisories)) {
                
$vulnerabilities[$package] = [
                    
'version' => $versionInfo['version'],
                    
'time' => $versionInfo['time'],
                    
'advisories' => $advisories,
                ];
            }
        }

        return 
$vulnerabilities;
    }

    protected function 
normalizeVersion($version)
    {
        return 
preg_replace(['/-dev$/''/^dev-/'], ''$version);
    }

    protected function 
isDevPackage($version)
    {
        return ! 
is_null(preg_filter(['/-dev$/''/^dev-/'], ''$version));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0064 ]--