2023-08-07 20:13:34 +00:00
|
|
|
#!rsc by RouterOS
|
|
|
|
# RouterOS script: accesslist-duplicates.wifiwave2
|
2024-01-01 14:25:25 +00:00
|
|
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
2023-08-07 20:13:34 +00:00
|
|
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
|
|
|
#
|
2024-01-29 21:42:49 +00:00
|
|
|
# requires RouterOS, version=7.12
|
2023-08-18 13:33:15 +00:00
|
|
|
#
|
2023-08-07 20:13:34 +00:00
|
|
|
# print duplicate antries in wireless access list
|
|
|
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/accesslist-duplicates.md
|
|
|
|
#
|
|
|
|
# !! Do not edit this file, it is generated from template!
|
|
|
|
|
2023-11-15 20:31:18 +00:00
|
|
|
:local 0 [ :jobname ];
|
2023-08-07 20:13:34 +00:00
|
|
|
:global GlobalFunctionsReady;
|
|
|
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
|
|
|
|
|
|
|
:local Seen ({});
|
|
|
|
|
|
|
|
:foreach AccList in=[ /interface/wifiwave2/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
|
|
|
:local Mac [ /interface/wifiwave2/access-list/get $AccList mac-address ];
|
2023-10-16 22:01:38 +00:00
|
|
|
:if ($Seen->$Mac = 1) do={
|
2023-10-16 19:46:10 +00:00
|
|
|
/interface/wifiwave2/access-list/print where mac-address=$Mac;
|
2023-08-18 13:33:15 +00:00
|
|
|
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
|
|
|
|
2023-10-16 19:46:10 +00:00
|
|
|
:if ([ :typeof $Remove ] = "num") do={
|
|
|
|
:put ("Removing numeric id " . $Remove . "...\n");
|
|
|
|
/interface/wifiwave2/access-list/remove $Remove;
|
2023-08-07 20:13:34 +00:00
|
|
|
}
|
|
|
|
}
|
2023-10-16 19:46:10 +00:00
|
|
|
:set ($Seen->$Mac) 1;
|
2023-08-07 20:13:34 +00:00
|
|
|
}
|