From 1130c7209897b4e39536139959c935f48e6d3990 Mon Sep 17 00:00:00 2001 From: danilonc <DaniloNC@users.noreply.github.com> Date: Fri, 8 Nov 2019 16:18:42 -0600 Subject: [PATCH] Add support to whitelist by MAC and MAC vendor --- pwnagotchi/agent.py | 4 +++- pwnagotchi/defaults.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/agent.py b/pwnagotchi/agent.py index e0a69a4..762fab0 100644 --- a/pwnagotchi/agent.py +++ b/pwnagotchi/agent.py @@ -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: diff --git a/pwnagotchi/defaults.yml b/pwnagotchi/defaults.yml index f083270..1c581eb 100644 --- a/pwnagotchi/defaults.yml +++ b/pwnagotchi/defaults.yml @@ -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