%s '; $styles = ''; $footer = ' '; // ========== start ============================================================= if ((strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/4') !== false) and !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { $header = sprintf($header, ''); // f.cking Netscape! } else { $header = sprintf($header, $styles); } preg_match('/(^[^?]+)(\?|$)/', $_SERVER['REQUEST_URI'], $m); // CGI workaround $self = $m[1]; $k = intval($_GET['k']); $ka = $_GET['ka']; // ********** request to kill *************************************************** if ($k or strlen($ka)) { if ($_GET['sure'] == 'y') { if (!in_array($_SERVER['REMOTE_ADDR'], $allowed_to_kill)) { echo $header; echo "Go kill yourself, bro!\n
You are not allowed to kill processes on this box."; echo "
<< back\n"; echo $footer; die(); } $cmd = ''; if ($pid = intval($_GET['k'])) { $cmd = "$go_exe -k $pid"; } if ($name = $_GET['ka']) { $cmd = "$go_exe -ka $name"; } if (strlen($cmd)) { exec($cmd); } my_redirect($self); die(); } echo $header; $go = `$go_exe`; parse_procs($go, $proc, $numproc, $numthr, $uptime); if ($k) { $name = ''; foreach ($proc as $a) { if (intval($a['pid']) == $k) { $name = trim($a['name']); break; } } if (strlen($name)) { echo "Are you sure you want to kill process with PID $k ($name)?\n"; echo '
   yes   '."\n"; echo '   no   '."\n"; } else { echo "Process with PID $k not found!\n"; echo "
<< back\n"; } } else { $count= 0; foreach ($proc as $a) { if (trim($a['name']) == $ka) { $count++; } } if ($count) { echo "Are you sure you want to kill all $ka processes (total: $count)?\n"; echo '
   yes   '."\n"; echo '   no   '."\n"; } else { echo "No $ka process(es) found!\n"; echo "
<< back\n"; } } echo $footer; die(); } // ********** thread list ******************************************************* if ($pid = intval($_GET['tl'])) { echo $header; $cmd = $go_exe." -tl $pid"; echo "
\n";
    passthru($cmd);
    echo "
\n"; echo "
<< back\n"; echo $footer; die(); } // ********** show `go` output ************************************************** $sort = $_GET['sort']; $sortby = array('PID' => 'sort_by_pid', 'PPID' => 'sort_by_ppid', 'Sess' => 'sort_by_sess', 'Thr' => 'sort_by_thr', 'Prio' => 'sort_by_prio', 'CPU' => 'sort_by_cpu', 'Name' => 'sort_by_name'); echo $header; $go = `$go_exe`; parse_procs($go, $proc, $numproc, $numthr, $uptime); $n = sizeof($proc); if (strlen($sort)) { if (strlen($sortby[$sort])) { usort($proc, $sortby[$sort]); if (($sort == 'CPU') or ($sort == 'Name')) { for ($i=0;$i<$n;$i++) { $proc[$i]['name'] = trim($proc[$i]['name']); } } } } ?>

There are processes with threads.
System uptime is .

Process listview unsorted)"; } ?>:

'. ''. // pid ''. // ppid ''. // sess1 ''. // sess2 ''. // thr ''. // prio ''. // cpu ''. // name ''."\n"; for ($i=0;$i<$n;$i++) { printf($tmpl, $self, $proc[$i]['pid'], $proc[$i]['pid'], $proc[$i]['pid'], $proc[$i]['ppid'], $proc[$i]['sess1'], $proc[$i]['sess2'], $self, $proc[$i]['pid'], $proc[$i]['thr'], $proc[$i]['prio'], $proc[$i]['cpu'], $self, urlencode(trim($proc[$i]['name'])), trim($proc[$i]['name']), str_replace(' ', ' ', $proc[$i]['name'])); } ?>
PID  PPID  Sess   Thr  Prio  CPU time  Name
==== ==== ======= === ==== ========== ============
%s %s %s %s %s %s %s %s
==== ==== ======= === ==== ========== ============
intval($b['thr'])) ? -1 : 1; } function sort_by_prio($a, $b) { if ($a['prio'] == $b['prio']) { return (intval($a['pid']) < intval($b['pid'])) ? -1 : 1; } return ($a['prio'] < $b['prio']) ? -1 : 1; } function sort_by_cpu($a, $b) { preg_match('/(\d+):(\d{2}):(\d{2})\.(\d{2})/', $a['cpu'], $m); list($match, $h, $m, $s, $th) = $m; $a1 = 60*60*$h + 60*$m + $s + $th/100; preg_match('/(\d+):(\d+):(\d+)\.(\d+)/', $b['cpu'], $m); list($match, $h, $m, $s, $th) = $m; $b1 = 60*60*$h + 60*$m + $s + $th/100; if ($a1 == $b1) { return (intval($a['pid']) < intval($b['pid'])) ? -1 : 1; } return ($a1 > $b1) ? -1 : 1; } function sort_by_name($a, $b) { if (trim($a['name']) == trim($b['name'])) { return (intval($a['pid']) < intval($b['pid'])) ? -1 : 1; } return (trim($a['name']) < trim($b['name'])) ? -1 : 1; } // redirection function my_redirect($url, $code = 302) { if ($code == 303) { preg_match('/^HTTP\/(\d)\.(\d)/', $_SERVER['SERVER_PROTOCOL'], $m); if (intval($m[1])*10+intval($m[2]) < 11) { $code = 302; } } if ($code == 303) { Header($_SERVER['SERVER_PROTOCOL'].' 303 See Other'); } else { Header($_SERVER['SERVER_PROTOCOL'].' 302 Found'); } if (substr($url, 0, 1) == '/') { $url = 'http://'.$_SERVER['HTTP_HOST'].$url; } elseif (!strpos($url, '://')) { preg_match('/(.+?)[^\/]+$/', $_SERVER['REQUEST_URI'], $m); $url = 'http://'.$_SERVER['HTTP_HOST'].$m[1].$url; } Header('Location: '.$url); ?> Oops!

??? ??????? ?? ???????? HTTP redirect (status code: ).
???????? ?? ???? ??????.


Your browser does not understand HTTP redirect (status code: ).
Follow this link.