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 App\CloudPanel\Instance; use App\Entity\Manager\Co..
Decoded Output download
<?php
namespace App\Command;
use App\CloudPanel\Instance;
use App\Entity\Manager\ConfigManager;
use App\Service\Logger;
use App\Util\Retry;
use Symfony\Component\Console\Command\Command as BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Validator\ConstraintViolationList;
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 e8580;
e8580:
$nativeDefinition = $this->getNativeDefinition();
goto F2bf9;
F2bf9:
$inputOptions = $nativeDefinition->getOptions();
goto A1a15;
A1a15:
if (!count($inputOptions)) {
goto B6453;
}
goto A6d0e;
A6d0e:
foreach ($inputOptions as $inputOption) {
goto D835b;
D835b:
if (!(true === $inputOption->isValueRequired())) {
goto a0216;
}
goto Be0f5;
Cebf8: a0216:
goto bba8d;
Be0f5:
$inputOptionValue = trim($input->getOption($inputOption->getName()));
goto D491e;
D491e:
if (!(true === empty($inputOptionValue))) {
goto b13ad;
}
goto a6c78;
d20d8: b13ad:
goto Cebf8;
bba8d: b439c:
goto Fe9ae;
a6c78:
throw new \Exception(sprintf("The "--%s" option requires a value.", $inputOption->getName()));
goto d20d8;
Fe9ae:
}
goto B0ab4;
B0ab4: faa38:
goto Ccd5d;
Ccd5d: B6453:
goto f495b;
f495b:
}
public function setComment(string $comment)
{
$this->comment = $comment;
}
public function getComment(): ?string
{
return $this->comment;
}
protected function getLogger(): Logger
{
goto B9ca9;
d2338: B77b8:
goto ce8db;
ce8db:
return $this->logger;
goto Ea1c0;
afcef:
$this->logger = $this->get("app.logger");
goto d2338;
B9ca9:
if (!(true === is_null($this->logger))) {
goto B77b8;
}
goto afcef;
Ea1c0:
}
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 B47b2;
B47b2:
$this->prepareConstraints($constraints);
goto Aaf32;
Aaf32:
foreach ($constraints as $constraint) {
goto e52d1;
e52d1:
$errorMessage = sprintf("<error>%s: %s</error>", $constraint->getPropertyPath(), $constraint->getMessage());
goto e4bfe;
e54b7: dd488:
goto d6b84;
e4bfe:
$output->writeln($errorMessage);
goto e54b7;
d6b84:
}
goto A8a56;
e9485:
return self::FAILURE;
goto e4b2f;
A8a56: db0fb:
goto e9485;
e4b2f:
}
protected function prepareConstraints(ConstraintViolationList $constraints): void
{
}
protected function changePropertyPath(string $oldPropertyPath, string $newPropertyPath, ConstraintViolationList $constraints): void
{
foreach ($constraints as $constraint) {
goto E4577;
Db565: Df767:
goto eb72d;
E4577:
if (!($oldPropertyPath == $constraint->getPropertyPath())) {
goto Dc74c;
}
goto fa8fd;
Ff724:
$reflectionProperty->setAccessible(true);
goto d7c23;
fa8fd:
$reflectionClass = new \ReflectionClass($constraint);
goto Be41c;
af6c8: Dc74c:
goto Db565;
d7c23:
$reflectionProperty->setValue($constraint, $newPropertyPath);
goto af6c8;
Be41c:
$reflectionProperty = $reflectionClass->getProperty("propertyPath");
goto Ff724;
eb72d:
}
b75cf:
}
protected function getSystemUserName(): string
{
goto e6f26;
f400b:
$systemUserName = $systemUserInfo["name"] ?? '';
goto a9a98;
e6f26:
$systemUserInfo = $this->getSystemUserInfo();
goto f400b;
a9a98:
return $systemUserName;
goto Ef21a;
Ef21a:
}
protected function getSystemUserInfo(): array
{
$systemUserInfo = posix_getpwuid(posix_getuid());
return $systemUserInfo;
}
protected function getConfigValue(string $key): ?string
{
goto C3526;
C3526:
$configManager = $this->getConfigManager();
goto cae7e;
Fa82e:
return $configValue;
goto b1ab7;
cae7e:
$configValue = $configManager->get($key);
goto Fa82e;
b1ab7:
}
protected function getConfigManager(): ConfigManager
{
goto fa25e;
eb06c: e9cfa:
goto e5fd4;
fa25e:
if (!(true === is_null($this->configManager))) {
goto e9cfa;
}
goto D5359;
e5fd4:
return $this->configManager;
goto C6145;
D5359:
$this->configManager = $this->get("App\Entity\Manager\ConfigManager");
goto eb06c;
C6145:
}
public function getGroupName()
{
goto C73c0;
C73c0:
$name = $this->getName();
goto C70a5;
C70a5:
$groupName = strstr(strtolower($name), ":", true);
goto F5e33;
F5e33:
return $groupName;
goto e3064;
e3064:
}
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 App\CloudPanel\Instance;
use App\Entity\Manager\ConfigManager;
use App\Service\Logger;
use App\Util\Retry;
use Symfony\Component\Console\Command\Command as BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Validator\ConstraintViolationList;
abstract class Command extends BaseCommand
{
protected ?Logger $logger = null;
protected ?string $comment = null;
private ?ConfigManager $configManager = null;
private Instance $instance;
private array $maskStringPattern = ["\57\55\x70\x27\50\x5b\x5e\x27\x5d\53\x29\47\57"];
private array $maskStringReplacement = ["\55\160\47\x2a\52\52\x2a\x2a\x2a\x2a\52\x2a\x2a\x2a\x2a\52\52\x2a\x2a\47"];
protected function validateInput(InputInterface $input)
{
goto e8580;
e8580:
$nativeDefinition = $this->getNativeDefinition();
goto F2bf9;
F2bf9:
$inputOptions = $nativeDefinition->getOptions();
goto A1a15;
A1a15:
if (!count($inputOptions)) {
goto B6453;
}
goto A6d0e;
A6d0e:
foreach ($inputOptions as $inputOption) {
goto D835b;
D835b:
if (!(true === $inputOption->isValueRequired())) {
goto a0216;
}
goto Be0f5;
Cebf8: a0216:
goto bba8d;
Be0f5:
$inputOptionValue = trim($input->getOption($inputOption->getName()));
goto D491e;
D491e:
if (!(true === empty($inputOptionValue))) {
goto b13ad;
}
goto a6c78;
d20d8: b13ad:
goto Cebf8;
bba8d: b439c:
goto Fe9ae;
a6c78:
throw new \Exception(sprintf("\x54\150\x65\x20\x22\55\55\45\x73\x22\40\x6f\x70\164\151\x6f\x6e\40\162\145\x71\x75\151\x72\145\x73\40\x61\40\166\x61\x6c\165\145\56", $inputOption->getName()));
goto d20d8;
Fe9ae:
}
goto B0ab4;
B0ab4: faa38:
goto Ccd5d;
Ccd5d: B6453:
goto f495b;
f495b:
}
public function setComment(string $comment)
{
$this->comment = $comment;
}
public function getComment(): ?string
{
return $this->comment;
}
protected function getLogger(): Logger
{
goto B9ca9;
d2338: B77b8:
goto ce8db;
ce8db:
return $this->logger;
goto Ea1c0;
afcef:
$this->logger = $this->get("\x61\160\160\x2e\154\x6f\147\x67\145\x72");
goto d2338;
B9ca9:
if (!(true === is_null($this->logger))) {
goto B77b8;
}
goto afcef;
Ea1c0:
}
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 B47b2;
B47b2:
$this->prepareConstraints($constraints);
goto Aaf32;
Aaf32:
foreach ($constraints as $constraint) {
goto e52d1;
e52d1:
$errorMessage = sprintf("\74\x65\x72\162\x6f\x72\76\45\x73\x3a\40\x25\163\74\57\x65\x72\162\x6f\162\76", $constraint->getPropertyPath(), $constraint->getMessage());
goto e4bfe;
e54b7: dd488:
goto d6b84;
e4bfe:
$output->writeln($errorMessage);
goto e54b7;
d6b84:
}
goto A8a56;
e9485:
return self::FAILURE;
goto e4b2f;
A8a56: db0fb:
goto e9485;
e4b2f:
}
protected function prepareConstraints(ConstraintViolationList $constraints): void
{
}
protected function changePropertyPath(string $oldPropertyPath, string $newPropertyPath, ConstraintViolationList $constraints): void
{
foreach ($constraints as $constraint) {
goto E4577;
Db565: Df767:
goto eb72d;
E4577:
if (!($oldPropertyPath == $constraint->getPropertyPath())) {
goto Dc74c;
}
goto fa8fd;
Ff724:
$reflectionProperty->setAccessible(true);
goto d7c23;
fa8fd:
$reflectionClass = new \ReflectionClass($constraint);
goto Be41c;
af6c8: Dc74c:
goto Db565;
d7c23:
$reflectionProperty->setValue($constraint, $newPropertyPath);
goto af6c8;
Be41c:
$reflectionProperty = $reflectionClass->getProperty("\160\x72\157\160\145\162\164\x79\120\x61\164\x68");
goto Ff724;
eb72d:
}
b75cf:
}
protected function getSystemUserName(): string
{
goto e6f26;
f400b:
$systemUserName = $systemUserInfo["\156\141\x6d\x65"] ?? '';
goto a9a98;
e6f26:
$systemUserInfo = $this->getSystemUserInfo();
goto f400b;
a9a98:
return $systemUserName;
goto Ef21a;
Ef21a:
}
protected function getSystemUserInfo(): array
{
$systemUserInfo = posix_getpwuid(posix_getuid());
return $systemUserInfo;
}
protected function getConfigValue(string $key): ?string
{
goto C3526;
C3526:
$configManager = $this->getConfigManager();
goto cae7e;
Fa82e:
return $configValue;
goto b1ab7;
cae7e:
$configValue = $configManager->get($key);
goto Fa82e;
b1ab7:
}
protected function getConfigManager(): ConfigManager
{
goto fa25e;
eb06c: e9cfa:
goto e5fd4;
fa25e:
if (!(true === is_null($this->configManager))) {
goto e9cfa;
}
goto D5359;
e5fd4:
return $this->configManager;
goto C6145;
D5359:
$this->configManager = $this->get("\x41\x70\160\x5c\x45\x6e\x74\151\x74\x79\134\x4d\x61\156\x61\147\145\x72\134\x43\x6f\x6e\146\151\147\115\x61\156\141\147\145\x72");
goto eb06c;
C6145:
}
public function getGroupName()
{
goto C73c0;
C73c0:
$name = $this->getName();
goto C70a5;
C70a5:
$groupName = strstr(strtolower($name), "\72", true);
goto F5e33;
F5e33:
return $groupName;
goto e3064;
e3064:
}
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 | d373e55140f7fce369b82c1d44324b25 |
Eval Count | 0 |
Decode Time | 83 ms |