!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/composer/composer/src/Composer/Util/   drwxr-xr-x
Free 13.27 GB of 57.97 GB (22.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     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 Composer\Util;

/**
 * @author Wissem Riahi <wissemr@gmail.com>
 */
class Tar
{
    
/**
     * @param string $pathToArchive
     *
     * @return string|null
     */
    
public static function getComposerJson($pathToArchive)
    {
        
$phar = new \PharData($pathToArchive);

        if (!
$phar->valid()) {
            return 
null;
        }

        return 
self::extractComposerJsonFromFolder($phar);
    }

    
/**
     * @param \PharData $phar
     *
     * @throws \RuntimeException
     *
     * @return string
     */
    
private static function extractComposerJsonFromFolder(\PharData $phar)
    {
        if (isset(
$phar['composer.json'])) {
            return 
$phar['composer.json']->getContent();
        }

        
$topLevelPaths = array();
        foreach (
$phar as $folderFile) {
            
$name $folderFile->getBasename();

            if (
$folderFile->isDir()) {
                
$topLevelPaths[$name] = true;
                if (
\count($topLevelPaths) > 1) {
                    throw new 
\RuntimeException('Archive has more than one top level directories, and no composer.json was found on the top level, so it\'s an invalid archive. Top level paths found were: '.implode(','array_keys($topLevelPaths)));
                }
            }
        }

        
$composerJsonPath key($topLevelPaths).'/composer.json';
        if (
$topLevelPaths && isset($phar[$composerJsonPath])) {
            return 
$phar[$composerJsonPath]->getContent();
        }

        throw new 
\RuntimeException('No composer.json found either at the top level or within the topmost directory');
    }
}

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