mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
bridged $clients only show MAC
This commit is contained in:
parent
f0db12664d
commit
2a42c56ab3
@ -663,6 +663,10 @@ msgstr "Attempting to start TOR"
|
|||||||
msgid "Attempting to stop TOR"
|
msgid "Attempting to stop TOR"
|
||||||
msgstr "Attempting to stop TOR"
|
msgstr "Attempting to stop TOR"
|
||||||
|
|
||||||
|
#: template/dashboard.php
|
||||||
|
msgid "<em>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.</em>"
|
||||||
|
msgstr "<em>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.</em>"
|
||||||
|
|
||||||
#: common form controls
|
#: common form controls
|
||||||
msgid "Save settings"
|
msgid "Save settings"
|
||||||
msgstr "Save settings"
|
msgstr "Save settings"
|
||||||
|
@ -8,7 +8,7 @@ if ($arrHostapdConf['WifiAPEnable'] == 1) {
|
|||||||
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
|
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
|
||||||
if ($arrHostapdConf['BridgedEnable'] == 1) {
|
if ($arrHostapdConf['BridgedEnable'] == 1) {
|
||||||
$moreLink = "index.php?page=hostapd_conf";
|
$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 {
|
} else {
|
||||||
$moreLink = "index.php?page=dhcpd_conf";
|
$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 $(arp -i '.$client_iface.' -n | grep -oE '.$MACPattern.' | paste -sd "|")', $clients);
|
||||||
@ -78,18 +78,31 @@ $ifaceStatus = $wlan0up ? "up" : "down";
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo _("Host name"); ?></th>
|
<?php if ($arrHostapdConf['BridgedEnable'] == 1) : ?>
|
||||||
<th><?php echo _("IP Address"); ?></th>
|
<th><?php echo _("MAC Address"); ?></th>
|
||||||
<th><?php echo _("MAC Address"); ?></th>
|
<?php else : ?>
|
||||||
|
<th><?php echo _("Host name"); ?></th>
|
||||||
|
<th><?php echo _("IP Address"); ?></th>
|
||||||
|
<th><?php echo _("MAC Address"); ?></th>
|
||||||
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<?php if ($arrHostapdConf['BridgedEnable'] == 1) : ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo _("<em>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.</em>");?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
<?php foreach (array_slice($clients,0, 2) as $client) : ?>
|
<?php foreach (array_slice($clients,0, 2) as $client) : ?>
|
||||||
<?php $props = explode(' ', $client) ?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo htmlspecialchars($props[3], ENT_QUOTES) ?></td>
|
<?php if ($arrHostapdConf['BridgedEnable'] == 1): ?>
|
||||||
<td><?php echo htmlspecialchars($props[2], ENT_QUOTES) ?></td>
|
<td><?php echo htmlspecialchars($client, ENT_QUOTES) ?></td>
|
||||||
<td><?php echo htmlspecialchars($props[1], ENT_QUOTES) ?></td>
|
<?php else : ?>
|
||||||
|
<?php $props = explode(' ', $client) ?>
|
||||||
|
<td><?php echo htmlspecialchars($props[3], ENT_QUOTES) ?></td>
|
||||||
|
<td><?php echo htmlspecialchars($props[2], ENT_QUOTES) ?></td>
|
||||||
|
<td><?php echo htmlspecialchars($props[1], ENT_QUOTES) ?></td>
|
||||||
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
Reference in New Issue
Block a user