Skip to content

Commit

Permalink
Add support to whitelist by MAC and MAC vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniloNC committed Nov 8, 2019
1 parent 94521f2 commit 1130c72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pwnagotchi/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def get_access_points(self):
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:
Expand Down
4 changes: 3 additions & 1 deletion pwnagotchi/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ main:
mon_max_blind_epochs: 50
# if true, will not restart the wifi module
no_restart: false
# access points to ignore
# access points to ignore. Could be the ssid, bssid or the vendor part of bssid.
whitelist:
- EXAMPLE_NETWORK
- ANOTHER_EXAMPLE_NETWORK
- fo:od:ba:be:fo:od # BSSID
- fo:od:ba # Vendor BSSID
# if not null, filter access points by this regular expression
filter: null
# logging
Expand Down

0 comments on commit 1130c72

Please sign in to comment.