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\Creator; use App\Site\Creator as SiteCreator; use App\Site..

Decoded Output download

<?php 
 
namespace App\Site\Creator; 
 
use App\Site\Creator as SiteCreator; 
use App\Site\Nginx\Vhost\PhpTemplate; 
use App\Site\PhpFpm\Pool; 
use App\Site\PhpFpm\PoolBuilder; 
use App\Site\PhpFpm\PoolReader; 
use App\System\Command\CreateDirectoryCommand; 
use App\System\Command\WriteFileCommand; 
use App\System\Command\CopyFileCommand; 
 
class PhpSite extends SiteCreator 
{ 
    private const INDEX_PHP_TEMPLATE = "<?php

echo 'Hello World :-)';"; 
 
    public function createPhpFpmPool(): void 
    { 
        goto Bbec1; 
        ffadf: 
        $writePoolFileCommand->setContent($poolContent); 
        goto B8674; 
        Caadf: 
        $poolReader = new PoolReader($poolDirectory); 
        goto de920; 
        A63e6: 
        $pool->setPort($poolPort); 
        goto Ce79c; 
        f0bae: 
        $poolBuilder = new PoolBuilder(); 
        goto Ea6e5; 
        d1967: 
        $domainName = $this->site->getDomainName(); 
        goto Daf44; 
        facff: 
        $phpSettings = $this->site->getPhpSettings(); 
        goto d1967; 
        Daf44: 
        $phpVersion = $phpSettings->getPhpVersion(); 
        goto Df643; 
        d1609: 
        $writePoolFileCommand->setFile($poolFile); 
        goto ffadf; 
        Bb962: 
        $pool = new Pool(); 
        goto abe5c; 
        fe276: 
        usort($pools, function ($a, $b) { 
            return $a->getPort() < $b->getPort(); 
        }); 
        goto C788c; 
        C788c: 
        $latestPool = array_shift($pools); 
        goto bba5f; 
        abe5c: 
        $pool->setName($domainName); 
        goto dfb4a; 
        B6263: 
        $poolFile = sprintf("/etc/php/%s/fpm/pool.d/%s.conf", $phpVersion, $domainName); 
        goto a83db; 
        bba5f: 
        $poolPort = $latestPool->getPort() + 1; 
        goto Bb962; 
        dfb4a: 
        $pool->setUser($siteUser); 
        goto Ab8df; 
        Df643: 
        $poolDirectory = sprintf("/etc/php/%s/fpm/pool.d/", $phpVersion); 
        goto Caadf; 
        Ea6e5: 
        $poolContent = $poolBuilder->create($pool); 
        goto B6263; 
        Bbec1: 
        $siteUser = $this->site->getUser(); 
        goto facff; 
        B8674: 
        $this->commandExecutor->execute($writePoolFileCommand); 
        goto Ca78f; 
        a83db: 
        $writePoolFileCommand = new WriteFileCommand(); 
        goto d1609; 
        Ce79c: 
        $phpSettings->setPoolPort($poolPort); 
        goto f0bae; 
        de920: 
        $pools = $poolReader->getPools(); 
        goto fe276; 
        Ab8df: 
        $pool->setGroup($siteUser); 
        goto A63e6; 
        Ca78f: 
    } 
 
