From c2cff9d947bf0115581fbe26500a06a4c64cba0a Mon Sep 17 00:00:00 2001 From: Taikuh Date: Tue, 24 Mar 2020 20:40:18 +0800 Subject: [PATCH 1/7] Add connected device for bridged, edit regex --- templates/dashboard.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/dashboard.php b/templates/dashboard.php index 893e18fa..74537950 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -1,11 +1,18 @@
@@ -89,7 +96,7 @@ $ifaceStatus = $wlan0up ? "up" : "down"; 2) : ?>
- +
From f0db12664d97b8123a6765d2072b4cb8e58f9657 Mon Sep 17 00:00:00 2001 From: Taikuh Date: Wed, 25 Mar 2020 00:21:59 +0800 Subject: [PATCH 2/7] add quotes to $MACPattern --- templates/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/dashboard.php b/templates/dashboard.php index 74537950..84e2d788 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -5,7 +5,7 @@ if ($arrHostapdConf['WifiAPEnable'] == 1) { } else { $client_iface = RASPI_WIFI_CLIENT_INTERFACE; } -$MACPattern = '([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}'; +$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"'; if ($arrHostapdConf['BridgedEnable'] == 1) { $moreLink = "index.php?page=hostapd_conf"; exec('arp -i '.$client_iface.' -a | grep -E $(iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|") | tr -d "()" | awk -F" " \'{print $7 " " $4 " " $2 " " $1}\'', $clients); From 2a42c56ab3eae2ecedbf8b232d15533496d4ea60 Mon Sep 17 00:00:00 2001 From: Taikuh Date: Wed, 25 Mar 2020 14:42:53 +0800 Subject: [PATCH 3/7] bridged $clients only show MAC --- locale/en_US/LC_MESSAGES/messages.po | 4 ++++ templates/dashboard.php | 29 ++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 15e57c64..62f71705 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -663,6 +663,10 @@ msgstr "Attempting to start TOR" msgid "Attempting to stop TOR" msgstr "Attempting to stop TOR" +#: template/dashboard.php +msgid "Bridged AP mode is enabled. To find the Hostname and IP of your connected clients, please cross-reference the MAC addresses here with those from your router's admin page." +msgstr "Bridged AP mode is enabled. To find the Hostname and IP of your connected clients, please cross-reference the MAC addresses here with those from your router's admin page." + #: common form controls msgid "Save settings" msgstr "Save settings" diff --git a/templates/dashboard.php b/templates/dashboard.php index 84e2d788..44a01639 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -8,7 +8,7 @@ if ($arrHostapdConf['WifiAPEnable'] == 1) { $MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"'; if ($arrHostapdConf['BridgedEnable'] == 1) { $moreLink = "index.php?page=hostapd_conf"; - exec('arp -i '.$client_iface.' -a | grep -E $(iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|") | tr -d "()" | awk -F" " \'{print $7 " " $4 " " $2 " " $1}\'', $clients); + exec('iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern, $clients); } else { $moreLink = "index.php?page=dhcpd_conf"; exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep -oE '.$MACPattern.' | paste -sd "|")', $clients); @@ -78,18 +78,31 @@ $ifaceStatus = $wlan0up ? "up" : "down"; - - - + + + + + + + + + + + + - - - - + + + + + + + + From b7625e34da9ecd8c075976c0c063fbbf5acd9e0e Mon Sep 17 00:00:00 2001 From: Taikuh Date: Wed, 25 Mar 2020 15:19:10 +0800 Subject: [PATCH 4/7] Shorten info text --- locale/en_US/LC_MESSAGES/messages.po | 4 ++-- templates/dashboard.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 62f71705..bcb881f8 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -664,8 +664,8 @@ msgid "Attempting to stop TOR" msgstr "Attempting to stop TOR" #: template/dashboard.php -msgid "Bridged AP mode is enabled. To find the Hostname and IP of your connected clients, please cross-reference the MAC addresses here with those from your router's admin page." -msgstr "Bridged AP mode is enabled. To find the Hostname and IP of your connected clients, please cross-reference the MAC addresses here with those from your router's admin page." +msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." +msgstr "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." #: common form controls msgid "Save settings" diff --git a/templates/dashboard.php b/templates/dashboard.php index 44a01639..7f0737a1 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -90,7 +90,7 @@ $ifaceStatus = $wlan0up ? "up" : "down"; - + From 2eb4ae808864cb8df91d9811675cdd7e3310359c Mon Sep 17 00:00:00 2001 From: Taikuh Date: Wed, 25 Mar 2020 19:50:04 +0800 Subject: [PATCH 5/7] Replace arp with iw station dump --- templates/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/dashboard.php b/templates/dashboard.php index 7f0737a1..4886888e 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -11,7 +11,7 @@ if ($arrHostapdConf['BridgedEnable'] == 1) { exec('iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern, $clients); } else { $moreLink = "index.php?page=dhcpd_conf"; - exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep -oE '.$MACPattern.' | paste -sd "|")', $clients); + exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(iw dev '.$client_iface.' station dump | grep -oE '.$MACPattern.' | paste -sd "|")', $clients); } $ifaceStatus = $wlan0up ? "up" : "down"; ?> From 482033c57b70dbcff1da24a5f91662d86a5a0e07 Mon Sep 17 00:00:00 2001 From: Taikuh Date: Wed, 25 Mar 2020 19:55:39 +0800 Subject: [PATCH 6/7] Use small text-muted for info text --- templates/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/dashboard.php b/templates/dashboard.php index 4886888e..97c02fbf 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -90,7 +90,7 @@ $ifaceStatus = $wlan0up ? "up" : "down"; - + From 347a406729fd852fc6514643a4de63c28df57c40 Mon Sep 17 00:00:00 2001 From: Taikuh Date: Wed, 25 Mar 2020 19:58:13 +0800 Subject: [PATCH 7/7] Remove html tags from locale .po files --- locale/en_US/LC_MESSAGES/messages.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index bcb881f8..4d726d04 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -664,8 +664,8 @@ msgid "Attempting to stop TOR" msgstr "Attempting to stop TOR" #: template/dashboard.php -msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." -msgstr "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." +msgid "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." +msgstr "Bridged AP mode is enabled. For Hostname and IP, see your router's admin page." #: common form controls msgid "Save settings"
Bridged AP mode is enabled. To find the Hostname and IP of your connected clients, please cross-reference the MAC addresses here with those from your router's admin page.");?>
Bridged AP mode is enabled. To find the Hostname and IP of your connected clients, please cross-reference the MAC addresses here with those from your router's admin page.");?>Bridged AP mode is enabled. For Hostname and IP, see your router's admin page.");?>
Bridged AP mode is enabled. For Hostname and IP, see your router's admin page.");?>