PHP Code Editor
<?php /** * MW3 RCON Forensic Debugger - 9s Refresh & Max Detail Streaming * Host: mw3.rsl.my.id | Port: 27016 */ if (isset($_GET['ajax_action']) && $_GET['ajax_action'] == 'debug') { // Mematikan semua jenis buffering agar streaming baris-per-baris berfungsi @ini_set('output_buffering', 'off'); @ini_set('zlib.output_compression', false); while (@ob_end_flush()); header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); header('X-Accel-Buffering: no'); $host = "mw3.rsl.my.id"; $port = 27016; $password = "ISI_PASSWORD_RCON_ANDA"; // <--- WAJIB DIISI function send_ev($msg, $type = "INFO", $players = null, $done = false) { echo "data: " . json_encode([ "time" => date("H:i:s.v"), "msg" => $msg, "type" => $type, "players" => $players, "done" => $done ]) . "\n\n"; @flush(); } // --- PHASE 1: NETWORK RECON --- send_ev("START: Inisialisasi Forensik Maksimal untuk $host", "INFO"); $ip = gethostbyname($host); send_ev("DNS_RESOLVED: Target terurai ke IP $ip", "SUCCESS"); // --- PHASE 2: UDP PROBE --- for ($i = 1; $i <= 3; $i++) { $u_sock = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_set_option($u_sock, SOL_SOCKET, SO_RCVTIMEO, ["sec" => 5, "usec" => 0]); $p_start = microtime(true); @socket_sendto($u_sock, "\x00", 1, 0, $ip, $port); $p_recv = @socket_recvfrom($u_sock, $p_buf, 64, 0, $p_from, $p_fport); $p_dur = round((microtime(true) - $p_start) * 1000, 2); if ($p_recv !== false) send_ev("UDP_PROBE #$i: SUCCESS | RTT: {$p_dur}ms", "SUCCESS"); else send_ev("UDP_PROBE #$i: TIMEOUT", "ERROR"); @socket_close($u_sock); usleep(200000); } // --- PHASE 3: RCON DEEP INSPECTION --- send_ev("RCON_INIT: Alokasi socket resource AF_INET...", "INFO"); $socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); if ($socket) { socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, ["sec" => 8, "usec" => 0]); $payload = "\xff\xff\xff\xffrcon \"" . $password . "\" status\n"; send_ev("PAYLOAD_HEX: 0x" . strtoupper(bin2hex($payload)), "INFO"); send_ev("XMIT_START: Mengirim " . strlen($payload) . " bytes paket RCON...", "INFO"); $send_time = microtime(true); if (@socket_sendto($socket, $payload, strlen($payload), 0, $ip, $port)) { send_ev("XMIT_OK: Paket keluar ke interface jaringan.", "SUCCESS"); send_ev("LISTENING: Menunggu respon terfragmentasi (Max 8s)...", "INFO"); $buf = ""; $from = ""; $f_port = 0; $received = @socket_recvfrom($socket, $buf, 65535, 0, $from, $f_port); $rtt = round((microtime(true) - $send_time) * 1000, 2); if ($received !== false) { send_ev("RECV_OK: Berhasil menarik $received bytes (RTT: {$rtt}ms).", "SUCCESS"); send_ev("RESP_HEADER: 0x" . strtoupper(bin2hex(substr($buf, 0, 4))), "INFO"); if (strpos($buf, "Invalid password") !== false) { send_ev("AUTH_FAIL: Password RCON Salah!", "ERROR", null, true); } else { $clean_data = substr($buf, 10); $lines = explode("\n", $clean_data); $player_list = []; foreach ($lines as $line) { if (preg_match('/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(.+)$/', trim($line), $m)) { $player_list[] = ["id"=>$m[1],"score"=>$m[2],"ping"=>$m[3],"name"=>preg_replace('/\^[0-9]/','',$m[4])]; } } send_ev("COMPLETE: " . count($player_list) . " Pemain diproses.", "SUCCESS", $player_list, true); } } else { send_ev("RCON_TIMEOUT: Server tidak merespon (8s limit terlampaui).", "ERROR", null, true); } } @socket_close($socket); } exit; } ?> <!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8"> <title>Forensic RCON - 9s Refresh</title> <style> body { background: #080a10; color: #a0aabf; font-family: 'Consolas', monospace; padding: 20px; font-size: 13px; } .wrapper { max-width: 900px; margin: auto; } .header-flex { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; } .term { background: #000; border: 1px solid #1a2026; padding: 15px; height: 320px; overflow-y: auto; border-radius: 4px; box-shadow: inset 0 0 10px #000; } .line { margin-bottom: 2px; border-bottom: 1px solid #0d1115; font-size: 11px; } .INFO { color: #51afef; } .SUCCESS { color: #98c379; } .ERROR { color: #e06c75; } .player-table { width: 100%; border-collapse: collapse; margin-top: 15px; background: #0d1117; display: none; } .player-table th { background: #1a2026; color: #fff; padding: 10px; text-align: left; border-bottom: 2px solid #51afef; } .player-table td { padding: 10px; border-bottom: 1px solid #1a2026; } #execBtn { background: #1a2026; color: #51afef; border: 1px solid #51afef; padding: 8px 20px; cursor: pointer; border-radius: 4px; display: flex; align-items: center; gap: 8px; font-weight: bold; } #execBtn:disabled { opacity: 0.5; } .spinner { width: 14px; height: 14px; border: 2px solid #51afef; border-top-color: transparent; border-radius: 50%; display: none; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } #timerBox { color: #51afef; font-weight: bold; font-size: 14px; border-left: 3px solid #51afef; padding-left: 10px; } </style> </head> <body> <div class="wrapper"> <div class="header-flex"> <button id="execBtn" onclick="manualTrigger()"> <div id="btnSpinner" class="spinner"></div> <span id="btnText">START SESSION</span> </button> <div id="timerBox">TIMER: READY</div> </div> <div class="term" id="termContainer"> <div id="termBody"><div class="line INFO">[READY] Klik START SCAN untuk memulai diagnosa.</div></div> </div> <table id="pTable" class="player-table"> <thead><tr><th>ID</th><th>SCORE</th><th>PING</th><th>PLAYER NAME</th></tr></thead> <tbody id="pBody"></tbody> </table> </div> <script> let countdown = 9, timerInterval, eventSource; function stopTimer() { clearInterval(timerInterval); document.getElementById('timerBox').innerText = "TIMER: PROCESSING..."; } function startTimer() { clearInterval(timerInterval); countdown = 9; document.getElementById('timerBox').innerText = `NEXT REFRESH: ${countdown}s`; timerInterval = setInterval(() => { countdown--; document.getElementById('timerBox').innerText = `NEXT REFRESH: ${countdown}s`; if (countdown <= 0) runDiagnostic(); }, 1000); } function runDiagnostic() { stopTimer(); const btn = document.getElementById('execBtn'); const spinner = document.getElementById('btnSpinner'); const termBody = document.getElementById('termBody'); const termContainer = document.getElementById('termContainer'); btn.disabled = true; spinner.style.display = 'block'; termBody.innerHTML = ''; if (eventSource) eventSource.close(); eventSource = new EventSource(window.location.href + '?ajax_action=debug'); eventSource.onmessage = function(e) { const data = JSON.parse(e.data); const div = document.createElement('div'); div.className = `line ${data.type}`; div.innerHTML = `[${data.time}] [${data.type}] ${data.msg}`; termBody.appendChild(div); termContainer.scrollTop = termBody.scrollHeight; if (data.players && data.players.length > 0) { document.getElementById('pBody').innerHTML = data.players.map(p => `<tr><td>${p.id}</td><td>${p.score}</td><td>${p.ping}ms</td><td><b>${p.name}</b></td></tr>`).join(''); document.getElementById('pTable').style.display = 'table'; } if (data.done) { eventSource.close(); btn.disabled = false; spinner.style.display = 'none'; startTimer(); } }; eventSource.onerror = function() { eventSource.close(); btn.disabled = false; spinner.style.display = 'none'; startTimer(); }; } function manualTrigger() { runDiagnostic(); } </script> </body> </html>
Run Code
<?php /** * MW3 RCON Forensic Debugger - 9s Refresh & Max Detail Streaming * Host: mw3.rsl.my.id | Port: 27016 */ if (isset($_GET['ajax_action']) && $_GET['ajax_action'] == 'debug') { // Mematikan semua jenis buffering agar streaming baris-per-baris berfungsi @ini_set('output_buffering', 'off'); @ini_set('zlib.output_compression', false); while (@ob_end_flush()); header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); header('X-Accel-Buffering: no'); $host = "mw3.rsl.my.id"; $port = 27016; $password = "ISI_PASSWORD_RCON_ANDA"; // <--- WAJIB DIISI function send_ev($msg, $type = "INFO", $players = null, $done = false) { echo "data: " . json_encode([ "time" => date("H:i:s.v"), "msg" => $msg, "type" => $type, "players" => $players, "done" => $done ]) . "\n\n"; @flush(); } // --- PHASE 1: NETWORK RECON --- send_ev("START: Inisialisasi Forensik Maksimal untuk $host", "INFO"); $ip = gethostbyname($host); send_ev("DNS_RESOLVED: Target terurai ke IP $ip", "SUCCESS"); // --- PHASE 2: UDP PROBE --- for ($i = 1; $i <= 3; $i++) { $u_sock = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_set_option($u_sock, SOL_SOCKET, SO_RCVTIMEO, ["sec" => 5, "usec" => 0]); $p_start = microtime(true); @socket_sendto($u_sock, "\x00", 1, 0, $ip, $port); $p_recv = @socket_recvfrom($u_sock, $p_buf, 64, 0, $p_from, $p_fport); $p_dur = round((microtime(true) - $p_start) * 1000, 2); if ($p_recv !== false) send_ev("UDP_PROBE #$i: SUCCESS | RTT: {$p_dur}ms", "SUCCESS"); else send_ev("UDP_PROBE #$i: TIMEOUT", "ERROR"); @socket_close($u_sock); usleep(200000); } // --- PHASE 3: RCON DEEP INSPECTION --- send_ev("RCON_INIT: Alokasi socket resource AF_INET...", "INFO"); $socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); if ($socket) { socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, ["sec" => 8, "usec" => 0]); $payload = "\xff\xff\xff\xffrcon \"" . $password . "\" status\n"; send_ev("PAYLOAD_HEX: 0x" . strtoupper(bin2hex($payload)), "INFO"); send_ev("XMIT_START: Mengirim " . strlen($payload) . " bytes paket RCON...", "INFO"); $send_time = microtime(true); if (@socket_sendto($socket, $payload, strlen($payload), 0, $ip, $port)) { send_ev("XMIT_OK: Paket keluar ke interface jaringan.", "SUCCESS"); send_ev("LISTENING: Menunggu respon terfragmentasi (Max 8s)...", "INFO"); $buf = ""; $from = ""; $f_port = 0; $received = @socket_recvfrom($socket, $buf, 65535, 0, $from, $f_port); $rtt = round((microtime(true) - $send_time) * 1000, 2); if ($received !== false) { send_ev("RECV_OK: Berhasil menarik $received bytes (RTT: {$rtt}ms).", "SUCCESS"); send_ev("RESP_HEADER: 0x" . strtoupper(bin2hex(substr($buf, 0, 4))), "INFO"); if (strpos($buf, "Invalid password") !== false) { send_ev("AUTH_FAIL: Password RCON Salah!", "ERROR", null, true); } else { $clean_data = substr($buf, 10); $lines = explode("\n", $clean_data); $player_list = []; foreach ($lines as $line) { if (preg_match('/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(.+)$/', trim($line), $m)) { $player_list[] = ["id"=>$m[1],"score"=>$m[2],"ping"=>$m[3],"name"=>preg_replace('/\^[0-9]/','',$m[4])]; } } send_ev("COMPLETE: " . count($player_list) . " Pemain diproses.", "SUCCESS", $player_list, true); } } else { send_ev("RCON_TIMEOUT: Server tidak merespon (8s limit terlampaui).", "ERROR", null, true); } } @socket_close($socket); } exit; } ?> <!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8"> <title>Forensic RCON - 9s Refresh</title> <style> body { background: #080a10; color: #a0aabf; font-family: 'Consolas', monospace; padding: 20px; font-size: 13px; } .wrapper { max-width: 900px; margin: auto; } .header-flex { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; } .term { background: #000; border: 1px solid #1a2026; padding: 15px; height: 320px; overflow-y: auto; border-radius: 4px; box-shadow: inset 0 0 10px #000; } .line { margin-bottom: 2px; border-bottom: 1px solid #0d1115; font-size: 11px; } .INFO { color: #51afef; } .SUCCESS { color: #98c379; } .ERROR { color: #e06c75; } .player-table { width: 100%; border-collapse: collapse; margin-top: 15px; background: #0d1117; display: none; } .player-table th { background: #1a2026; color: #fff; padding: 10px; text-align: left; border-bottom: 2px solid #51afef; } .player-table td { padding: 10px; border-bottom: 1px solid #1a2026; } #execBtn { background: #1a2026; color: #51afef; border: 1px solid #51afef; padding: 8px 20px; cursor: pointer; border-radius: 4px; display: flex; align-items: center; gap: 8px; font-weight: bold; } #execBtn:disabled { opacity: 0.5; } .spinner { width: 14px; height: 14px; border: 2px solid #51afef; border-top-color: transparent; border-radius: 50%; display: none; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } #timerBox { color: #51afef; font-weight: bold; font-size: 14px; border-left: 3px solid #51afef; padding-left: 10px; } </style> </head> <body> <div class="wrapper"> <div class="header-flex"> <button id="execBtn" onclick="manualTrigger()"> <div id="btnSpinner" class="spinner"></div> <span id="btnText">START SESSION</span> </button> <div id="timerBox">TIMER: READY</div> </div> <div class="term" id="termContainer"> <div id="termBody"><div class="line INFO">[READY] Klik START SCAN untuk memulai diagnosa.</div></div> </div> <table id="pTable" class="player-table"> <thead><tr><th>ID</th><th>SCORE</th><th>PING</th><th>PLAYER NAME</th></tr></thead> <tbody id="pBody"></tbody> </table> </div> <script> let countdown = 9, timerInterval, eventSource; function stopTimer() { clearInterval(timerInterval); document.getElementById('timerBox').innerText = "TIMER: PROCESSING..."; } function startTimer() { clearInterval(timerInterval); countdown = 9; document.getElementById('timerBox').innerText = `NEXT REFRESH: ${countdown}s`; timerInterval = setInterval(() => { countdown--; document.getElementById('timerBox').innerText = `NEXT REFRESH: ${countdown}s`; if (countdown <= 0) runDiagnostic(); }, 1000); } function runDiagnostic() { stopTimer(); const btn = document.getElementById('execBtn'); const spinner = document.getElementById('btnSpinner'); const termBody = document.getElementById('termBody'); const termContainer = document.getElementById('termContainer'); btn.disabled = true; spinner.style.display = 'block'; termBody.innerHTML = ''; if (eventSource) eventSource.close(); eventSource = new EventSource(window.location.href + '?ajax_action=debug'); eventSource.onmessage = function(e) { const data = JSON.parse(e.data); const div = document.createElement('div'); div.className = `line ${data.type}`; div.innerHTML = `[${data.time}] [${data.type}] ${data.msg}`; termBody.appendChild(div); termContainer.scrollTop = termBody.scrollHeight; if (data.players && data.players.length > 0) { document.getElementById('pBody').innerHTML = data.players.map(p => `<tr><td>${p.id}</td><td>${p.score}</td><td>${p.ping}ms</td><td><b>${p.name}</b></td></tr>`).join(''); document.getElementById('pTable').style.display = 'table'; } if (data.done) { eventSource.close(); btn.disabled = false; spinner.style.display = 'none'; startTimer(); } }; eventSource.onerror = function() { eventSource.close(); btn.disabled = false; spinner.style.display = 'none'; startTimer(); }; } function manualTrigger() { runDiagnostic(); } </script> </body> </html>
Run Code New Tab
Result