    public function createVarnishCacheStructure(array $varnishCacheSettings) 
    { 
        goto c48f8; 
        D8161: 
        $writeVarnishCacheSettingsFileCommand->setFile($varnishCacheSettingsFile); 
        goto eede0; 
        Fb5ef: 
        $this->commandExecutor->execute($createVarnishCacheDirectoryCommand); 
        goto d9339; 
        E8238: 
        $copyVarnishControllerFileCommand->setSourceFile($varnishControllerSourceFile); 
        goto fd60a; 
        c48f8: 
        $varnishController = $varnishCacheSettings["controller"] ?? null; 
        goto c0c78; 
        ed8e8: 
        $writeVarnishCachePurgeLogfileCommand->setContent(''); 
        goto Fb5ef; 
        b87ab: 
        $varnishCacheDirectory = sprintf("/home/%s/.varnish-cache/", $siteUser); 
        goto e42c0; 
        e1fe6: 
        $this->commandExecutor->execute($copyVarnishControllerFileCommand); 
        goto De090; 
        b70d3: 
        unset($varnishCacheSettings["controller"]); 
        goto D0841; 
        D7bb8: 
        $createVarnishCacheDirectoryCommand = new CreateDirectoryCommand(); 
        goto C5b8a; 
        c6119: 
        $writeVarnishCachePurgeLogfileCommand->setFile($varnishCachePurgeLogfile); 
        goto ed8e8; 
        c8fa6: 
        $writeVarnishCachePurgeLogfileCommand = new WriteFileCommand(); 
        goto c6119; 
        A3fc4: 
        $writeVarnishCacheSettingsFileCommand = new WriteFileCommand(); 
        goto D8161; 
        fd60a: 
        $copyVarnishControllerFileCommand->setDestinationFile($varnishCacheControllerFile); 
        goto c2aa2; 
        De090: 
        $this->commandExecutor->execute($createVarnishCacheLogDirectoryCommand); 
        goto Cbdc6; 
        dc3b9: 
        $siteUser = $this->site->getUser(); 
        goto b87ab; 
        C5b8a: 
        $createVarnishCacheDirectoryCommand->setDirectory($varnishCacheDirectory); 
        goto A3fc4; 
        e42c0: 
        $varnishCacheLogDirectory = sprintf("/home/%s/logs/varnish-cache/", $siteUser); 
        goto Fd40a; 
        eede0: 
        $writeVarnishCacheSettingsFileCommand->setContent(json_encode($varnishCacheSettings, JSON_PRETTY_PRINT)); 
        goto F467b; 
        D0841: bf7dd: 
        goto Eb833; 
        af7ea: 
        $createVarnishCacheLogDirectoryCommand->setDirectory($varnishCacheLogDirectory); 
        goto c8fa6; 
        Fd40a: 
        $varnishCacheSettingsFile = sprintf("%s/settings.json", rtrim($varnishCacheDirectory, "/")); 
        goto Bcde0; 
        d9339: 
        $this->commandExecutor->execute($writeVarnishCacheSettingsFileCommand); 
        goto e1fe6; 
        e6379: 
        $varnishCacheControllerFile = sprintf("%s/controller.php", rtrim($varnishCacheDirectory, "/")); 
        goto D7bb8; 
        c0c78: 
        if (!(true === isset($varnishCacheSettings["controller"]))) { 
            goto bf7dd; 
        } 
        goto b70d3; 
        Cbdc6: 
        $this->commandExecutor->execute($writeVarnishCachePurgeLogfileCommand); 
        goto c547a; 
        c2aa2: 
        $createVarnishCacheLogDirectoryCommand = new CreateDirectoryCommand(); 
        goto af7ea; 
        Eb833: 
        $varnishControllerSourceFile = realpath(dirname(__FILE__) . sprintf("/../../../resources/varnish-cache/controller/%s/controller.php", $varnishController)); 
        goto dc3b9; 
        Bcde0: 
        $varnishCachePurgeLogfile = sprintf("%s/purge.log", rtrim($varnishCacheLogDirectory, "/")); 
        goto e6379; 
        F467b: 
        $copyVarnishControllerFileCommand = new CopyFileCommand(); 
        goto E8238; 
        c547a: 
    } 
 
    public function createIndexPhp(): void 
    { 
        goto Cf4d8; 
        f15a7: 
        $writeIndexPhpFileCommand->setContent(self::INDEX_PHP_TEMPLATE); 
        goto d5703; 
        b9f8f: 
        $indexPhpFile = sprintf("%s/index.php", rtrim($rootDirectory, "/")); 
        goto da022; 
        d5703: 
        $this->commandExecutor->execute($writeIndexPhpFileCommand); 
        goto Bc6c0; 
        Fc931: 
        $writeIndexPhpFileCommand->setFile($indexPhpFile); 
        goto f15a7; 
        Cf4d8: 
        $rootDirectory = $this->getRootDirectory(); 
        goto b9f8f; 
        da022: 
        $writeIndexPhpFileCommand = new WriteFileCommand(); 
        goto Fc931; 
        Bc6c0: 
    } 
 
