Skip to content

Commit 3bc9433

Browse files
authored
Fix mac_addresses extraction to use same arp method as client list
1 parent 19bbc2e commit 3bc9433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/modules/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def get_active_clients_amount(interface):
55
arp_output = subprocess.run(['arp', '-i', interface], capture_output=True, text=True)
6-
mac_addresses = arp_output.stdout.splitlines()
6+
mac_addresses = mac_addresses = set(line.split()[2] for line in arp_output.stdout.splitlines()[1:])
77

88
if mac_addresses:
99
grep_pattern = '|'.join(mac_addresses)

0 commit comments

Comments
 (0)