mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
new: integrated python standard logger (closes #84)
This commit is contained in:
@ -202,14 +202,14 @@ running = False
|
||||
|
||||
|
||||
def on_loaded():
|
||||
core.log("GPS plugin loaded for %s" % device)
|
||||
logging.info("GPS plugin loaded for %s" % device)
|
||||
|
||||
|
||||
def on_ready(agent):
|
||||
global running
|
||||
|
||||
if os.path.exists(device):
|
||||
core.log("enabling GPS bettercap's module for %s" % device)
|
||||
logging.info("enabling GPS bettercap's module for %s" % device)
|
||||
try:
|
||||
agent.run('gps off')
|
||||
except:
|
||||
@ -220,7 +220,7 @@ def on_ready(agent):
|
||||
agent.run('gps on')
|
||||
running = True
|
||||
else:
|
||||
core.log("no GPS detected")
|
||||
logging.info("no GPS detected")
|
||||
|
||||
|
||||
def on_handshake(agent, filename, access_point, client_station):
|
||||
@ -229,7 +229,7 @@ def on_handshake(agent, filename, access_point, client_station):
|
||||
gps = info['gps']
|
||||
gps_filename = filename.replace('.pcap', '.gps.json')
|
||||
|
||||
core.log("saving GPS to %s (%s)" % (gps_filename, gps))
|
||||
logging.info("saving GPS to %s (%s)" % (gps_filename, gps))
|
||||
with open(gps_filename, 'w+t') as fp:
|
||||
json.dump(gps, fp)
|
||||
```
|
||||
|
Reference in New Issue
Block a user