Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Site\Updater; use App\Site\Updater as SiteUpdater; use App\System\Co..

Decoded Output download

<?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 ad5d6; ad5d6: if (!("dev" != $_ENV["APP_ENV"])) { goto Ecd83; } goto C0e99; Fb55d: $reloadPhpFpmServiceCommand = new ServiceReloadCommand(); goto c986e; c986e: $reloadPhpFpmServiceCommand->setServiceName($serviceName); goto Fda3a; c2d14: Ecd83: goto A8007; Fda3a: $this->commandExecutor->execute($reloadPhpFpmServiceCommand); goto c2d14; C0e99: $serviceName = sprintf("php%s-fpm", $phpVersion); goto Fb55d; A8007: } public function changePhpVersion(string $currentPhpVersion, string $newPhpVersion) : void { goto Ed396; Ed396: $domainName = $this->site->getDomainName(); goto d8003; d8003: $oldPhpFpmPoolFile = sprintf("/etc/php/%s/fpm/pool.d/%s.conf", $currentPhpVersion, $domainName); goto a8b1d; A1788: $this->reloadPhpFpmService($currentPhpVersion); goto A70bf; A70bf: $this->createPhpFpmPool($newPhpVersion); goto A7c50; a8b1d: $phpFpmPoolFileDeleteCommand = new DeleteFileCommand(); goto d4b8e; d4b8e: $phpFpmPoolFileDeleteCommand->setFile($oldPhpFpmPoolFile); goto Df5ca; Df5ca: $this->commandExecutor->execute($phpFpmPoolFileDeleteCommand); goto A1788; A7c50: $this->reloadPhpFpmService($newPhpVersion); goto adf3e; adf3e: } private function createPhpFpmPool(string $phpVersion) : void { goto de3a7; e3fc1: $poolBuilder = new PoolBuilder(); goto f7411; e84a6: $this->commandExecutor->execute($writePoolFileCommand); goto Bcd06; f7411: $poolContent = $poolBuilder->create($pool); goto e37b3; b4987: $pools = $poolReader->getPools(); goto B12d0; Bc46c: $phpSettings = $this->site->getPhpSettings(); goto A2d1b; D2e46: $writePoolFileCommand = new WriteFileCommand(); goto f1bb8; e37b3: $poolFile = sprintf("/etc/php/%s/fpm/pool.d/%s.conf", $phpVersion, $domainName); goto D2e46; C4291: $poolReader = new PoolReader($poolDirectory); goto b4987; b814f: $pool->setUser($siteUser); goto E97bb; B62f1: $pool = new Pool(); goto A52d8; b772a: $latestPool = array_shift($pools); goto Ed175; A2d1b: $domainName = $this->site->getDomainName(); goto Fae1a; de3a7: $siteUser = $this->site->getUser(); goto Bc46c; E97bb: $pool->setGroup($siteUser); goto e3ee8; f1bb8: $writePoolFileCommand->setFile($poolFile); goto B3be6; B3be6: $writePoolFileCommand->setContent($poolContent); goto e84a6; C62f8: $phpSettings->setPoolPort($poolPort); goto e3fc1; e3ee8: $pool->setPort($poolPort); goto C62f8; Ed175: $poolPort = $latestPool->getPort() + 1; goto B62f1; Fae1a: $poolDirectory = sprintf("/etc/php/%s/fpm/pool.d/", $phpVersion); goto C4291; A52d8: $pool->setName($domainName); goto b814f; B12d0: usort($pools, function ($a, $b) { return $a->getPort() < $b->getPort(); }); goto b772a; Bcd06: } public function writeVarnishCacheSettingsFile(array $varnishCacheSettings) : void { goto d750f; D7c8b: $chownVarnishCacheSettingsCommand->setGroup($siteUser); goto C530c; C9c70: $chownVarnishCacheSettingsCommand = new ChownCommand(); goto c4b4e; c6a35: $chmodVarnishCacheSettingsCommand->setFile($settingsFile); goto c5a4b; a2dc2: $this->commandExecutor->execute($chownVarnishCacheSettingsCommand); goto f096f; bda00: $writeVarnishCacheSettingsFileCommand = new WriteFileCommand(); goto d9670; d9670: $writeVarnishCacheSettingsFileCommand->setFile($settingsFile); goto bd568; d750f: $siteUser = $this->site->getUser(); goto a53c0; C530c: $chmodVarnishCacheSettingsCommand = new ChmodCommand(); goto c6a35; D5751: $chownVarnishCacheSettingsCommand->setUser($siteUser); goto D7c8b; f096f: $this->commandExecutor->execute($chmodVarnishCacheSettingsCommand); goto b2e37; af471: $settings = json_encode($varnishCacheSettings, JSON_PRETTY_PRINT); goto bda00; c5a4b: $chmodVarnishCacheSettingsCommand->setChmod(770); goto b8452; b8452: $this->commandExecutor->execute($writeVarnishCacheSettingsFileCommand); goto a2dc2; dc3ec: $chownVarnishCacheSettingsCommand->setRecursive(false); goto D5751; bd568: $writeVarnishCacheSettingsFileCommand->setContent($settings); goto C9c70; a53c0: $settingsFile = sprintf("/home/%s/.varnish-cache/settings.json", $siteUser); goto af471; c4b4e: $chownVarnishCacheSettingsCommand->setFile($settingsFile); goto dc3ec; b2e37: } } 
 ?>

