fix: throttling report requests a bit to avoid rate limits on the API

This commit is contained in:
Simone Margaritelli 2019-10-20 14:55:34 +02:00
parent f9c0efc24a
commit 892fda775d

View File

@ -1,11 +1,13 @@
__author__ = 'evilsocket@gmail.com' __author__ = 'evilsocket@gmail.com'
__version__ = '1.0.0' __version__ = '1.0.1'
__name__ = 'grid' __name__ = 'grid'
__license__ = 'GPL3' __license__ = 'GPL3'
__description__ = 'This plugin signals the unit cryptographic identity and list of pwned networks and list of pwned networks to api.pwnagotchi.ai' __description__ = 'This plugin signals the unit cryptographic identity and list of pwned networks and list of pwned ' \
'networks to api.pwnagotchi.ai '
import os import os
import logging import logging
import time
import glob import glob
import pwnagotchi.grid as grid import pwnagotchi.grid as grid
@ -136,6 +138,7 @@ def on_internet_available(agent):
else: else:
if grid.report_ap(essid, bssid): if grid.report_ap(essid, bssid):
set_reported(reported, net_id) set_reported(reported, net_id)
time.sleep(1.5)
else: else:
logging.warning("no bssid found?!") logging.warning("no bssid found?!")
else: else: