67 lines
1.6 KiB
PHP
67 lines
1.6 KiB
PHP
<?php
|
|
$title = "Index";
|
|
require_once("includes/config.php");
|
|
require_once("includes/header.php");
|
|
require_once("includes/nav.php");
|
|
?>
|
|
<div class="container">
|
|
<h3>Flag</h3>
|
|
<p><?php echo $flag ?></p>
|
|
<h2>System</h2>
|
|
<h3>Info</h3>
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<td>Kernel</td>
|
|
<td><?php $uname = posix_uname(); echo $uname['nodename'].' '.$uname['release'] ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Uptime</td>
|
|
<td><?php echo file_get_contents('/proc/uptime'); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Memory</td>
|
|
<td><?php $meminfo = explode("\n", file_get_contents('/proc/meminfo')); echo $meminfo[0].'/'.$meminfo[1] ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2>Network</h2>
|
|
<h3>Info</h3>
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<td>Wifi</td>
|
|
<td><?php $ssid = file_get_contents('/etc/ssid'); echo $ssid ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Stats</td>
|
|
<td><?php $rx = file_get_contents('/sys/class/net/'.$interface.'/statistics/rx_bytes'); $tx = file_get_contents('/sys/class/net/'.$interface.'/statistics/tx_bytes'); echo ($rx/1024/1024).'MB RX / '.($tx/1024/1024).'MB TX'; ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php /*
|
|
<h3>Client List</h3>
|
|
<?php $leases = file_get_contents('/var/log/dhcpd.leases'); ?>
|
|
<pre>
|
|
<?php echo $leases ?>
|
|
</pre>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Ip Address</th>
|
|
<th>MAC</th>
|
|
<th>Hostname</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>192.168.77.2</td>
|
|
<td>00:11:22:AA:BB:CC</td>
|
|
<td>desktop-ab2846ad</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>*/ ?>
|
|
</div>
|
|
</body>
|
|
</html>
|