Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
private function createPhpSite(string $domainName, string $rootDirectory, string $phpVersi..
Decoded Output download
<? private function createPhpSite(string $domainName, string $rootDirectory, string $phpVersion, string $vhostTemplateName, string $siteUser, string $siteUserPassword, array $varnishCacheSettings = []): SiteEntity
{
goto ec400;
C6686:
$siteEntity->setUser($siteUser);
goto F396d;
d41d2:
$phpSiteCreator->resetPermissions();
goto bfd8b;
Fc453:
$siteEntity->setCertificate($certificateEntity);
goto a50d3;
cfcdb: C4c8c:
goto C83f5;
bfd8b:
$vhostTemplate = new PhpVhostTemplate($phpSite);
goto a1cd6;
D6cd7:
$siteEntity->setVhostTemplate($vhostTemplate);
goto ef610;
a9b75:
$defaultVarnishCacheSettings = ["enabled" => false, "server" => self::VARNISH_CACHE_SERVER, "cacheTagPrefix" => substr(md5(time()), 0, 4)];
goto b6602;
e414e:
$phpSite->setDomainName($domainName);
goto Fdf1e;
b650c:
$vhostTemplate->addProcessor(new RedirectServerNameProcessor());
goto F57d6;
E9bc5:
$phpSite->setPhpSettings($phpSettingsEntity);
goto e9259;
E9e15:
$resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName);
goto e9258;
c0663:
$phpSite->setUser($siteEntity->getUser());
goto d0900;
f9dc1:
$siteEntity->setRootDirectory($rootDirectory);
goto e5e16;
E9dc6:
if (!(true === is_null($subdomain))) {
goto e2a4b;
}
goto C44da;
Ac826:
$constraintViolationList->addAll($phpSettingsConstraints);
goto F3002;
e473c:
$csr = $csrGenerator->generate();
goto a232d;
c0046:
$phpSiteCreator->createVarnishCacheStructure($varnishCacheSettings);
goto C8d0a;
Ad389:
$rsaKeyGenerator = new RsaKeyGenerator();
goto ce1be;
B2172:
$phpSite->setSubdomain($subdomain);
goto Cdd9f;
E1450:
$phpSiteCreator->createNginxVhost();
goto c5034;
C84af:
$phpSiteCreator->createIndexPhp();
goto cb346;
a1cd6:
$vhostTemplate->setContent($siteEntity->getVhostTemplate());
goto d693d;
B4aeb:
if (!(false === is_null($subdomain) && "www" == $subdomain)) {
goto af8cd;
}
goto C18c5;
A933b:
$phpSiteCreator->createLogrotateFile();
goto C84af;
E7a7c:
$certificateEntity->setSite($siteEntity);
goto Ad389;
d76c4:
$certificateEntity->setPrivateKey($privateKey->getPEM());
goto Ea024;
E9fed:
$siteEntity->setType(SiteEntity::TYPE_PHP);
goto C5768;
F0fc8:
$constraintViolationList = new ConstraintViolationList();
goto Ecd51;
f61fc:
$phpSettingsConstraints = $this->validator->validate($phpSettingsEntity);
goto A686c;
C44da:
$subjectAlternativeNames[] = sprintf("www.%s", $domainName);
goto Ba736;
b3609:
$phpSiteCreator->reloadPhpFpmService();
goto E38a0;
cf52c:
$siteEntity->setVarnishCache(true);
goto cfcdb;
E38a0:
if (!(true === $varnishCache)) {
goto ebdc2;
}
goto E3cf1;
e9258:
$registrableDomain = $resolvedDomainName->registrableDomain()->toString();
goto d51e3;
b848a:
$vhostTemplate->addProcessor(new ServerNameProcessor());
goto b650c;
Eeea3:
$vhostTemplateEntity = $this->getVhostTemplateEntity($vhostTemplateName);
goto B5a7e;
F3002:
$errorMessages = $this->getConstraintViolationListErrorMessages($constraintViolationList);
goto f8d1b;
D9fe9:
$phpSiteCreator->createPhpFpmPool();
goto b3609;
bbbfb:
$certificateEntity->setDefaultCertificate(true);
goto F10f1;
E7466:
$phpSiteCreator->createRootDirectory();
goto A933b;
Ecd51:
$constraintViolationList->addAll($siteConstraints);
goto Ac826;
C7b2e:
$siteEntity = $this->siteEntityManager->createEntity();
goto E9fed;
be554:
$this->siteEntityManager->updateEntity($siteEntity);
goto E024f;
Fb1cf:
$siteEntity->setVhostTemplate($vhostTemplate->getContent());
goto C8369;
C8d0a:
$phpSite->setVarnishCacheSettings($varnishCacheSettings);
goto f6162;
B1407:
$rootDirectory = trim(rtrim(ltrim($rootDirectory, "/")), "/");
goto E9e15;
cb346:
$phpSiteCreator->createPrivateKeyAndCertificate();
goto D9fe9;
d693d:
$vhostTemplate->resetProcessors();
goto b848a;
E08a3:
$siteConstraints = $this->validator->validate($siteEntity);
goto f61fc;
Fdf1e:
$phpSite->setRegistrableDomain($registrableDomain);
goto B2172;
b5485: Dc90c:
goto D6cd7;
B8044:
if (!(false === empty($redirectionVhostTemplate))) {
goto a525a;
}
goto d685a;
E05f6:
$vhostTemplate->build();
goto Fb1cf;
d0900:
$phpSite->setUserPassword($siteEntity->getUserPassword());
goto e414e;
F5e1d:
$phpSite->setCertificate($certificateEntity);
goto E9bc5;
bf7ee:
$csrGenerator = new CsrGenerator($privateKey, $distinguishedName);
goto e473c;
C9ce8: af8cd:
goto E1698;
c5034:
$phpSiteCreator->reloadNginxService();
goto d41d2;
D8f2c:
$certificateEntity = $this->certificateEntityManager->createEntity();
goto E7a7c;
e9259:
$phpSite->setVhostTemplate($siteEntity->getVhostTemplate());
goto B0e54;
E3cf1:
$phpSite->setVarnishCache(true);
goto a9b75;
d5ea2:
$redirectionVhostTemplateFile = realpath(dirname(__FILE__) . "/../../../resources/nginx/vhost_template/redirect");
goto c4676;
a50d3:
$phpSite = new PhpSite();
goto c0663;
Ea024:
$certificateEntity->setCertificate($selfSignedCertificate);
goto Fc453;
b38cf:
$subjectAlternativeNames = [];
goto E9dc6;
c54a5:
$siteEntity->setPhpSettings($phpSettingsEntity);
goto C115b;
A686c:
if (!(count($siteConstraints) || count($phpSettingsConstraints))) {
goto B7409;
}
goto F0fc8;
C8369:
$siteEntity->setApplication($vhostTemplateEntity->getName());
goto be554;
eb099:
$phpSettingsEntity->setSite($siteEntity);
goto E08a3;
c4676:
$redirectionVhostTemplate = file_get_contents($redirectionVhostTemplateFile);
goto B8044;
f8d1b:
throw new \Exception(implode("; ", $errorMessages));
goto aa60c;
C61e7:
$subdomain = false === empty($subdomain) ? $subdomain : null;
goto Eeea3;
a232d:
$selfSignedCertificate = Openssl::createSelfSignedCertificate($privateKey, $csr);
goto bbbfb;
Ba736: e2a4b:
goto B4aeb;
ef610:
$phpSettingsEntity = new PhpSettingsEntity();
goto c54a5;
ce1be:
$privateKey = $rsaKeyGenerator->generatePrivateKey();
goto b38cf;
E1698:
$distinguishedName = new DistinguishedName($domainName, $subjectAlternativeNames);
goto bf7ee;
C83f5:
if (!(true === is_null($subdomain) || "www" == $subdomain)) {
goto Dc90c;
}
goto d5ea2;
C5768:
$siteEntity->setDomainName($domainName);
goto C6686;
E024f:
return $siteEntity;
goto E9905;
F57d6:
$vhostTemplate->addProcessor(new RedirectDomainProcessor());
goto E05f6;
aa60c: B7409:
goto D8f2c;
e5e16:
if (!(false === empty($varnishCache))) {
goto C4c8c;
}
goto cf52c;
D2e71:
$phpSiteCreator->createUser();
goto E7466;
cdfd2: a525a:
goto b5485;
d685a:
$vhostTemplate = sprintf("%s%s", $redirectionVhostTemplate, $vhostTemplate);
goto cdfd2;
C18c5:
$subjectAlternativeNames[] = $registrableDomain;
goto C9ce8;
F10f1:
$certificateEntity->setType(CertificateEntity::TYPE_SELF_SIGNED);
goto B7ff0;
B5a7e:
$vhostTemplate = $vhostTemplateEntity->getTemplate();
goto C7b2e;
F396d:
$siteEntity->setUserPassword($siteUserPassword);
goto f9dc1;
C115b:
$phpSettingsEntity->setPhpVersion($phpVersion);
goto eb099;
B7ff0:
$certificateEntity->setCsr($csr);
goto d76c4;
f6162: ebdc2:
goto E1450;
ec400:
$varnishCache = false === empty($varnishCacheSettings) ? true : false;
goto B1407;
b6602:
$varnishCacheSettings = array_merge($defaultVarnishCacheSettings, $varnishCacheSettings);
goto c0046;
B0e54:
$phpSiteCreator = new PhpSiteCreator($phpSite);
goto D2e71;
d51e3:
$subdomain = $resolvedDomainName->subDomain()->toString();
goto C61e7;
Cdd9f:
$phpSite->setRootDirectory($siteEntity->getRootDirectory());
goto F5e1d;
E9905:
} ?>
Did this file decode correctly?
Original Code
private function createPhpSite(string $domainName, string $rootDirectory, string $phpVersion, string $vhostTemplateName, string $siteUser, string $siteUserPassword, array $varnishCacheSettings = []): SiteEntity
{
goto ec400;
C6686:
$siteEntity->setUser($siteUser);
goto F396d;
d41d2:
$phpSiteCreator->resetPermissions();
goto bfd8b;
Fc453:
$siteEntity->setCertificate($certificateEntity);
goto a50d3;
cfcdb: C4c8c:
goto C83f5;
bfd8b:
$vhostTemplate = new PhpVhostTemplate($phpSite);
goto a1cd6;
D6cd7:
$siteEntity->setVhostTemplate($vhostTemplate);
goto ef610;
a9b75:
$defaultVarnishCacheSettings = ["\x65\156\141\x62\x6c\145\144" => false, "\x73\x65\x72\x76\145\x72" => self::VARNISH_CACHE_SERVER, "\143\x61\x63\x68\145\124\141\147\120\x72\145\x66\151\x78" => substr(md5(time()), 0, 4)];
goto b6602;
e414e:
$phpSite->setDomainName($domainName);
goto Fdf1e;
b650c:
$vhostTemplate->addProcessor(new RedirectServerNameProcessor());
goto F57d6;
E9bc5:
$phpSite->setPhpSettings($phpSettingsEntity);
goto e9259;
E9e15:
$resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName);
goto e9258;
c0663:
$phpSite->setUser($siteEntity->getUser());
goto d0900;
f9dc1:
$siteEntity->setRootDirectory($rootDirectory);
goto e5e16;
E9dc6:
if (!(true === is_null($subdomain))) {
goto e2a4b;
}
goto C44da;
Ac826:
$constraintViolationList->addAll($phpSettingsConstraints);
goto F3002;
e473c:
$csr = $csrGenerator->generate();
goto a232d;
c0046:
$phpSiteCreator->createVarnishCacheStructure($varnishCacheSettings);
goto C8d0a;
Ad389:
$rsaKeyGenerator = new RsaKeyGenerator();
goto ce1be;
B2172:
$phpSite->setSubdomain($subdomain);
goto Cdd9f;
E1450:
$phpSiteCreator->createNginxVhost();
goto c5034;
C84af:
$phpSiteCreator->createIndexPhp();
goto cb346;
a1cd6:
$vhostTemplate->setContent($siteEntity->getVhostTemplate());
goto d693d;
B4aeb:
if (!(false === is_null($subdomain) && "\167\x77\167" == $subdomain)) {
goto af8cd;
}
goto C18c5;
A933b:
$phpSiteCreator->createLogrotateFile();
goto C84af;
E7a7c:
$certificateEntity->setSite($siteEntity);
goto Ad389;
d76c4:
$certificateEntity->setPrivateKey($privateKey->getPEM());
goto Ea024;
E9fed:
$siteEntity->setType(SiteEntity::TYPE_PHP);
goto C5768;
F0fc8:
$constraintViolationList = new ConstraintViolationList();
goto Ecd51;
f61fc:
$phpSettingsConstraints = $this->validator->validate($phpSettingsEntity);
goto A686c;
C44da:
$subjectAlternativeNames[] = sprintf("\167\x77\x77\x2e\x25\163", $domainName);
goto Ba736;
b3609:
$phpSiteCreator->reloadPhpFpmService();
goto E38a0;
cf52c:
$siteEntity->setVarnishCache(true);
goto cfcdb;
E38a0:
if (!(true === $varnishCache)) {
goto ebdc2;
}
goto E3cf1;
e9258:
$registrableDomain = $resolvedDomainName->registrableDomain()->toString();
goto d51e3;
b848a:
$vhostTemplate->addProcessor(new ServerNameProcessor());
goto b650c;
Eeea3:
$vhostTemplateEntity = $this->getVhostTemplateEntity($vhostTemplateName);
goto B5a7e;
F3002:
$errorMessages = $this->getConstraintViolationListErrorMessages($constraintViolationList);
goto f8d1b;
D9fe9:
$phpSiteCreator->createPhpFpmPool();
goto b3609;
bbbfb:
$certificateEntity->setDefaultCertificate(true);
goto F10f1;
E7466:
$phpSiteCreator->createRootDirectory();
goto A933b;
Ecd51:
$constraintViolationList->addAll($siteConstraints);
goto Ac826;
C7b2e:
$siteEntity = $this->siteEntityManager->createEntity();
goto E9fed;
be554:
$this->siteEntityManager->updateEntity($siteEntity);
goto E024f;
Fb1cf:
$siteEntity->setVhostTemplate($vhostTemplate->getContent());
goto C8369;
C8d0a:
$phpSite->setVarnishCacheSettings($varnishCacheSettings);
goto f6162;
B1407:
$rootDirectory = trim(rtrim(ltrim($rootDirectory, "\x2f")), "\57");
goto E9e15;
cb346:
$phpSiteCreator->createPrivateKeyAndCertificate();
goto D9fe9;
d693d:
$vhostTemplate->resetProcessors();
goto b848a;
E08a3:
$siteConstraints = $this->validator->validate($siteEntity);
goto f61fc;
Fdf1e:
$phpSite->setRegistrableDomain($registrableDomain);
goto B2172;
b5485: Dc90c:
goto D6cd7;
B8044:
if (!(false === empty($redirectionVhostTemplate))) {
goto a525a;
}
goto d685a;
E05f6:
$vhostTemplate->build();
goto Fb1cf;
d0900:
$phpSite->setUserPassword($siteEntity->getUserPassword());
goto e414e;
F5e1d:
$phpSite->setCertificate($certificateEntity);
goto E9bc5;
bf7ee:
$csrGenerator = new CsrGenerator($privateKey, $distinguishedName);
goto e473c;
C9ce8: af8cd:
goto E1698;
c5034:
$phpSiteCreator->reloadNginxService();
goto d41d2;
D8f2c:
$certificateEntity = $this->certificateEntityManager->createEntity();
goto E7a7c;
e9259:
$phpSite->setVhostTemplate($siteEntity->getVhostTemplate());
goto B0e54;
E3cf1:
$phpSite->setVarnishCache(true);
goto a9b75;
d5ea2:
$redirectionVhostTemplateFile = realpath(dirname(__FILE__) . "\57\x2e\x2e\57\x2e\56\x2f\56\56\57\162\x65\x73\157\165\162\143\145\163\x2f\x6e\147\x69\x6e\x78\57\x76\150\157\x73\x74\137\x74\145\x6d\x70\154\x61\x74\x65\x2f\162\x65\x64\x69\162\x65\x63\164");
goto c4676;
a50d3:
$phpSite = new PhpSite();
goto c0663;
Ea024:
$certificateEntity->setCertificate($selfSignedCertificate);
goto Fc453;
b38cf:
$subjectAlternativeNames = [];
goto E9dc6;
c54a5:
$siteEntity->setPhpSettings($phpSettingsEntity);
goto C115b;
A686c:
if (!(count($siteConstraints) || count($phpSettingsConstraints))) {
goto B7409;
}
goto F0fc8;
C8369:
$siteEntity->setApplication($vhostTemplateEntity->getName());
goto be554;
eb099:
$phpSettingsEntity->setSite($siteEntity);
goto E08a3;
c4676:
$redirectionVhostTemplate = file_get_contents($redirectionVhostTemplateFile);
goto B8044;
f8d1b:
throw new \Exception(implode("\73\x20", $errorMessages));
goto aa60c;
C61e7:
$subdomain = false === empty($subdomain) ? $subdomain : null;
goto Eeea3;
a232d:
$selfSignedCertificate = Openssl::createSelfSignedCertificate($privateKey, $csr);
goto bbbfb;
Ba736: e2a4b:
goto B4aeb;
ef610:
$phpSettingsEntity = new PhpSettingsEntity();
goto c54a5;
ce1be:
$privateKey = $rsaKeyGenerator->generatePrivateKey();
goto b38cf;
E1698:
$distinguishedName = new DistinguishedName($domainName, $subjectAlternativeNames);
goto bf7ee;
C83f5:
if (!(true === is_null($subdomain) || "\167\167\167" == $subdomain)) {
goto Dc90c;
}
goto d5ea2;
C5768:
$siteEntity->setDomainName($domainName);
goto C6686;
E024f:
return $siteEntity;
goto E9905;
F57d6:
$vhostTemplate->addProcessor(new RedirectDomainProcessor());
goto E05f6;
aa60c: B7409:
goto D8f2c;
e5e16:
if (!(false === empty($varnishCache))) {
goto C4c8c;
}
goto cf52c;
D2e71:
$phpSiteCreator->createUser();
goto E7466;
cdfd2: a525a:
goto b5485;
d685a:
$vhostTemplate = sprintf("\x25\x73\45\x73", $redirectionVhostTemplate, $vhostTemplate);
goto cdfd2;
C18c5:
$subjectAlternativeNames[] = $registrableDomain;
goto C9ce8;
F10f1:
$certificateEntity->setType(CertificateEntity::TYPE_SELF_SIGNED);
goto B7ff0;
B5a7e:
$vhostTemplate = $vhostTemplateEntity->getTemplate();
goto C7b2e;
F396d:
$siteEntity->setUserPassword($siteUserPassword);
goto f9dc1;
C115b:
$phpSettingsEntity->setPhpVersion($phpVersion);
goto eb099;
B7ff0:
$certificateEntity->setCsr($csr);
goto d76c4;
f6162: ebdc2:
goto E1450;
ec400:
$varnishCache = false === empty($varnishCacheSettings) ? true : false;
goto B1407;
b6602:
$varnishCacheSettings = array_merge($defaultVarnishCacheSettings, $varnishCacheSettings);
goto c0046;
B0e54:
$phpSiteCreator = new PhpSiteCreator($phpSite);
goto D2e71;
d51e3:
$subdomain = $resolvedDomainName->subDomain()->toString();
goto C61e7;
Cdd9f:
$phpSite->setRootDirectory($siteEntity->getRootDirectory());
goto F5e1d;
E9905:
}
Function Calls
None |
Stats
MD5 | 7357caf5e98372ff351149383b7c0b0f |
Eval Count | 0 |
Decode Time | 76 ms |