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\Application; use App\System\Command\MoveFileCommand; use A..

Decoded Output download

<?php 
 
namespace App\Site\Application; 
 
use App\System\Command\MoveFileCommand; 
use App\System\Command\DeleteFileCommand; 
use App\System\Command\DeleteDirectoryCommand; 
use App\System\Command\DownloadFileCommand; 
use App\System\Command\BsdTarExtractCommand; 
use App\System\Command\ChownCommand; 
use App\System\Command\FindChmodCommand; 
use App\System\Command\WordPressConfigCreateCommand; 
use App\System\Command\WordPressCoreInstallCommand; 
use App\System\Command\WordPressSetConfigValueCommand; 
 
class WordPressInstaller extends Installer 
{ 
    private const LATEST_VERSION = "https://wordpress.org/latest.tar.gz"; 
    public function downloadAndExtractLatestVersion() 
    { 
        try { 
            goto a542f; 
            dc5e1: 
            $moveFileCommand->setDestinationFile($rootDirectory); 
            goto E822a; 
            C2918: 
            $tarExtractCommand = new BsdTarExtractCommand(); 
            goto Bc62a; 
            B2ee4: 
            $downloadFileCommand->setOutputFile($downloadTmpFile); 
            goto A83f1; 
            A83f1: 
            $deleteRootDirectoryCommand = new DeleteDirectoryCommand(); 
            goto F5593; 
            bfc56: 
            $deleteDownloadTmpFile->setFile($downloadTmpFile); 
            goto d4755; 
            F5593: 
            $deleteRootDirectoryCommand->setDirectory($rootDirectory); 
            goto C2918; 
            d4755: 
            $downloadFileCommand = new DownloadFileCommand(); 
            goto d2a3d; 
            D693e: 
            $htdocsDirectory = $this->getHtdocsDirectory(); 
            goto De9a7; 
            E2e7b: 
            $this->commandExecutor->execute($deleteRootDirectoryCommand); 
            goto Df445; 
            bbbde: 
            $tarExtractCommand->setDestinationFile($htdocsDirectory); 
            goto ca515; 
            A0527: 
            $this->commandExecutor->execute($moveFileCommand); 
            goto f35bf; 
            e51ce: 
            $moveFileCommand->setSourceFile($wordPressHtdocsDirectory); 
            goto dc5e1; 
            Ef374: 
            $deleteDownloadTmpFile = new DeleteFileCommand(); 
            goto bfc56; 
            Df445: 
            $this->commandExecutor->execute($tarExtractCommand, 60); 
            goto A0527; 
            d2a3d: 
            $downloadFileCommand->setFile(self::LATEST_VERSION); 
            goto B2ee4; 
            E822a: 
            $this->commandExecutor->execute($downloadFileCommand, 120); 
            goto E2e7b; 
            a542f: 
            $siteUser = $this->siteEntity->getUser(); 
            goto D693e; 
            Bc62a: 
            $tarExtractCommand->setSourceFile($downloadTmpFile); 
            goto bbbde; 
            ca515: 
            $moveFileCommand = new MoveFileCommand(); 
            goto e51ce; 
            De9a7: 
            $wordPressHtdocsDirectory = sprintf("%s/wordpress/", rtrim($htdocsDirectory, "/")); 
            goto B38c5; 
            B38c5: 
            $rootDirectory = $this->getRootDirectory(); 
            goto Cbc8d; 
            Cbc8d: 
            $downloadTmpFile = sprintf("/home/%s/tmp/%s.tar.gz", $siteUser, uniqid()); 
            goto Ef374; 
            f35bf: 
        } catch (\Exception $e) { 
            throw $e; 
        } finally { 
            $this->commandExecutor->execute($deleteDownloadTmpFile); 
        } 
    } 
    public function createConfig(string $databaseHost, string $databaseName, string $databaseUserName, string $databaseUserPassword): void 
    { 
        goto Edab9; 
        Bbb76: 
        $this->commandExecutor->execute($createConfigCommand); 
        goto db050; 
        a3ae1: 
        $createConfigCommand->setLocale("en_US"); 
        goto Bbb76; 
        df0fb: 
        $createConfigCommand->setRootDirectory($rootDirectory); 
        goto E46da; 
        E46da: 
        $createConfigCommand->setDatabaseHost($databaseHost); 
        goto A1b93; 
        A1b93: 
        $createConfigCommand->setDatabaseName($databaseName); 
        goto b8e6f; 
        Edab9: 
        $rootDirectory = $this->getRootDirectory(); 
        goto Aa808; 
        fed4d: 
        $createConfigCommand->setDatabaseUserPassword($databaseUserPassword); 
        goto a3ae1; 
        Aa808: 
        $createConfigCommand = new WordPressConfigCreateCommand(); 
        goto df0fb; 
        b8e6f: 
        $createConfigCommand->setDatabaseUserName($databaseUserName); 
        goto fed4d; 
        db050: 
    } 
    public function setConfigValue(string $key, mixed $value, bool $raw): void 
    { 
        goto D9023; 
        F2981: 
        $setConfigValueCommand->setRaw($raw); 
        goto c04a8; 
        D70b4: 
        $setConfigValueCommand->setValue($value); 
        goto F2981; 
        be97a: 
        $setConfigValueCommand = new WordPressSetConfigValueCommand(); 
        goto B92b4; 
        df2bc: 
        $setConfigValueCommand->setKey($key); 
        goto D70b4; 
        c04a8: 
        $this->commandExecutor->execute($setConfigValueCommand); 
        goto e9b33; 
        B92b4: 
        $setConfigValueCommand->setRootDirectory($rootDirectory); 
        goto df2bc; 
        D9023: 
        $rootDirectory = $this->getRootDirectory(); 
        goto be97a; 
        e9b33: 
    } 
    public function installCore(bool $isMultiSite, string $url, string $title, string $adminUserName, string $adminPassword, string $adminEmail): void 
    { 
        goto ed921; 
        D9eec: 
        $installCoreCommand->setIsMultiSite($isMultiSite); 
        goto c535c; 
        Ed518: 
        $installCoreCommand->setAdminEmail($adminEmail); 
        goto ed403; 
        De383: 
        $installCoreCommand->setAdminUser($adminUserName); 
        goto D9a40; 
        ed403: 
        $this->commandExecutor->execute($installCoreCommand, 90); 
        goto F9a49; 
        D9a40: 
        $installCoreCommand->setAdminPassword($adminPassword); 
        goto Ed518; 
        D64cf: 
        $installCoreCommand->setUrl($url); 
        goto c0d96; 
        c0d96: 
        $installCoreCommand->setTitle($title); 
        goto De383; 
        Aaaaf: 
        $installCoreCommand = new WordPressCoreInstallCommand(); 
        goto D9eec; 
        c535c: 
        $installCoreCommand->setRootDirectory($rootDirectory); 
        goto D64cf; 
        ed921: 
        $rootDirectory = $this->getRootDirectory(); 
        goto Aaaaf; 
        F9a49: 
    } 
    public function resetPermissions() 
    { 
        goto c9e54; 
        c7760: 
        $chownHtdocsCommand->setUser($siteUser); 
        goto d630d; 
        aac21: 
        $chmodHtdocsCommand = new FindChmodCommand(); 
        goto cf38e; 
        d630d: 
        $chownHtdocsCommand->setGroup($siteUser); 
        goto aac21; 
        d52a4: 
        $chownHtdocsCommand = new ChownCommand(); 
        goto Af3cf; 
        cf38e: 
        $chmodHtdocsCommand->setFile($htdocsDirectory); 
        goto a65ef; 
        c8c11: 
        $chmodHtdocsCommand->setFileChmod(770); 
        goto B5573; 
        B5573: 
        $this->commandExecutor->execute($chownHtdocsCommand, 300); 
        goto Ebaaf; 
        e333f: 
        $chownHtdocsCommand->setRecursive(true); 
        goto c7760; 
        Ebaaf: 
        $this->commandExecutor->execute($chmodHtdocsCommand, 300); 
        goto Baa31; 
        c9e54: 
        $siteUser = $this->siteEntity->getUser(); 
        goto D3285; 
        a65ef: 
        $chmodHtdocsCommand->setDirectoryChmod(770); 
        goto c8c11; 
        D3285: 
        $htdocsDirectory = $this->getHtdocsDirectory(); 
        goto d52a4; 
        Af3cf: 
        $chownHtdocsCommand->setFile($htdocsDirectory); 
        goto e333f; 
        Baa31: 
    } 
    private function getHtdocsDirectory(): string 
    { 
        goto be4b9; 
        Df87d: 
        $htdocsDirectory = sprintf("/home/%s/htdocs/", $siteUser); 
        goto A37d5; 
        A37d5: 
        return $htdocsDirectory; 
        goto dfa81; 
        be4b9: 
        $siteUser = $this->siteEntity->getUser(); 
        goto Df87d; 
        dfa81: 
    } 
    private function getRootDirectory(): string 
    { 
        goto df0a2; 
        C5b37: 
        return $rootDirectory; 
        goto c6b37; 
        Cf691: 
        $rootDirectory = sprintf("%s/%s", rtrim($htdocsDirectory, "/"), $this->siteEntity->getRootDirectory()); 
        goto C5b37; 
        df0a2: 
        $htdocsDirectory = $this->getHtdocsDirectory(); 
        goto Cf691; 
        c6b37: 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Site\Application;

use App\System\Command\MoveFileCommand;
use App\System\Command\DeleteFileCommand;
use App\System\Command\DeleteDirectoryCommand;
use App\System\Command\DownloadFileCommand;
use App\System\Command\BsdTarExtractCommand;
use App\System\Command\ChownCommand;
use App\System\Command\FindChmodCommand;
use App\System\Command\WordPressConfigCreateCommand;
use App\System\Command\WordPressCoreInstallCommand;
use App\System\Command\WordPressSetConfigValueCommand;

class WordPressInstaller extends Installer
{
    private const LATEST_VERSION = "\x68\164\x74\x70\163\x3a\57\x2f\167\157\x72\x64\x70\162\145\x73\163\x2e\x6f\x72\x67\57\x6c\x61\164\x65\x73\x74\56\x74\141\162\56\x67\x7a";
    public function downloadAndExtractLatestVersion()
    {
        try {
            goto a542f;
            dc5e1:
            $moveFileCommand->setDestinationFile($rootDirectory);
            goto E822a;
            C2918:
            $tarExtractCommand = new BsdTarExtractCommand();
            goto Bc62a;
            B2ee4:
            $downloadFileCommand->setOutputFile($downloadTmpFile);
            goto A83f1;
            A83f1:
            $deleteRootDirectoryCommand = new DeleteDirectoryCommand();
            goto F5593;
            bfc56:
            $deleteDownloadTmpFile->setFile($downloadTmpFile);
            goto d4755;
            F5593:
            $deleteRootDirectoryCommand->setDirectory($rootDirectory);
            goto C2918;
            d4755:
            $downloadFileCommand = new DownloadFileCommand();
            goto d2a3d;
            D693e:
            $htdocsDirectory = $this->getHtdocsDirectory();
            goto De9a7;
            E2e7b:
            $this->commandExecutor->execute($deleteRootDirectoryCommand);
            goto Df445;
            bbbde:
            $tarExtractCommand->setDestinationFile($htdocsDirectory);
            goto ca515;
            A0527:
            $this->commandExecutor->execute($moveFileCommand);
            goto f35bf;
            e51ce:
            $moveFileCommand->setSourceFile($wordPressHtdocsDirectory);
            goto dc5e1;
            Ef374:
            $deleteDownloadTmpFile = new DeleteFileCommand();
            goto bfc56;
            Df445:
            $this->commandExecutor->execute($tarExtractCommand, 60);
            goto A0527;
            d2a3d:
            $downloadFileCommand->setFile(self::LATEST_VERSION);
            goto B2ee4;
            E822a:
            $this->commandExecutor->execute($downloadFileCommand, 120);
            goto E2e7b;
            a542f:
            $siteUser = $this->siteEntity->getUser();
            goto D693e;
            Bc62a:
            $tarExtractCommand->setSourceFile($downloadTmpFile);
            goto bbbde;
            ca515:
            $moveFileCommand = new MoveFileCommand();
            goto e51ce;
            De9a7:
            $wordPressHtdocsDirectory = sprintf("\x25\x73\57\x77\x6f\162\144\x70\162\145\x73\x73\57", rtrim($htdocsDirectory, "\x2f"));
            goto B38c5;
            B38c5:
            $rootDirectory = $this->getRootDirectory();
            goto Cbc8d;
            Cbc8d:
            $downloadTmpFile = sprintf("\57\x68\157\155\145\x2f\45\x73\x2f\x74\x6d\160\57\45\x73\x2e\164\x61\x72\56\147\172", $siteUser, uniqid());
            goto Ef374;
            f35bf:
        } catch (\Exception $e) {
            throw $e;
        } finally {
            $this->commandExecutor->execute($deleteDownloadTmpFile);
        }
    }
    public function createConfig(string $databaseHost, string $databaseName, string $databaseUserName, string $databaseUserPassword): void
    {
        goto Edab9;
        Bbb76:
        $this->commandExecutor->execute($createConfigCommand);
        goto db050;
        a3ae1:
        $createConfigCommand->setLocale("\x65\x6e\x5f\x55\x53");
        goto Bbb76;
        df0fb:
        $createConfigCommand->setRootDirectory($rootDirectory);
        goto E46da;
        E46da:
        $createConfigCommand->setDatabaseHost($databaseHost);
        goto A1b93;
        A1b93:
        $createConfigCommand->setDatabaseName($databaseName);
        goto b8e6f;
        Edab9:
        $rootDirectory = $this->getRootDirectory();
        goto Aa808;
        fed4d:
        $createConfigCommand->setDatabaseUserPassword($databaseUserPassword);
        goto a3ae1;
        Aa808:
        $createConfigCommand = new WordPressConfigCreateCommand();
        goto df0fb;
        b8e6f:
        $createConfigCommand->setDatabaseUserName($databaseUserName);
        goto fed4d;
        db050:
    }
    public function setConfigValue(string $key, mixed $value, bool $raw): void
    {
        goto D9023;
        F2981:
        $setConfigValueCommand->setRaw($raw);
        goto c04a8;
        D70b4:
        $setConfigValueCommand->setValue($value);
        goto F2981;
        be97a:
        $setConfigValueCommand = new WordPressSetConfigValueCommand();
        goto B92b4;
        df2bc:
        $setConfigValueCommand->setKey($key);
        goto D70b4;
        c04a8:
        $this->commandExecutor->execute($setConfigValueCommand);
        goto e9b33;
        B92b4:
        $setConfigValueCommand->setRootDirectory($rootDirectory);
        goto df2bc;
        D9023:
        $rootDirectory = $this->getRootDirectory();
        goto be97a;
        e9b33:
    }
    public function installCore(bool $isMultiSite, string $url, string $title, string $adminUserName, string $adminPassword, string $adminEmail): void
    {
        goto ed921;
        D9eec:
        $installCoreCommand->setIsMultiSite($isMultiSite);
        goto c535c;
        Ed518:
        $installCoreCommand->setAdminEmail($adminEmail);
        goto ed403;
        De383:
        $installCoreCommand->setAdminUser($adminUserName);
        goto D9a40;
        ed403:
        $this->commandExecutor->execute($installCoreCommand, 90);
        goto F9a49;
        D9a40:
        $installCoreCommand->setAdminPassword($adminPassword);
        goto Ed518;
        D64cf:
        $installCoreCommand->setUrl($url);
        goto c0d96;
        c0d96:
        $installCoreCommand->setTitle($title);
        goto De383;
        Aaaaf:
        $installCoreCommand = new WordPressCoreInstallCommand();
        goto D9eec;
        c535c:
        $installCoreCommand->setRootDirectory($rootDirectory);
        goto D64cf;
        ed921:
        $rootDirectory = $this->getRootDirectory();
        goto Aaaaf;
        F9a49:
    }
    public function resetPermissions()
    {
        goto c9e54;
        c7760:
        $chownHtdocsCommand->setUser($siteUser);
        goto d630d;
        aac21:
        $chmodHtdocsCommand = new FindChmodCommand();
        goto cf38e;
        d630d:
        $chownHtdocsCommand->setGroup($siteUser);
        goto aac21;
        d52a4:
        $chownHtdocsCommand = new ChownCommand();
        goto Af3cf;
        cf38e:
        $chmodHtdocsCommand->setFile($htdocsDirectory);
        goto a65ef;
        c8c11:
        $chmodHtdocsCommand->setFileChmod(770);
        goto B5573;
        B5573:
        $this->commandExecutor->execute($chownHtdocsCommand, 300);
        goto Ebaaf;
        e333f:
        $chownHtdocsCommand->setRecursive(true);
        goto c7760;
        Ebaaf:
        $this->commandExecutor->execute($chmodHtdocsCommand, 300);
        goto Baa31;
        c9e54:
        $siteUser = $this->siteEntity->getUser();
        goto D3285;
        a65ef:
        $chmodHtdocsCommand->setDirectoryChmod(770);
        goto c8c11;
        D3285:
        $htdocsDirectory = $this->getHtdocsDirectory();
        goto d52a4;
        Af3cf:
        $chownHtdocsCommand->setFile($htdocsDirectory);
        goto e333f;
        Baa31:
    }
    private function getHtdocsDirectory(): string
    {
        goto be4b9;
        Df87d:
        $htdocsDirectory = sprintf("\57\x68\157\x6d\x65\57\45\x73\x2f\150\x74\x64\x6f\143\x73\57", $siteUser);
        goto A37d5;
        A37d5:
        return $htdocsDirectory;
        goto dfa81;
        be4b9:
        $siteUser = $this->siteEntity->getUser();
        goto Df87d;
        dfa81:
    }
    private function getRootDirectory(): string
    {
        goto df0a2;
        C5b37:
        return $rootDirectory;
        goto c6b37;
        Cf691:
        $rootDirectory = sprintf("\x25\163\57\x25\163", rtrim($htdocsDirectory, "\57"), $this->siteEntity->getRootDirectory());
        goto C5b37;
        df0a2:
        $htdocsDirectory = $this->getHtdocsDirectory();
        goto Cf691;
        c6b37:
    }
}

Function Calls

None

Variables

None

Stats

MD5 4496231f54c12ff614c9323d84040f26
Eval Count 0
Decode Time 83 ms