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/GceSnapshotCreateCommand.php
PHP · 5,365 bytes<?php
namespace App\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputOption; use App\Command\Command as BaseCommand; use App\CloudPanel\Environment as CloudPanelEnvironment; use App\Entity\Notification; use App\Gce\Snapshot; use App\Notification\NotificationQueue; class GceSnapshotCreateCommand extends BaseCommand { protected function configure() : void { goto e22c8; A8c2c: $this->addOption("\146\x72\x65\161\165\145\156\x63\171", null, InputOption::VALUE_REQUIRED); goto F04f1; f064a: $this->setDescription("\x63\154\160\143\x74\154\x20\x67\x63\145\x3a\x73\x6e\141\160\x73\150\x6f\x74\72\x63\x72\x65\141\x74\x65\40\55\55\x66\162\145\x71\165\145\156\143\x79\x3d\x33"); goto A8c2c; e22c8: $this->setName("\x67\x63\145\x3a\163\x6e\141\160\x73\x68\157\x74\x3a\x63\x72\145\x61\164\145"); goto f064a; F04f1: } protected function execute(InputInterface $input, OutputInterface $output) : int { try { goto C8c21; C2688: E0625: goto F2223; F2223: cd29e: goto F4687; d7b30: $frequency = (int) $input->getOption("\x66\162\145\161\165\x65\156\143\x79"); goto C7a13; C7a13: $cloud = $this->getConfigValue("\143\154\x6f\x75\x64"); goto A801f; F4687: return BaseCommand::SUCCESS; goto e62e4; a0bcf: $serviceAccountKeys = $this->getConfigValue("\x67\x63\x65\137\x73\x65\162\166\151\143\x65\137\x61\143\x63\x6f\x75\x6e\164\137\153\x65\x79\x73"); goto d8c7c; d8c7c: $snapshotsFrequency = (int) $this->getConfigValue("\147\x63\x65\137\163\x6e\x61\160\x73\x68\x6f\164\163\137\x66\162\145\161\165\145\156\143\x79"); goto Ef7e5; A801f: $automaticSnapshots = (bool) $this->getConfigValue("\x67\143\145\x5f\141\x75\x74\x6f\x6d\141\164\x69\x63\137\163\156\141\160\x73\150\157\164\163"); goto a0bcf; E27b4: $this->cleanSnapshots(); goto C2688; ff669: $snapshotsCreated = $this->createSnapshots(); goto Ade25; Ade25: if (!(true === $snapshotsCreated)) { goto E0625; } goto E27b4; C8c21: $this->validateInput($input); goto d7b30; Ef7e5: if (!(CloudPanelEnvironment::CLOUD_PROVIDER_GCE == $cloud && true === $automaticSnapshots && false === empty($serviceAccountKeys) && $snapshotsFrequency == $frequency)) { goto cd29e; } goto ff669; e62e4: } catch (\Exception $e) { goto C23b4; F420a: return BaseCommand::FAILURE; goto c397c; Ece55: $output->writeln(sprintf("\x3c\145\x72\162\x6f\x72\76\45\163\x3c\57\145\162\x72\157\x72\x3e", $errorMessage)); goto F420a; C23b4: $errorMessage = $e->getMessage(); goto Ece55; c397c: } } private function createSnapshots() : bool { try { goto Bb0e6; e2645: $instance = $gceClient->getInstance(); goto da3ec; da3ec: $instanceName = $instance->getName(); goto add75; Bb0e6: $instance = $this->getInstance(); goto Ffe6e; c8bf1: return true; goto Bd27c; Ffe6e: $gceClient = $instance->getGceClient(); goto e2645; add75: $gceClient->createDiskSnapshots($instanceName, Snapshot::TYPE_AUTOMATED); goto c8bf1; Bd27c: } catch (\Exception $e) { $errorMessage = $e->getMessage(); $this->addNotification("\103\162\x65\141\164\x69\156\x67\x20\141\x20\123\x6e\141\x70\163\150\x6f\x74\x20\x66\x61\x69\x6c\145\x64", $errorMessage); } return false; } private function cleanSnapshots() : void { try { goto c0d8a; Fa3f8: $snapshotDeleteDateTime->modify("\53\x35\40\155\151\156\x75\x74\145\163"); goto f6bbb; C1b32: E23f5: goto c70ea; c0d8a: $instance = $this->getInstance(); goto f5eb6; bad9f: $snapshotDeleteDateTime->modify(sprintf("\55\x25\x73\x20\144\x61\x79\163", $backupRetentionPeriod)); goto Fa3f8; D72c8: C0c51: goto C1b32; ac88c: if (!(false === empty($snapshots))) { goto E23f5; } goto Efb3c; C85f9: foreach ($snapshots as $snapshot) { goto a9945; f363c: if (!($createdAt < $snapshotDeleteDateTime)) { goto Af812; } goto c3423; D1868: $createdAt = $snapshot->getCreatedAt(); goto f363c; c9e02: if (!(Snapshot::STATUS_READY == $status && Snapshot::TYPE_AUTOMATED == $type)) { goto af77a; } goto D1868; c8e9a: Af812: goto E2da1; a635e: $type = $snapshot->getType(); goto c9e02; E152f: $status = $snapshot->getStatus(); goto a635e; a9945: $id = $snapshot->getId(); goto E152f; E2da1: af77a: goto b2330; c3423: $gceClient->deleteSnapshot($id); goto c8e9a; b2330: Fd126: goto Bac55; Bac55: } goto D72c8; f5eb6: $gceClient = $instance->getGceClient(); goto Bded6; C5176: $snapshotDeleteDateTime = clone $dateTime; goto bad9f; f6bbb: $snapshotDeleteDateTime->setTimezone(new \DateTimeZone("\125\x54\x43")); goto C85f9; D71a1: $dateTime = new \DateTime(); goto C5176; Efb3c: $backupRetentionPeriod = (int) $this->getConfigValue("\x67\143\x65\137\x73\x6e\141\x70\x73\150\157\x74\163\x5f\162\145\x74\145\156\x74\x69\157\x6e\x5f\160\x65\x72\151\x6f\144"); goto D71a1; Bded6: $snapshots = $gceClient->getSnapshots(); goto ac88c; c70ea: } catch (\Exception $e) { $errorMessage = $e->getMessage(); $this->addNotification("\103\x6c\x65\x61\156\x69\156\147\40\x53\x6e\x61\160\x73\150\x6f\164\163\x20\x66\x61\x69\x6c\145\x64", $errorMessage); } } private function addNotification(string $subject, string $errorMessage) : void { goto Ce6fa; febd0: NotificationQueue::addNotification($notification); goto F140a; e1656: $notification->setMessage($errorMessage); goto Bda6d; Ef4cd: $notification->setSubject($subject); goto e1656; Ce6fa: $notification = new Notification(); goto Ef4cd; Bda6d: $notification->setSeverity(Notification::SEVERITY_CRITICAL); goto febd0; F140a: } }