Exploit databaseDownload repository ZIP
GH-7feacea856188eafd49a6762828c436f
chocapikk/cve-2023-35885
Sources for CVE-2023-35885
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files43
chocapikk/cve-2023-35885Revision 78ece7c3f53e
- ↑..Parent directory
- AnnouncementCheckCommand.php
- AppGetConfigValueCommand.php
- AppSetConfigValueCommand.php
- AwsImageCreateCommand.php
- CloudPanelDeleteSitesCommand.php
- CloudPanelDisableBasicAuthCommand.php
- CloudPanelEnableBasicAuthCommand.php
- CloudPanelSetReleaseChannelCommand.php
- CloudflareUpdateIpsCommand.php
- Command.php
- DatabaseAddCommand.php
- DatabaseBackupCommand.php
- DatabaseDeleteCommand.php
- DatabaseExportCommand.php
- DatabaseImportCommand.php
- DatabaseShowMasterCredentialsCommand.php
- DoSnapshotCreateCommand.php
- GceSnapshotCreateCommand.php
- HetznerSnapshotCreateCommand.php
- LetsEncryptInstallCertificateCommand.php
- LetsEncryptRenewCertificatesCommand.php
- LetsEncryptRenewCustomDomainCertificateCommand.php
- ListCommand.php
- MonitoringDataCleanCommand.php
- RemoteBackupCreateCommand.php
- SiteAddNodejsCommand.php
- SiteAddPhpCommand.php
- SiteAddPythonCommand.php
- SiteAddReverseProxyCommand.php
- SiteAddStaticCommand.php
- SiteCommand.php
- SiteDeleteCommand.php
- SystemPermissionsResetCommand.php
- TestCommand.php
- UserDisableMfaCommand.php
- UserResetPasswordCommand.php
- VarnishCachePurgeCommand.php
- VhostTemplateAddCommand.php
- VhostTemplateDeleteCommand.php
- VhostTemplateViewCommand.php
- VhostTemplatesImportCommand.php
- VhostTemplatesListCommand.php
- VultrSnapshotCreateCommand.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/Command/AnnouncementCheckCommand.php
PHP · 4,977 bytes<?php
namespace App\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use App\Command\Command as BaseCommand; use GuzzleHttp\Client as HttpClient; use GuzzleHttp\Psr7\Request; class AnnouncementCheckCommand extends BaseCommand { const HTTP_CLIENT_TIMEOUT = 15; const ANNOUNCEMENT_REQUEST_URL = "\x68\x74\x74\160\x73\72\57\57\141\x6e\x6e\157\x75\x6e\x63\145\155\145\x6e\164\56\143\154\157\x75\x64\x70\x61\156\145\x6c\56\x69\x6f\57"; private ?HttpClient $httpClient = null; protected function configure() : void { $this->setName("\141\156\x6e\x6f\165\x6e\x63\145\155\x65\156\164\x3a\143\150\x65\143\x6b"); $this->setDescription("\143\x6c\160\143\x74\x6c\40\141\x6e\x6e\157\x75\x6e\x63\x65\155\x65\x6e\x74\72\x63\150\x65\x63\153"); } protected function execute(InputInterface $input, OutputInterface $output) : int { try { goto D5b4d; d45ce: $this->checkAnnouncement(); goto Cfb54; D5b4d: $randomNumber = rand(1, 180); goto d69a3; d69a3: sleep($randomNumber); goto d45ce; Cfb54: return BaseCommand::SUCCESS; goto f8ff0; f8ff0: } catch (\Exception $e) { goto b423c; b423c: $logger = $this->getLogger(); goto Cf5a1; E4062: $output->writeln(sprintf("\x3c\145\x72\x72\157\162\x3e\101\156\40\145\x72\x72\x6f\162\40\150\141\x73\40\157\143\143\165\x72\x72\x65\144\x3a\40\x22\45\163\42\x3c\57\145\x72\162\x6f\162\76", $errorMessage)); goto F2cf1; c32ed: $errorMessage = $e->getMessage(); goto E4062; F2cf1: return BaseCommand::FAILURE; goto Ef048; Cf5a1: $logger->exception($e); goto c32ed; Ef048: } } private function checkAnnouncement() : void { goto b2977; b2977: $httpClient = $this->getHttpClient(); goto B50ac; E1424: $this->saveAnnouncement($responseData); goto Fefe9; B5202: $responseData = trim((string) $response->getBody()); goto cbe65; Fefe9: b0d3a: goto D7729; Aeea0: if (!(200 == $responseStatusCode)) { goto dbdef; } goto B5202; F6a08: if (!(false === empty($responseData) && true === is_array($responseData))) { goto b0d3a; } goto E1424; D7729: dbdef: goto E24da; Aa954: $responseStatusCode = $response->getStatusCode(); goto Aeea0; C4e7a: $response = $this->retry(function () use($httpClient, $request) { $response = $httpClient->send($request); return $response; }, 1, 3); goto Aa954; B50ac: $request = new Request("\x47\105\124", self::ANNOUNCEMENT_REQUEST_URL); goto C4e7a; cbe65: $responseData = json_decode($responseData, true); goto F6a08; E24da: } private function saveAnnouncement(array $announcement) : void { goto Bec08; dae90: $hash = md5(implode("\x7c", [$subject, $url])); goto F96a4; b077c: d8aac: goto f4ba1; f4ba1: be247: goto B7bcb; Ee45d: ebcb1: goto b077c; e2e2b: $existingAnnouncement = $announcementManager->findOneByHash($hash); goto Ae473; Ae473: if (!(true === is_null($existingAnnouncement))) { goto d8aac; } goto E65d3; Df271: if (!(false === empty($createdAt) && false === empty($subject) && false === empty($url))) { goto be247; } goto dae90; Bec08: $createdAt = true === isset($announcement["\x63\x72\x65\141\x74\145\x64\x5f\x61\164"]) ? trim($announcement["\143\x72\x65\141\x74\x65\x64\x5f\141\164"]) : ''; goto a8103; F4d51: foreach ($users as $user) { goto d94fe; e1ea3: D9ce1: goto cd033; Fe41f: $announcement->setSubject($subject); goto e67ed; d94fe: $announcement = $announcementManager->createEntity(); goto f384e; e67ed: $announcement->setUrl($url); goto E3fe6; E3fe6: $announcementManager->updateEntity($announcement); goto e1ea3; f384e: $announcement->setCreatedAt($createdAt); goto B99c9; B99c9: $announcement->setUser($user); goto Fe41f; cd033: } goto Ee45d; e9571: $createdAt = new \DateTime($createdAt); goto F4d51; E65d3: $userManager = $container->get("\x41\x70\x70\x5c\105\156\164\151\164\171\134\115\141\156\141\147\145\162\x5c\125\x73\145\x72\115\x61\x6e\141\147\145\162"); goto c8ce7; Ade21: $url = true === isset($announcement["\x75\162\154"]) ? trim($announcement["\x75\x72\154"]) : ''; goto Df271; Cd037: $announcementManager = $container->get("\101\x70\160\134\105\156\x74\151\164\x79\x5c\x4d\141\156\x61\x67\145\x72\134\x41\x6e\156\x6f\165\156\x63\145\155\145\156\x74\x4d\141\156\141\147\145\x72"); goto e2e2b; c8ce7: $users = $userManager->findAll(); goto e9571; a8103: $subject = true === isset($announcement["\x73\165\x62\x6a\145\143\x74"]) ? trim($announcement["\x73\x75\142\x6a\x65\x63\164"]) : ''; goto Ade21; F96a4: $container = $this->getContainer(); goto Cd037; B7bcb: } private function getHttpClient() : HttpClient { goto a1185; a1185: if (!(true === is_null($this->httpClient))) { goto F6466; } goto Ff235; e9f96: F6466: goto c0c1f; Ff235: $config = ["\x74\x69\x6d\x65\157\165\x74" => self::HTTP_CLIENT_TIMEOUT, "\x76\x65\162\151\146\x79" => false, "\150\145\141\x64\x65\162\x73" => ["\x43\x6f\156\x74\x65\x6e\164\x2d\124\x79\160\x65" => "\141\160\160\x6c\151\143\x61\x74\x69\x6f\x6e\57\x6a\x73\x6f\x6e"]]; goto Db7fa; c0c1f: return $this->httpClient; goto Aec80; Db7fa: $this->httpClient = new HttpClient($config); goto e9f96; Aec80: } }