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\System\Command; use App\System\Command; class TarCreateCommand exten..

Decoded Output download

<?php 
 namespace App\System\Command; use App\System\Command; class TarCreateCommand extends Command { private array $sources = []; private ?string $destinationFile = null; private array $flags = []; public function getCommand() : string { goto Ff975; Ff975: if ($this->command) { goto c7073; } goto cffa8; C94b1: $renderedFlags = $this->getRenderedFlags(); goto c7c5e; C629c: $destinationFile = $this->getDestinationFile(); goto C94b1; A4a44: return $this->command; goto Be5b0; cffa8: $sources = $this->getSources(); goto C629c; Bce6b: c7073: goto A4a44; c7c5e: $this->command = sprintf("/usr/bin/sudo /bin/tar cfv %s %s %s --warning=no-file-changed", escapeshellarg($destinationFile), $renderedFlags, implode(" ", $sources)); goto Bce6b; Be5b0: } public function isSuccessful() : bool { return true; } public function setSources(array $sources) : void { $this->sources = $sources; } public function getSources() : array { return $this->sources; } public function setDestinationFile(string $destinationFile) : void { $this->destinationFile = $destinationFile; } public function getDestinationFile() : ?string { return $this->destinationFile; } public function setExcludes(array $excludes) : void { foreach ($excludes as $path) { $this->addFlag("--exclude", $path); d107d: } e49e1: } public function addFlag(string $flag, string $value) { $this->flags[] = ["flag" => $flag, "value" => $value]; } public function getFlags() : array { return $this->flags; } private function getRenderedFlags() : string { goto b8207; E5967: foreach ($flags as $flag) { $renderedFlags[] = sprintf("%s=%s", $flag["flag"], escapeshellarg($flag["value"])); A2a9c: } goto D9c77; Db490: return $renderedFlags; goto B8018; b8207: $renderedFlags = []; goto Ebf2a; D9c77: e1148: goto c821a; c821a: $renderedFlags = implode(" ", $renderedFlags); goto Db490; Ebf2a: $flags = $this->getFlags(); goto E5967; B8018: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 namespace App\System\Command; use App\System\Command; class TarCreateCommand extends Command { private array $sources = []; private ?string $destinationFile = null; private array $flags = []; public function getCommand() : string { goto Ff975; Ff975: if ($this->command) { goto c7073; } goto cffa8; C94b1: $renderedFlags = $this->getRenderedFlags(); goto c7c5e; C629c: $destinationFile = $this->getDestinationFile(); goto C94b1; A4a44: return $this->command; goto Be5b0; cffa8: $sources = $this->getSources(); goto C629c; Bce6b: c7073: goto A4a44; c7c5e: $this->command = sprintf("\57\165\x73\x72\57\x62\x69\156\x2f\x73\165\144\157\40\57\x62\x69\x6e\57\x74\141\x72\40\143\146\x76\x20\45\x73\x20\45\163\40\x25\x73\x20\55\x2d\x77\141\162\x6e\151\x6e\x67\x3d\156\x6f\55\146\151\154\x65\55\x63\x68\141\x6e\x67\x65\144", escapeshellarg($destinationFile), $renderedFlags, implode("\40", $sources)); goto Bce6b; Be5b0: } public function isSuccessful() : bool { return true; } public function setSources(array $sources) : void { $this->sources = $sources; } public function getSources() : array { return $this->sources; } public function setDestinationFile(string $destinationFile) : void { $this->destinationFile = $destinationFile; } public function getDestinationFile() : ?string { return $this->destinationFile; } public function setExcludes(array $excludes) : void { foreach ($excludes as $path) { $this->addFlag("\x2d\x2d\145\170\x63\154\x75\144\145", $path); d107d: } e49e1: } public function addFlag(string $flag, string $value) { $this->flags[] = ["\x66\x6c\x61\x67" => $flag, "\166\x61\x6c\x75\x65" => $value]; } public function getFlags() : array { return $this->flags; } private function getRenderedFlags() : string { goto b8207; E5967: foreach ($flags as $flag) { $renderedFlags[] = sprintf("\x25\x73\75\45\163", $flag["\146\x6c\141\x67"], escapeshellarg($flag["\x76\x61\154\165\145"])); A2a9c: } goto D9c77; Db490: return $renderedFlags; goto B8018; b8207: $renderedFlags = []; goto Ebf2a; D9c77: e1148: goto c821a; c821a: $renderedFlags = implode("\x20", $renderedFlags); goto Db490; Ebf2a: $flags = $this->getFlags(); goto E5967; B8018: } }

Function Calls

None

Variables

None

Stats

MD5 cdd323cdd2a21ef69ed6e72441243e95
Eval Count 0
Decode Time 43 ms