Prevent duplicate entries for reported networks

Due to duplicate entries in `/root/.api-report.json`, [this code](https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/plugins/default/grid.py#L90) incorrectly reports the number of pwned networks, resulting in incorrect stats on the [pwnagotchi.ai website](https://pwnagotchi.ai/).
This commit is contained in:
Sayak Brahmachari 2019-11-26 14:05:10 +05:30 committed by GitHub
parent 722a91655a
commit d2c44797e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,7 +67,8 @@ class Grid(plugins.Plugin):
logging.info("grid plugin loaded.")
def set_reported(self, reported, net_id):
reported.append(net_id)
if net_id not in reported:
reported.append(net_id)
self.report.update(data={'reported': reported})
def check_inbox(self, agent):