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:
parent
722a91655a
commit
d2c44797e5
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user