Exploit databaseDownload source
GH-e89dd91efcc44ff70faeac4eb4987bac
datackmy/fallingskies-cve-2023-35885
Sources for CVE-2023-35885
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files5
datackmy/fallingskies-cve-2023-35885Revision cb3449d9acca
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/Site/Updater/PhpSite.php
PHP · 4,985 bytes<?php
namespace App\Site\Updater; use App\Site\Updater as SiteUpdater; use App\System\Command\ChownCommand; use App\System\Command\ChmodCommand; use App\System\Command\DeleteFileCommand; use App\System\Command\WriteFileCommand; use App\System\Command\ServiceReloadCommand; use App\Site\PhpFpm\Pool; use App\Site\PhpFpm\PoolBuilder; use App\Site\PhpFpm\PoolReader; class PhpSite extends SiteUpdater { public function phpSettings() : void { $this->updateNginxVhost(); $this->reloadNginxService(); } public function reloadPhpFpmService($phpVersion) { goto e48f4; aaa99: $reloadPhpFpmServiceCommand = new ServiceReloadCommand(); goto d81c2; Ad31e: $this->commandExecutor->execute($reloadPhpFpmServiceCommand); goto Ed884; Ed884: F1206: goto D8512; Ac30f: $serviceName = sprintf("\160\150\x70\x25\x73\55\x66\160\x6d", $phpVersion); goto aaa99; e48f4: if (!("\x64\x65\x76" != $_ENV["\101\120\x50\137\105\116\126"])) { goto F1206; } goto Ac30f; d81c2: $reloadPhpFpmServiceCommand->setServiceName($serviceName); goto Ad31e; D8512: } public function changePhpVersion(string $currentPhpVersion, string $newPhpVersion) : void { goto Efefc; Efefc: $domainName = $this->site->getDomainName(); goto d56f9; f7899: $this->commandExecutor->execute($phpFpmPoolFileDeleteCommand); goto C3a54; b6bea: $this->createPhpFpmPool($newPhpVersion); goto C0b00; A3799: $phpFpmPoolFileDeleteCommand->setFile($oldPhpFpmPoolFile); goto f7899; d56f9: $oldPhpFpmPoolFile = sprintf("\57\x65\x74\143\x2f\160\150\x70\57\x25\x73\57\x66\160\155\x2f\160\x6f\157\154\x2e\144\x2f\x25\x73\56\x63\157\156\146", $currentPhpVersion, $domainName); goto Bd11b; C0b00: $this->reloadPhpFpmService($newPhpVersion); goto dbb10; Bd11b: $phpFpmPoolFileDeleteCommand = new DeleteFileCommand(); goto A3799; C3a54: $this->reloadPhpFpmService($currentPhpVersion); goto b6bea; dbb10: } private function createPhpFpmPool(string $phpVersion) : void { goto faa8a; faa8a: $siteUser = $this->site->getUser(); goto cf041; cf041: $phpSettings = $this->site->getPhpSettings(); goto D69c8; eb8f0: $pool->setGroup($siteUser); goto A04a0; D22c8: $poolDirectory = sprintf("\57\x65\x74\x63\57\x70\x68\x70\57\45\x73\x2f\146\x70\155\x2f\160\157\x6f\154\x2e\144\57", $phpVersion); goto f58fd; fe240: usort($pools, function ($a, $b) { return $a->getPort() < $b->getPort(); }); goto E4ba0; Cd1de: $poolContent = $poolBuilder->create($pool); goto Dd163; b91fa: $poolPort = $latestPool->getPort() + 1; goto Bdbda; A32f9: $pool->setName($domainName); goto Fb0cb; a47cc: $poolBuilder = new PoolBuilder(); goto Cd1de; Ff65a: $writePoolFileCommand = new WriteFileCommand(); goto d8e3d; d8e3d: $writePoolFileCommand->setFile($poolFile); goto b9ca4; A46ec: $phpSettings->setPoolPort($poolPort); goto a47cc; Dd163: $poolFile = sprintf("\57\145\x74\x63\x2f\160\150\x70\57\45\x73\x2f\146\x70\x6d\57\160\x6f\157\154\56\144\57\45\163\56\x63\157\x6e\146", $phpVersion, $domainName); goto Ff65a; f58fd: $poolReader = new PoolReader($poolDirectory); goto D702f; b9ca4: $writePoolFileCommand->setContent($poolContent); goto b806b; E4ba0: $latestPool = array_shift($pools); goto b91fa; Fb0cb: $pool->setUser($siteUser); goto eb8f0; A04a0: $pool->setPort($poolPort); goto A46ec; Bdbda: $pool = new Pool(); goto A32f9; D702f: $pools = $poolReader->getPools(); goto fe240; b806b: $this->commandExecutor->execute($writePoolFileCommand); goto D1e6b; D69c8: $domainName = $this->site->getDomainName(); goto D22c8; D1e6b: } public function writeVarnishCacheSettingsFile(array $varnishCacheSettings) : void { goto ef395; C3ba8: $chownVarnishCacheSettingsCommand->setFile($settingsFile); goto Bef19; F1151: $this->commandExecutor->execute($chownVarnishCacheSettingsCommand); goto Bdccf; Bdccf: $this->commandExecutor->execute($chmodVarnishCacheSettingsCommand); goto Fe5b0; dae15: $chmodVarnishCacheSettingsCommand->setChmod(770); goto B2de6; B2de6: $this->commandExecutor->execute($writeVarnishCacheSettingsFileCommand); goto F1151; Bef19: $chownVarnishCacheSettingsCommand->setRecursive(false); goto afae3; E9b9e: $writeVarnishCacheSettingsFileCommand = new WriteFileCommand(); goto c7158; D39c3: $settings = json_encode($varnishCacheSettings, JSON_PRETTY_PRINT); goto E9b9e; Ec4e6: $writeVarnishCacheSettingsFileCommand->setContent($settings); goto ec6f9; c7158: $writeVarnishCacheSettingsFileCommand->setFile($settingsFile); goto Ec4e6; d0f21: $chmodVarnishCacheSettingsCommand = new ChmodCommand(); goto Ff425; Cd633: $chownVarnishCacheSettingsCommand->setGroup($siteUser); goto d0f21; Ff425: $chmodVarnishCacheSettingsCommand->setFile($settingsFile); goto dae15; Cc53e: $settingsFile = sprintf("\x2f\150\x6f\155\145\x2f\45\x73\57\x2e\166\141\162\x6e\151\163\x68\55\x63\x61\143\150\145\x2f\163\145\164\164\151\156\147\163\56\x6a\x73\157\x6e", $siteUser); goto D39c3; afae3: $chownVarnishCacheSettingsCommand->setUser($siteUser); goto Cd633; ef395: $siteUser = $this->site->getUser(); goto Cc53e; ec6f9: $chownVarnishCacheSettingsCommand = new ChownCommand(); goto C3ba8; Fe5b0: } }