Did this file decode correctly?

Original Code

<?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 ad5d6; ad5d6: if (!("\144\145\x76" != $_ENV["\101\x50\120\x5f\105\x4e\x56"])) { goto Ecd83; } goto C0e99; Fb55d: $reloadPhpFpmServiceCommand = new ServiceReloadCommand(); goto c986e; c986e: $reloadPhpFpmServiceCommand->setServiceName($serviceName); goto Fda3a; c2d14: Ecd83: goto A8007; Fda3a: $this->commandExecutor->execute($reloadPhpFpmServiceCommand); goto c2d14; C0e99: $serviceName = sprintf("\160\x68\160\x25\x73\55\146\x70\x6d", $phpVersion); goto Fb55d; A8007: } public function changePhpVersion(string $currentPhpVersion, string $newPhpVersion) : void { goto Ed396; Ed396: $domainName = $this->site->getDomainName(); goto d8003; d8003: $oldPhpFpmPoolFile = sprintf("\57\145\164\143\x2f\160\150\x70\x2f\x25\x73\x2f\x66\160\155\57\160\x6f\x6f\154\x2e\x64\x2f\45\163\56\143\x6f\x6e\146", $currentPhpVersion, $domainName); goto a8b1d; A1788: $this->reloadPhpFpmService($currentPhpVersion); goto A70bf; A70bf: $this->createPhpFpmPool($newPhpVersion); goto A7c50; a8b1d: $phpFpmPoolFileDeleteCommand = new DeleteFileCommand(); goto d4b8e; d4b8e: $phpFpmPoolFileDeleteCommand->setFile($oldPhpFpmPoolFile); goto Df5ca; Df5ca: $this->commandExecutor->execute($phpFpmPoolFileDeleteCommand); goto A1788; A7c50: $this->reloadPhpFpmService($newPhpVersion); goto adf3e; adf3e: } private function createPhpFpmPool(string $phpVersion) : void { goto de3a7; e3fc1: $poolBuilder = new PoolBuilder(); goto f7411; e84a6: $this->commandExecutor->execute($writePoolFileCommand); goto Bcd06; f7411: $poolContent = $poolBuilder->create($pool); goto e37b3; b4987: $pools = $poolReader->getPools(); goto B12d0; Bc46c: $phpSettings = $this->site->getPhpSettings(); goto A2d1b; D2e46: $writePoolFileCommand = new WriteFileCommand(); goto f1bb8; e37b3: $poolFile = sprintf("\57\145\164\x63\x2f\x70\150\x70\x2f\x25\163\57\x66\160\155\x2f\x70\x6f\157\154\x2e\x64\x2f\x25\x73\x2e\143\x6f\156\146", $phpVersion, $domainName); goto D2e46; C4291: $poolReader = new PoolReader($poolDirectory); goto b4987; b814f: $pool->setUser($siteUser); goto E97bb; B62f1: $pool = new Pool(); goto A52d8; b772a: $latestPool = array_shift($pools); goto Ed175; A2d1b: $domainName = $this->site->getDomainName(); goto Fae1a; de3a7: $siteUser = $this->site->getUser(); goto Bc46c; E97bb: $pool->setGroup($siteUser); goto e3ee8; f1bb8: $writePoolFileCommand->setFile($poolFile); goto B3be6; B3be6: $writePoolFileCommand->setContent($poolContent); goto e84a6; C62f8: $phpSettings->setPoolPort($poolPort); goto e3fc1; e3ee8: $pool->setPort($poolPort); goto C62f8; Ed175: $poolPort = $latestPool->getPort() + 1; goto B62f1; Fae1a: $poolDirectory = sprintf("\57\145\x74\143\57\x70\x68\160\57\45\x73\x2f\x66\160\155\x2f\x70\157\x6f\x6c\x2e\x64\x2f", $phpVersion); goto C4291; A52d8: $pool->setName($domainName); goto b814f; B12d0: usort($pools, function ($a, $b) { return $a->getPort() < $b->getPort(); }); goto b772a; Bcd06: } public function writeVarnishCacheSettingsFile(array $varnishCacheSettings) : void { goto d750f; D7c8b: $chownVarnishCacheSettingsCommand->setGroup($siteUser); goto C530c; C9c70: $chownVarnishCacheSettingsCommand = new ChownCommand(); goto c4b4e; c6a35: $chmodVarnishCacheSettingsCommand->setFile($settingsFile); goto c5a4b; a2dc2: $this->commandExecutor->execute($chownVarnishCacheSettingsCommand); goto f096f; bda00: $writeVarnishCacheSettingsFileCommand = new WriteFileCommand(); goto d9670; d9670: $writeVarnishCacheSettingsFileCommand->setFile($settingsFile); goto bd568; d750f: $siteUser = $this->site->getUser(); goto a53c0; C530c: $chmodVarnishCacheSettingsCommand = new ChmodCommand(); goto c6a35; D5751: $chownVarnishCacheSettingsCommand->setUser($siteUser); goto D7c8b; f096f: $this->commandExecutor->execute($chmodVarnishCacheSettingsCommand); goto b2e37; af471: $settings = json_encode($varnishCacheSettings, JSON_PRETTY_PRINT); goto bda00; c5a4b: $chmodVarnishCacheSettingsCommand->setChmod(770); goto b8452; b8452: $this->commandExecutor->execute($writeVarnishCacheSettingsFileCommand); goto a2dc2; dc3ec: $chownVarnishCacheSettingsCommand->setRecursive(false); goto D5751; bd568: $writeVarnishCacheSettingsFileCommand->setContent($settings); goto C9c70; a53c0: $settingsFile = sprintf("\x2f\x68\157\155\x65\x2f\x25\x73\57\56\166\x61\x72\x6e\151\x73\x68\55\143\x61\x63\150\x65\57\x73\x65\164\x74\x69\156\147\x73\56\x6a\163\157\156", $siteUser); goto af471; c4b4e: $chownVarnishCacheSettingsCommand->setFile($settingsFile); goto dc3ec; b2e37: } }

Function Calls

None

Variables

None

Stats

MD5 fb98c38ec0fddcff8af06ec36de82f59
Eval Count 0
Decode Time 46 ms