Netzwerkdaten anzeigen

This commit is contained in:
2023-08-04 21:30:36 +02:00
parent 9f2d29c8fe
commit c6fb90e562
2 changed files with 7 additions and 6 deletions

View File

@@ -10,8 +10,8 @@ if (!isset($config))
'ssh_ip' => '127.0.0.1' 'ssh_ip' => '127.0.0.1'
), ),
'version' => array( 'version' => array(
'version' => '2.3.2', 'version' => '2.3.3',
'versioncode' => 37, 'versioncode' => 38,
'android_comp_level' => 25 'android_comp_level' => 25
), ),
'url' => array( 'url' => array(

View File

@@ -398,16 +398,17 @@ function getAllNetworkConnections()
foreach ($networkInterfaces as $interface) { foreach ($networkInterfaces as $interface) {
if ($interface->ifname != 'lo') { if ($interface->ifname != 'lo') {
$wirelessOption = []; $wirelessOption = [];
$interfaceData = json_decode(shell_exec('ip -j -s link show ' . $interface->ifname));
foreach ($interface->addr_info as $addr) { foreach ($interface->addr_info as $addr) {
if ($addr->family == "inet") if ($addr->family == "inet")
$ipAddress = $addr->local; $ipAddress = $addr->local;
} }
$macAddress = $interface->address; $macAddress = $interface->address;
$bytesReceived = 0; $bytesReceived = $interfaceData[0]->stats64->rx->bytes;
$bytesSent = 0; $bytesSent = $interfaceData[0]->stats64->tx->bytes;
$packetsReceived = 0; $packetsReceived = $interfaceData[0]->stats64->rx->packets;
$packetsSent = 0; $packetsSent = $interfaceData[0]->stats64->tx->packets;
if (substr($interface->ifname, 0, 4) == 'wlan') { if (substr($interface->ifname, 0, 4) == 'wlan') {
$streamWirelessInterface = shell_exec('/sbin/iwconfig ' . $interface->ifname); $streamWirelessInterface = shell_exec('/sbin/iwconfig ' . $interface->ifname);