Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
php /
Composer /
Downloader /
Delete
Unzip
Name
Size
Permission
Date
Action
ArchiveDownloader.php
6.14
KB
-rw-r--r--
2016-11-03 17:43
ChangeReportInterface.php
766
B
-rw-r--r--
2016-11-03 17:43
DownloadManager.php
10.27
KB
-rw-r--r--
2016-11-03 17:43
DownloaderInterface.php
1.74
KB
-rw-r--r--
2016-11-03 17:43
DvcsDownloaderInterface.php
782
B
-rw-r--r--
2016-11-03 17:43
FileDownloader.php
8.94
KB
-rw-r--r--
2016-11-03 17:43
FilesystemException.php
672
B
-rw-r--r--
2016-11-03 17:43
FossilDownloader.php
3.92
KB
-rw-r--r--
2021-05-09 23:44
GitDownloader.php
18.61
KB
-rw-r--r--
2021-05-09 23:44
GzipDownloader.php
2.54
KB
-rw-r--r--
2021-05-09 23:44
HgDownloader.php
3.24
KB
-rw-r--r--
2021-05-09 23:44
PathDownloader.php
5.82
KB
-rw-r--r--
2016-11-03 17:43
PearPackageExtractor.php
11.39
KB
-rw-r--r--
2016-11-03 17:43
PerforceDownloader.php
2.82
KB
-rw-r--r--
2016-11-03 17:43
PharDownloader.php
937
B
-rw-r--r--
2016-11-03 17:43
RarDownloader.php
2.99
KB
-rw-r--r--
2021-05-09 23:44
SvnDownloader.php
6.56
KB
-rw-r--r--
2016-11-03 17:43
TarDownloader.php
697
B
-rw-r--r--
2016-11-03 17:43
TransportException.php
1009
B
-rw-r--r--
2016-11-03 17:43
VcsCapableDownloaderInterface.php
796
B
-rw-r--r--
2016-11-03 17:43
VcsDownloader.php
9.91
KB
-rw-r--r--
2016-11-03 17:43
XzDownloader.php
1.67
KB
-rw-r--r--
2016-11-03 17:43
ZipDownloader.php
4.75
KB
-rw-r--r--
2016-11-03 17:43
Save
Rename
<?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\Downloader; use Composer\Config; use Composer\Cache; use Composer\EventDispatcher\EventDispatcher; use Composer\Package\PackageInterface; use Composer\Util\Platform; use Composer\Util\ProcessExecutor; use Composer\Util\RemoteFilesystem; use Composer\IO\IOInterface; use Symfony\Component\Process\ExecutableFinder; use ZipArchive; /** * @author Jordi Boggiano <j.boggiano@seld.be> */ class ZipDownloader extends ArchiveDownloader { protected $process; protected static $hasSystemUnzip; public function __construct(IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, Cache $cache = null, ProcessExecutor $process = null, RemoteFilesystem $rfs = null) { $this->process = $process ?: new ProcessExecutor($io); parent::__construct($io, $config, $eventDispatcher, $cache, $rfs); } /** * {@inheritDoc} */ public function download(PackageInterface $package, $path) { if (null === self::$hasSystemUnzip) { $finder = new ExecutableFinder; self::$hasSystemUnzip = (bool) $finder->find('unzip'); } if (!class_exists('ZipArchive') && !self::$hasSystemUnzip) { // php.ini path is added to the error message to help users find the correct file $iniPath = php_ini_loaded_file(); if ($iniPath) { $iniMessage = 'The php.ini used by your command-line PHP is: ' . $iniPath; } else { $iniMessage = 'A php.ini file does not exist. You will have to create one.'; } $error = "The zip extension and unzip command are both missing, skipping.\n" . $iniMessage; throw new \RuntimeException($error); } return parent::download($package, $path); } protected function extract($file, $path) { $processError = null; if (self::$hasSystemUnzip && !(class_exists('ZipArchive') && Platform::isWindows())) { $command = 'unzip '.ProcessExecutor::escape($file).' -d '.ProcessExecutor::escape($path); if (!Platform::isWindows()) { $command .= ' && chmod -R u+w ' . ProcessExecutor::escape($path); } try { if (0 === $this->process->execute($command, $ignoredOutput)) { return; } $processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput(); } catch (\Exception $e) { $processError = 'Failed to execute ' . $command . "\n\n" . $e->getMessage(); } if (!class_exists('ZipArchive')) { throw new \RuntimeException($processError); } } $zipArchive = new ZipArchive(); if (true !== ($retval = $zipArchive->open($file))) { throw new \UnexpectedValueException(rtrim($this->getErrorMessage($retval, $file)."\n".$processError), $retval); } if (true !== $zipArchive->extractTo($path)) { throw new \RuntimeException(rtrim("There was an error extracting the ZIP file, it is either corrupted or using an invalid format.\n".$processError)); } $zipArchive->close(); } /** * Give a meaningful error message to the user. * * @param int $retval * @param string $file * @return string */ protected function getErrorMessage($retval, $file) { switch ($retval) { case ZipArchive::ER_EXISTS: return sprintf("File '%s' already exists.", $file); case ZipArchive::ER_INCONS: return sprintf("Zip archive '%s' is inconsistent.", $file); case ZipArchive::ER_INVAL: return sprintf("Invalid argument (%s)", $file); case ZipArchive::ER_MEMORY: return sprintf("Malloc failure (%s)", $file); case ZipArchive::ER_NOENT: return sprintf("No such zip file: '%s'", $file); case ZipArchive::ER_NOZIP: return sprintf("'%s' is not a zip archive.", $file); case ZipArchive::ER_OPEN: return sprintf("Can't open zip file: %s", $file); case ZipArchive::ER_READ: return sprintf("Zip read error (%s)", $file); case ZipArchive::ER_SEEK: return sprintf("Zip seek error (%s)", $file); default: return sprintf("'%s' is not a valid zip archive, got error code: %s", $file, $retval); } } }