new: exclude option for the grid plugin

This commit is contained in:
Simone Margaritelli 2019-10-07 17:04:06 +02:00
parent f7bf12a0a0
commit 52af839131
3 changed files with 25 additions and 2 deletions
docs
pwnagotchi
defaults.yml
plugins/default

@ -76,7 +76,20 @@ main:
report: true # full-opt in
```
If you prefer to completely opt-out by also disabling signaling:
Even if fully opted-in, you can still disable reporting for specific networks, for instance if you don't want your home network to be in the system:
```yaml
main:
plugins:
grid:
enabled: true
report: true
exclude:
- MyHomeNetwork
- de:ad:be:ef:de:ad # both ESSIDs and BSSIDs are supported
```
If instead you prefer to completely opt-out by also disabling signaling:
```yaml
main:

@ -9,6 +9,8 @@ main:
grid:
enabled: true
report: false # don't report pwned networks by default!
exclude: # do not report the following networks (accepts both ESSIDs and BSSIDs)
- YourHomeNetworkHere
auto-update:
enabled: false
interval: 1 # every day

@ -154,7 +154,15 @@ def on_internet_available(ui, keys, config, log):
if OPTIONS['report']:
for pcap_file in pcap_files:
net_id = os.path.basename(pcap_file).replace('.pcap', '')
if net_id not in reported:
do_skip = False
for skip in OPTIONS['exclude']:
skip = skip.lower()
net = net_id.lower()
if skip in net or skip.replace(':', '') in net:
do_skip = True
break
if net_id not in reported and not do_skip:
essid, bssid = parse_pcap(pcap_file)
if bssid:
if api_report_ap(log, keys, token, essid, bssid):