Add support to whitelist by MAC and MAC vendor

This commit is contained in:
danilonc
2019-11-08 16:18:42 -06:00
parent 94521f2174
commit 1130c72098
2 changed files with 6 additions and 2 deletions

View File

@ -176,7 +176,9 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
for ap in s['wifi']['aps']:
if ap['encryption'] == '' or ap['encryption'] == 'OPEN':
continue
elif ap['hostname'] not in whitelist:
elif ap['hostname'] not in whitelist \
and ap['mac'].lower() not in whitelist \
and ap['mac'][:8].lower() not in whitelist:
if self._filter_included(ap):
aps.append(ap)
except Exception as e: