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/DatabaseImportCommand.php
PHP · 5,313 bytes<?php
namespace App\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use App\Command\Command as BaseCommand; use App\Entity\Manager\SiteManager as SiteEntityManager; use App\Entity\Manager\DatabaseManager as DatabaseEntityManager; use App\Entity\Manager\DatabaseServerManager as DatabaseServerEntityManager; use App\Database\Importer as DatabaseImporter; use App\System\Command\CheckIfFileExistsCommand; use App\System\CommandExecutor; class DatabaseImportCommand extends BaseCommand { const SYSTEM_USER_ROOT = "\x72\x6f\157\x74"; private SiteEntityManager $siteEntityManager; private DatabaseEntityManager $databaseEntityManager; private DatabaseServerEntityManager $databaseServerEntityManager; private CommandExecutor $commandExecutor; public function __construct(SiteEntityManager $siteEntityManager, DatabaseEntityManager $databaseEntityManager, DatabaseServerEntityManager $databaseServerEntityManager) { goto da010; f46bb: $this->databaseEntityManager = $databaseEntityManager; goto C34af; Ccc3d: $this->commandExecutor = new CommandExecutor(); goto a13ee; C34af: $this->databaseServerEntityManager = $databaseServerEntityManager; goto Ccc3d; da010: $this->siteEntityManager = $siteEntityManager; goto f46bb; a13ee: parent::__construct(); goto D0c44; D0c44: } protected function configure() : void { goto e7516; c9bcf: $this->addOption("\146\151\x6c\145", null, InputOption::VALUE_REQUIRED); goto ea4bd; e0502: $this->setDescription("\143\x6c\x70\x63\x74\154\40\x64\x62\72\151\155\x70\157\x72\164\40\x2d\x2d\144\x61\164\x61\x62\x61\163\x65\x4e\x61\x6d\x65\75\x6d\171\x2d\144\141\164\141\142\141\x73\145\x20\55\x2d\146\x69\154\x65\x3d\144\165\x6d\x70\56\163\x71\154\56\147\172"); goto ee504; ee504: $this->addOption("\x64\141\164\x61\x62\141\x73\145\x4e\141\x6d\145", null, InputOption::VALUE_REQUIRED); goto c9bcf; e7516: $this->setName("\144\x62\72\x69\155\x70\x6f\x72\x74"); goto e0502; ea4bd: } protected function execute(InputInterface $input, OutputInterface $output) : int { try { goto f0971; C958f: if (!(false === str_contains($importFile, "\57"))) { goto bf41b; } goto b64b2; B6929: $databaseImporter->import($importFile); goto ab506; b64b2: $importFile = sprintf("\45\163\57\45\x73", rtrim(getcwd(), "\x2f"), $importFile); goto D678d; cc1c0: C3906: goto Ed327; E6c95: $isSuperUser = self::SYSTEM_USER_ROOT == $systemUserName; goto a4522; D678d: bf41b: goto F6d4d; a6a1a: $systemUserName = $_SERVER["\123\x55\104\117\137\x55\123\105\x52"] ?? ''; goto B8700; Ed327: return BaseCommand::FAILURE; goto Ba543; ae460: $importFile = $input->getOption("\x66\151\x6c\145"); goto a6a1a; eba95: return BaseCommand::SUCCESS; goto A0729; B8700: if (!("\x64\145\x76" == $_ENV["\x41\x50\120\137\105\x4e\126"])) { goto d904c; } goto B196a; A92f7: throw new \Exception(sprintf("\104\141\164\x61\x62\141\163\145\x20\x22\x25\163\42\40\x64\157\145\163\x20\156\157\164\x20\x65\170\151\163\164\56", $databaseName)); goto fd3c6; f0971: $this->validateInput($input); goto ed061; F852a: if (!(true === $isSuperUser || $siteEntity === $databaseEntity->getSite())) { goto b7d2c; } goto a5229; Ad786: $userBelongsToASite = false === is_null($siteEntity); goto E6c95; ab506: $output->writeln(sprintf("\x3c\151\156\x66\x6f\76\x49\x6d\160\157\x72\164\x20\x69\x6e\x74\157\x20\x64\141\164\141\142\141\x73\145\74\57\151\156\146\157\x3e\x20\74\143\157\155\155\x65\156\164\x3e\x25\x73\x3c\x2f\143\157\x6d\155\x65\156\x74\76\x20\x3c\151\156\146\157\x3e\167\x61\163\x20\163\165\x63\x63\x65\x73\x73\x66\x75\154\x2e\74\x2f\x69\x6e\146\157\76", $databaseName)); goto eba95; Bbe19: $siteEntity = $this->siteEntityManager->findOneByUser($systemUserName); goto Ad786; A0729: b7d2c: goto b1513; b1513: Fd6a0: goto cc1c0; F4a14: b0aa8: goto F852a; a5229: $databaseImporter = new DatabaseImporter($databaseEntity); goto B6929; fd3c6: goto Fd6a0; goto F4a14; a4522: $userIsAllowedToExport = true === $isSuperUser || true === $userBelongsToASite; goto a0b16; a0b16: if (!(true === $userIsAllowedToExport)) { goto C3906; } goto e1f7b; B196a: $systemUserName = self::SYSTEM_USER_ROOT; goto eed65; e1f7b: $databaseEntity = $this->databaseEntityManager->findOneByName($databaseName); goto fb5dc; eed65: d904c: goto C958f; ed061: $databaseName = $input->getOption("\144\141\164\x61\142\x61\163\145\x4e\x61\x6d\x65"); goto ae460; fb5dc: if (false === is_null($databaseEntity)) { goto b0aa8; } goto A92f7; F6d4d: $this->checkIfFileExists($importFile); goto Bbe19; Ba543: } catch (\Exception $e) { goto f8805; cf951: return BaseCommand::FAILURE; goto cd5f5; Aca5f: $output->writeln(sprintf("\74\145\162\162\x6f\x72\76\x25\x73\x3c\x2f\x65\x72\x72\157\x72\x3e", $errorMessage)); goto cf951; f8805: $errorMessage = $e->getMessage(); goto Aca5f; cd5f5: } } private function checkIfFileExists(string $importFile) { try { goto E4793; E4793: $checkIfFileExistsCommand = new CheckIfFileExistsCommand(); goto B16a8; D11f9: $this->commandExecutor->execute($checkIfFileExistsCommand); goto Aadb0; B16a8: $checkIfFileExistsCommand->setFile($importFile); goto D11f9; Aadb0: } catch (\Exception $e) { throw new \Exception(sprintf("\106\151\x6c\x65\40\x22\45\163\42\x20\x64\x6f\145\x73\40\156\x6f\x74\x20\145\x78\151\163\164\x2e", $importFile)); } } }