    public function reloadPhpFpmService() 
    { 
        goto a432d; 
        a432d: 
        $phpSettings = $this->site->getPhpSettings(); 
        goto B2bf5; 
        a216a: 
        $this->reloadService($serviceName); 
        goto cfb79; 
        B2bf5: 
        $phpVersion = $phpSettings->getPhpVersion(); 
        goto Da419; 
        Da419: 
        $serviceName = sprintf("php%s-fpm", $phpVersion); 
        goto a216a; 
        cfb79: 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Site\Creator;

use App\Site\Creator as SiteCreator;
use App\Site\Nginx\Vhost\PhpTemplate;
use App\Site\PhpFpm\Pool;
use App\Site\PhpFpm\PoolBuilder;
use App\Site\PhpFpm\PoolReader;
use App\System\Command\CreateDirectoryCommand;
use App\System\Command\WriteFileCommand;
use App\System\Command\CopyFileCommand;

class PhpSite extends SiteCreator
{
    private const INDEX_PHP_TEMPLATE = "\74\77\160\150\x70\12\12\x65\143\x68\x6f\x20\x27\x48\x65\x6c\x6c\157\40\127\157\x72\x6c\144\40\72\55\x29\x27\73";

    public function createPhpFpmPool(): void
    {
        goto Bbec1;
        ffadf:
        $writePoolFileCommand->setContent($poolContent);
        goto B8674;
        Caadf:
        $poolReader = new PoolReader($poolDirectory);
        goto de920;
        A63e6:
        $pool->setPort($poolPort);
        goto Ce79c;
        f0bae:
        $poolBuilder = new PoolBuilder();
        goto Ea6e5;
        d1967:
        $domainName = $this->site->getDomainName();
        goto Daf44;
        facff:
        $phpSettings = $this->site->getPhpSettings();
        goto d1967;
        Daf44:
        $phpVersion = $phpSettings->getPhpVersion();
        goto Df643;
        d1609:
        $writePoolFileCommand->setFile($poolFile);
        goto ffadf;
        Bb962:
        $pool = new Pool();
        goto abe5c;
        fe276:
        usort($pools, function ($a, $b) {
            return $a->getPort() < $b->getPort();
        });
        goto C788c;
        C788c:
        $latestPool = array_shift($pools);
        goto bba5f;
        abe5c:
        $pool->setName($domainName);
        goto dfb4a;
        B6263:
        $poolFile = sprintf("\57\145\x74\x63\57\x70\150\160\x2f\45\x73\x2f\x66\160\155\x2f\x70\x6f\157\154\56\x64\x2f\45\163\56\x63\x6f\x6e\x66", $phpVersion, $domainName);
        goto a83db;
        bba5f:
        $poolPort = $latestPool->getPort() + 1;
        goto Bb962;
        dfb4a:
        $pool->setUser($siteUser);
        goto Ab8df;
        Df643:
        $poolDirectory = sprintf("\57\x65\164\143\x2f\160\x68\x70\57\x25\x73\57\x66\160\x6d\57\160\x6f\x6f\x6c\56\144\x2f", $phpVersion);
        goto Caadf;
        Ea6e5:
        $poolContent = $poolBuilder->create($pool);
        goto B6263;
        Bbec1:
        $siteUser = $this->site->getUser();
        goto facff;
        B8674:
        $this->commandExecutor->execute($writePoolFileCommand);
        goto Ca78f;
        a83db:
        $writePoolFileCommand = new WriteFileCommand();
        goto d1609;
        Ce79c:
        $phpSettings->setPoolPort($poolPort);
        goto f0bae;
        de920:
        $pools = $poolReader->getPools();
        goto fe276;
        Ab8df:
        $pool->setGroup($siteUser);
        goto A63e6;
        Ca78f:
    }

    public function createVarnishCacheStructure(array $varnishCacheSettings)
    {
        goto c48f8;
        D8161:
        $writeVarnishCacheSettingsFileCommand->setFile($varnishCacheSettingsFile);
        goto eede0;
        Fb5ef:
        $this->commandExecutor->execute($createVarnishCacheDirectoryCommand);
        goto d9339;
        E8238:
        $copyVarnishControllerFileCommand->setSourceFile($varnishControllerSourceFile);
        goto fd60a;
        c48f8:
        $varnishController = $varnishCacheSettings["\143\x6f\x6e\164\x72\x6f\x6c\154\x65\x72"] ?? null;
        goto c0c78;
        ed8e8:
        $writeVarnishCachePurgeLogfileCommand->setContent('');
        goto Fb5ef;
        b87ab:
        $varnishCacheDirectory = sprintf("\x2f\x68\x6f\x6d\x65\57\x25\163\57\56\x76\141\162\156\151\163\150\x2d\143\x61\x63\x68\145\57", $siteUser);
        goto e42c0;
        e1fe6:
        $this->commandExecutor->execute($copyVarnishControllerFileCommand);
        goto De090;
        b70d3:
        unset($varnishCacheSettings["\143\x6f\x6e\x74\162\x6f\154\x6c\x65\162"]);
        goto D0841;
        D7bb8:
        $createVarnishCacheDirectoryCommand = new CreateDirectoryCommand();
        goto C5b8a;
        c6119:
        $writeVarnishCachePurgeLogfileCommand->setFile($varnishCachePurgeLogfile);
        goto ed8e8;
        c8fa6:
        $writeVarnishCachePurgeLogfileCommand = new WriteFileCommand();
        goto c6119;
        A3fc4:
        $writeVarnishCacheSettingsFileCommand = new WriteFileCommand();
        goto D8161;
        fd60a:
        $copyVarnishControllerFileCommand->setDestinationFile($varnishCacheControllerFile);
        goto c2aa2;
        De090:
        $this->commandExecutor->execute($createVarnishCacheLogDirectoryCommand);
        goto Cbdc6;
        dc3b9:
        $siteUser = $this->site->getUser();
        goto b87ab;
        C5b8a:
        $createVarnishCacheDirectoryCommand->setDirectory($varnishCacheDirectory);
        goto A3fc4;
        e42c0:
        $varnishCacheLogDirectory = sprintf("\x2f\150\x6f\x6d\145\57\45\163\57\154\157\x67\163\57\x76\141\x72\156\x69\x73\150\x2d\143\x61\x63\150\145\57", $siteUser);
        goto Fd40a;
        eede0:
        $writeVarnishCacheSettingsFileCommand->setContent(json_encode($varnishCacheSettings, JSON_PRETTY_PRINT));
        goto F467b;
        D0841: bf7dd:
        goto Eb833;
        af7ea:
        $createVarnishCacheLogDirectoryCommand->setDirectory($varnishCacheLogDirectory);
        goto c8fa6;
        Fd40a:
        $varnishCacheSettingsFile = sprintf("\x25\163\x2f\163\x65\164\x74\151\x6e\x67\x73\x2e\152\x73\157\x6e", rtrim($varnishCacheDirectory, "\57"));
        goto Bcde0;
        d9339:
        $this->commandExecutor->execute($writeVarnishCacheSettingsFileCommand);
        goto e1fe6;
        e6379:
        $varnishCacheControllerFile = sprintf("\45\x73\x2f\x63\157\x6e\x74\x72\157\x6c\x6c\x65\162\56\160\x68\x70", rtrim($varnishCacheDirectory, "\x2f"));
        goto D7bb8;
        c0c78:
        if (!(true === isset($varnishCacheSettings["\143\x6f\156\164\162\157\154\x6c\x65\x72"]))) {
            goto bf7dd;
        }
        goto b70d3;
        Cbdc6:
        $this->commandExecutor->execute($writeVarnishCachePurgeLogfileCommand);
        goto c547a;
        c2aa2:
        $createVarnishCacheLogDirectoryCommand = new CreateDirectoryCommand();
        goto af7ea;
        Eb833:
        $varnishControllerSourceFile = realpath(dirname(__FILE__) . sprintf("\x2f\x2e\x2e\57\x2e\56\57\x2e\56\57\x72\x65\x73\157\165\162\x63\x65\x73\x2f\x76\141\162\x6e\x69\x73\x68\x2d\x63\x61\143\150\145\x2f\x63\x6f\156\x74\162\x6f\154\x6c\x65\x72\57\45\163\57\x63\157\x6e\x74\x72\x6f\x6c\x6c\x65\x72\56\160\x68\160", $varnishController));
        goto dc3b9;
        Bcde0:
        $varnishCachePurgeLogfile = sprintf("\45\163\x2f\x70\x75\162\x67\x65\56\154\x6f\147", rtrim($varnishCacheLogDirectory, "\57"));
        goto e6379;
        F467b:
        $copyVarnishControllerFileCommand = new CopyFileCommand();
        goto E8238;
        c547a:
    }

    public function createIndexPhp(): void
    {
        goto Cf4d8;
        f15a7:
        $writeIndexPhpFileCommand->setContent(self::INDEX_PHP_TEMPLATE);
        goto d5703;
        b9f8f:
        $indexPhpFile = sprintf("\x25\163\x2f\x69\x6e\x64\145\170\56\160\x68\160", rtrim($rootDirectory, "\x2f"));
        goto da022;
        d5703:
        $this->commandExecutor->execute($writeIndexPhpFileCommand);
        goto Bc6c0;
        Fc931:
        $writeIndexPhpFileCommand->setFile($indexPhpFile);
        goto f15a7;
        Cf4d8:
        $rootDirectory = $this->getRootDirectory();
        goto b9f8f;
        da022:
        $writeIndexPhpFileCommand = new WriteFileCommand();
        goto Fc931;
        Bc6c0:
    }

    public function reloadPhpFpmService()
    {
        goto a432d;
        a432d:
        $phpSettings = $this->site->getPhpSettings();
        goto B2bf5;
        a216a:
        $this->reloadService($serviceName);
        goto cfb79;
        B2bf5:
        $phpVersion = $phpSettings->getPhpVersion();
        goto Da419;
        Da419:
        $serviceName = sprintf("\160\x68\160\x25\163\x2d\146\x70\x6d", $phpVersion);
        goto a216a;
        cfb79:
    }
}

Function Calls

None

Variables

None

Stats

MD5 650c1c47536ceb8c2c117f298b178423
Eval Count 0
Decode Time 60 ms