diff --git a/ConnectedClients/api/module.php b/ConnectedClients/api/module.php index 01cb7c2..e607625 100644 --- a/ConnectedClients/api/module.php +++ b/ConnectedClients/api/module.php @@ -49,10 +49,11 @@ class ConnectedClients extends Module } private function getConnectedClients() { - exec("iw dev wlan0 station dump | grep Station | awk '{print $2}'", $wlan0clients); - exec("iw dev wlan0-1 station dump | grep Station | awk '{print $2}'", $wlan01clients); - exec("iw dev wlan1 station dump | grep Station | awk '{print $2}'", $wlan1clients); - $this->response = array('wlan0clients' => $wlan0clients, 'wlan01clients' => $wlan01clients, 'wlan1clients' => $wlan1clients); + exec("iwconfig 2>/dev/null | grep IEEE | awk '{print $1}'", $wlandev); + exec("iw dev $wlandev[0] station dump | grep Station | awk '{print $2}'", $wlan0clients); + exec("iw dev $wlandev[1] station dump | grep Station | awk '{print $2}'", $wlan01clients); + exec("iw dev $wlandev[2] station dump | grep Station | awk '{print $2}'", $wlan1clients); + $this->response = array('wlan0clients' => $wlan0clients, 'wlan01clients' => $wlan01clients, 'wlan1clients' => $wlan1clients, 'wlandev' => $wlandev); } private function removeMacAddress() { diff --git a/ConnectedClients/js/module.js b/ConnectedClients/js/module.js index afd3880..8ca5ef1 100644 --- a/ConnectedClients/js/module.js +++ b/ConnectedClients/js/module.js @@ -5,6 +5,7 @@ registerController('ConnectedClientsController', ['$api', '$scope', function($ap $scope.wlan0clients = []; $scope.wlan01clients = []; $scope.wlan1clients = []; + $scope.wlandev = []; $scope.dhcplength = 0; $scope.dhcpleases = []; $scope.blacklistlength = 0; @@ -31,6 +32,7 @@ registerController('ConnectedClientsController', ['$api', '$scope', function($ap $scope.wlan0clients = response.wlan0clients; $scope.wlan01clients = response.wlan01clients; $scope.wlan1clients = response.wlan1clients; + $scope.wlandev = response.wlandev; }); }); diff --git a/ConnectedClients/module.html b/ConnectedClients/module.html index 808c64f..71c40f9 100644 --- a/ConnectedClients/module.html +++ b/ConnectedClients/module.html @@ -13,17 +13,17 @@
-

wlan0

+

{{ wlandev[0] }}

Mac AddressDisassociateDeauthenticateBlacklist
{{ wlan0 }}
-

wlan0-1

+

{{ wlandev[1] }}

Mac AddressDisassociateDeauthenticateBlacklist
{{ wlan01 }}
-

wlan1

+

{{ wlandev[2] }}

Mac AddressDisassociateDeauthenticateBlacklist
{{ wlan1 }}