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\Command; use Symfony\Component\Console\Command\Command as BaseCommand..
Decoded Output download
<?php
namespace App\Command; use Symfony\Component\Console\Command\Command as BaseCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Validator\ConstraintViolationList; use App\Service\Logger; use App\Util\Retry; use App\CloudPanel\Instance; use App\Entity\Manager\ConfigManager; abstract class Command extends BaseCommand { protected ?Logger $logger = null; protected ?string $comment = null; private ?ConfigManager $configManager = null; private Instance $instance; private array $maskStringPattern = ["/-p'([^']+)'/"]; private array $maskStringReplacement = ["-p'****************'"]; protected function validateInput(InputInterface $input) { goto Cd17e; c9c15: cd5d9: goto Ff593; E1878: if (!count($inputOptions)) { goto C2f1a; } goto Cb122; Ff593: C2f1a: goto cb6ee; Cd17e: $nativeDefinition = $this->getNativeDefinition(); goto b7849; b7849: $inputOptions = $nativeDefinition->getOptions(); goto E1878; Cb122: foreach ($inputOptions as $inputOption) { goto fbc97; a49b7: $inputOptionValue = trim($input->getOption($inputOption->getName())); goto d1d5f; d1d5f: if (!(true === empty($inputOptionValue))) { goto e6741; } goto d2803; d2803: throw new \Exception(sprintf("The "--%s" option requires a value.", $inputOption->getName())); goto B7683; fbc97: if (!(true === $inputOption->isValueRequired())) { goto e6c7b; } goto a49b7; B7683: e6741: goto Ac2ac; Af6ba: C540f: goto D2217; Ac2ac: e6c7b: goto Af6ba; D2217: } goto c9c15; cb6ee: } public function setComment(string $comment) { $this->comment = $comment; } public function getComment() : ?string { return $this->comment; } protected function getLogger() : Logger { goto C393c; a5e87: return $this->logger; goto C3b8f; c3698: f9ffc: goto a5e87; ebd2a: $this->logger = $this->get("app.logger"); goto c3698; C393c: if (!(true === is_null($this->logger))) { goto f9ffc; } goto ebd2a; C3b8f: } public function setInstance(Instance $instance) : void { $this->instance = $instance; } public function getInstance() : Instance { return $this->instance; } protected function get(string $id) { return $this->getContainer()->get($id); } protected function getContainer() { return $this->getApplication()->getContainer(); } protected function renderConstraints(ConstraintViolationList $constraints, OutputInterface $output) : int { goto e40c8; fa6a7: return self::FAILURE; goto d9b3a; B0f6d: c81bf: goto fa6a7; e40c8: $this->prepareConstraints($constraints); goto dc683; dc683: foreach ($constraints as $constraint) { goto Ed71a; dad6a: A0897: goto D5eca; d2685: $output->writeln($errorMessage); goto dad6a; Ed71a: $errorMessage = sprintf("<error>%s: %s</error>", $constraint->getPropertyPath(), $constraint->getMessage()); goto d2685; D5eca: } goto B0f6d; d9b3a: } protected function prepareConstraints(ConstraintViolationList $constraints) : void { } protected function changePropertyPath(string $oldPropertyPath, string $newPropertyPath, ConstraintViolationList $constraints) : void { foreach ($constraints as $constraint) { goto F41a4; F41a4: if (!($oldPropertyPath == $constraint->getPropertyPath())) { goto B7fbb; } goto D8455; D509c: c8c75: goto C005a; Eed72: B7fbb: goto D509c; bd160: $reflectionProperty->setAccessible(true); goto Fc22f; Fc22f: $reflectionProperty->setValue($constraint, $newPropertyPath); goto Eed72; D8455: $reflectionClass = new \ReflectionClass($constraint); goto D9a6a; D9a6a: $reflectionProperty = $reflectionClass->getProperty("propertyPath"); goto bd160; C005a: } A8fed: } protected function getSystemUserName() : string { goto d712d; b0dc9: $systemUserName = $systemUserInfo["name"] ?? ''; goto dfe76; dfe76: return $systemUserName; goto d576a; d712d: $systemUserInfo = $this->getSystemUserInfo(); goto b0dc9; d576a: } protected function getSystemUserInfo() : array { $systemUserInfo = posix_getpwuid(posix_getuid()); return $systemUserInfo; } protected function getConfigValue(string $key) : ?string { goto a17d2; a17d2: $configManager = $this->getConfigManager(); goto F8d50; F3cf9: return $configValue; goto a5c40; F8d50: $configValue = $configManager->get($key); goto F3cf9; a5c40: } protected function getConfigManager() : ConfigManager { goto c4294; b79d3: $this->configManager = $this->get("App\Entity\Manager\ConfigManager"); goto d2083; c4294: if (!(true === is_null($this->configManager))) { goto A32ce; } goto b79d3; d2083: A32ce: goto Dcca4; Dcca4: return $this->configManager; goto e49aa; e49aa: } public function getGroupName() { goto c4f06; b72eb: return $groupName; goto cdde4; Cdd5b: $groupName = strstr(strtolower($name), ":", true); goto b72eb; c4f06: $name = $this->getName(); goto Cdd5b; cdde4: } protected function maskString(string $string) : string { $maskedString = preg_replace($this->maskStringPattern, $this->maskStringReplacement, $string); return $maskedString; } protected function retry(callable $fn, $retries = 2, $delay = 3) { return Retry::retry($fn, $retries, $delay); } }
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Command; use Symfony\Component\Console\Command\Command as BaseCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Validator\ConstraintViolationList; use App\Service\Logger; use App\Util\Retry; use App\CloudPanel\Instance; use App\Entity\Manager\ConfigManager; abstract class Command extends BaseCommand { protected ?Logger $logger = null; protected ?string $comment = null; private ?ConfigManager $configManager = null; private Instance $instance; private array $maskStringPattern = ["\x2f\x2d\160\x27\x28\x5b\136\x27\x5d\x2b\51\x27\x2f"]; private array $maskStringReplacement = ["\x2d\x70\47\52\52\52\52\x2a\x2a\52\52\52\52\52\x2a\52\x2a\52\52\x27"]; protected function validateInput(InputInterface $input) { goto Cd17e; c9c15: cd5d9: goto Ff593; E1878: if (!count($inputOptions)) { goto C2f1a; } goto Cb122; Ff593: C2f1a: goto cb6ee; Cd17e: $nativeDefinition = $this->getNativeDefinition(); goto b7849; b7849: $inputOptions = $nativeDefinition->getOptions(); goto E1878; Cb122: foreach ($inputOptions as $inputOption) { goto fbc97; a49b7: $inputOptionValue = trim($input->getOption($inputOption->getName())); goto d1d5f; d1d5f: if (!(true === empty($inputOptionValue))) { goto e6741; } goto d2803; d2803: throw new \Exception(sprintf("\x54\150\x65\x20\42\x2d\x2d\x25\163\x22\40\x6f\160\164\x69\x6f\x6e\x20\x72\x65\x71\x75\x69\x72\x65\163\40\141\x20\166\x61\x6c\x75\145\56", $inputOption->getName())); goto B7683; fbc97: if (!(true === $inputOption->isValueRequired())) { goto e6c7b; } goto a49b7; B7683: e6741: goto Ac2ac; Af6ba: C540f: goto D2217; Ac2ac: e6c7b: goto Af6ba; D2217: } goto c9c15; cb6ee: } public function setComment(string $comment) { $this->comment = $comment; } public function getComment() : ?string { return $this->comment; } protected function getLogger() : Logger { goto C393c; a5e87: return $this->logger; goto C3b8f; c3698: f9ffc: goto a5e87; ebd2a: $this->logger = $this->get("\141\160\x70\56\154\157\x67\147\145\162"); goto c3698; C393c: if (!(true === is_null($this->logger))) { goto f9ffc; } goto ebd2a; C3b8f: } public function setInstance(Instance $instance) : void { $this->instance = $instance; } public function getInstance() : Instance { return $this->instance; } protected function get(string $id) { return $this->getContainer()->get($id); } protected function getContainer() { return $this->getApplication()->getContainer(); } protected function renderConstraints(ConstraintViolationList $constraints, OutputInterface $output) : int { goto e40c8; fa6a7: return self::FAILURE; goto d9b3a; B0f6d: c81bf: goto fa6a7; e40c8: $this->prepareConstraints($constraints); goto dc683; dc683: foreach ($constraints as $constraint) { goto Ed71a; dad6a: A0897: goto D5eca; d2685: $output->writeln($errorMessage); goto dad6a; Ed71a: $errorMessage = sprintf("\x3c\145\x72\162\157\x72\x3e\x25\x73\72\40\x25\x73\x3c\57\145\x72\x72\157\x72\76", $constraint->getPropertyPath(), $constraint->getMessage()); goto d2685; D5eca: } goto B0f6d; d9b3a: } protected function prepareConstraints(ConstraintViolationList $constraints) : void { } protected function changePropertyPath(string $oldPropertyPath, string $newPropertyPath, ConstraintViolationList $constraints) : void { foreach ($constraints as $constraint) { goto F41a4; F41a4: if (!($oldPropertyPath == $constraint->getPropertyPath())) { goto B7fbb; } goto D8455; D509c: c8c75: goto C005a; Eed72: B7fbb: goto D509c; bd160: $reflectionProperty->setAccessible(true); goto Fc22f; Fc22f: $reflectionProperty->setValue($constraint, $newPropertyPath); goto Eed72; D8455: $reflectionClass = new \ReflectionClass($constraint); goto D9a6a; D9a6a: $reflectionProperty = $reflectionClass->getProperty("\160\x72\157\x70\145\x72\x74\171\120\141\164\x68"); goto bd160; C005a: } A8fed: } protected function getSystemUserName() : string { goto d712d; b0dc9: $systemUserName = $systemUserInfo["\156\x61\x6d\145"] ?? ''; goto dfe76; dfe76: return $systemUserName; goto d576a; d712d: $systemUserInfo = $this->getSystemUserInfo(); goto b0dc9; d576a: } protected function getSystemUserInfo() : array { $systemUserInfo = posix_getpwuid(posix_getuid()); return $systemUserInfo; } protected function getConfigValue(string $key) : ?string { goto a17d2; a17d2: $configManager = $this->getConfigManager(); goto F8d50; F3cf9: return $configValue; goto a5c40; F8d50: $configValue = $configManager->get($key); goto F3cf9; a5c40: } protected function getConfigManager() : ConfigManager { goto c4294; b79d3: $this->configManager = $this->get("\101\160\x70\134\x45\x6e\164\151\x74\x79\134\115\x61\156\x61\x67\145\162\x5c\103\157\x6e\146\151\x67\x4d\x61\156\141\x67\145\x72"); goto d2083; c4294: if (!(true === is_null($this->configManager))) { goto A32ce; } goto b79d3; d2083: A32ce: goto Dcca4; Dcca4: return $this->configManager; goto e49aa; e49aa: } public function getGroupName() { goto c4f06; b72eb: return $groupName; goto cdde4; Cdd5b: $groupName = strstr(strtolower($name), "\x3a", true); goto b72eb; c4f06: $name = $this->getName(); goto Cdd5b; cdde4: } protected function maskString(string $string) : string { $maskedString = preg_replace($this->maskStringPattern, $this->maskStringReplacement, $string); return $maskedString; } protected function retry(callable $fn, $retries = 2, $delay = 3) { return Retry::retry($fn, $retries, $delay); } }
Function Calls
None |
Stats
MD5 | 48c8724418b9c782908a22dbe036dc4e |
Eval Count | 0 |
Decode Time | 101 ms |