Fixed info.php for arch linux
This commit is contained in:
9
info.php
9
info.php
@ -7,17 +7,18 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<a href="index.php">Back</a>
|
<a href="index.php">Back</a>
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
$output = shell_exec('ps aux');
|
$output = shell_exec('ps aux');
|
||||||
|
|
||||||
$lines = explode("\n", $output);
|
$lines = explode("\n", $output);
|
||||||
|
|
||||||
$regExpr = "^";
|
$regExpr = "^";
|
||||||
foreach($lines as $i=>$line) {
|
foreach($lines as $i=>$line) {
|
||||||
if($i == 0) {
|
if($i == 0) {
|
||||||
$columns = preg_split('/ +/', $line);
|
$columns = preg_split('/( |\t)+/', $line);
|
||||||
foreach($columns as $column) {
|
foreach($columns as $column) {
|
||||||
echo ' <th>' . htmlentities($column) . "</th>\n";
|
echo ' <th>' . htmlentities($column) . "</th>\n";
|
||||||
}
|
}
|
||||||
@ -40,7 +41,9 @@
|
|||||||
|
|
||||||
array_shift($matches);
|
array_shift($matches);
|
||||||
|
|
||||||
if($matches[0] != 'www-data') {
|
if (count($matches) == 0) continue;
|
||||||
|
|
||||||
|
if($matches[0] != 'http') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user