mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
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:

committed by
GitHub

parent
722a91655a
commit
d2c44797e5
@ -67,6 +67,7 @@ class Grid(plugins.Plugin):
|
|||||||
logging.info("grid plugin loaded.")
|
logging.info("grid plugin loaded.")
|
||||||
|
|
||||||
def set_reported(self, reported, net_id):
|
def set_reported(self, reported, net_id):
|
||||||
|
if net_id not in reported:
|
||||||
reported.append(net_id)
|
reported.append(net_id)
|
||||||
self.report.update(data={'reported': reported})
|
self.report.update(data={'reported': reported})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user