From 39a6ae1be56740704438d8facae00229590185ec Mon Sep 17 00:00:00 2001 From: Leon T Date: Fri, 25 Oct 2019 16:57:05 +0200 Subject: [PATCH 1/2] Created the paw-gps plugin v1.0.0 This plugin connects to PAW Server with the GPS hack and saves the GPS location when a handshake is detected --- pwnagotchi/plugins/default/paw-gps.py | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pwnagotchi/plugins/default/paw-gps.py diff --git a/pwnagotchi/plugins/default/paw-gps.py b/pwnagotchi/plugins/default/paw-gps.py new file mode 100644 index 0000000..02c827e --- /dev/null +++ b/pwnagotchi/plugins/default/paw-gps.py @@ -0,0 +1,33 @@ +__author__ = 'leont' +__version__ = '1.0.0' +__name__ = 'pawgps' +__license__ = 'GPL3' +__description__ = 'Saves GPS coordinates whenever an handshake is captured. The GPS data is get from PAW on android ' + +''' +You need an bluetooth connection to your android phone which is running PAW server with the GPS "hack" from Systemic: +https://raw.githubusercontent.com/systemik/pwnagotchi-bt-tether/master/GPS-via-PAW +''' + +import logging +import json +import requests + +OPTIONS = dict() + + +def on_loaded(): + logging.info("PAW-GPS loaded") + if 'ip' not in OPTIONS or ('ip' in OPTIONS and OPTIONS['ip'] is None): + logging.info("PAW-GPS: No IP Address in the config file is defined, it uses the default (192.168.44.1)") + +def on_handshake(agent, filename, access_point, client_station): + if 'ip' not in OPTIONS or ('ip' in OPTIONS and OPTIONS['ip'] is None): + ip = "192.168.44.1" + + gps = requests.get('http://' + ip + '/gps.xhtml') + gps_filename = filename.replace('.pcap', '.gps.json') + + logging.info("saving GPS to %s (%s)" % (gps_filename, gps)) + with open(gps_filename, 'w+t') as f: + f.write(gps.text) From 5dc780a88f199fd4456e25868c8db463f64a4cc2 Mon Sep 17 00:00:00 2001 From: Leon T Date: Fri, 25 Oct 2019 17:02:15 +0200 Subject: [PATCH 2/2] Edited defaut.yml to add the pawgps plugin --- pwnagotchi/defaults.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pwnagotchi/defaults.yml b/pwnagotchi/defaults.yml index 07862d9..e08906b 100644 --- a/pwnagotchi/defaults.yml +++ b/pwnagotchi/defaults.yml @@ -79,6 +79,10 @@ main: memtemp: # Display memory usage, cpu load and cpu temperature on screen enabled: false orientation: horizontal # horizontal/vertical + pawgps: + enabled: false + #The IP Address of your phone with Paw Server running, default (option is empty) is 192.168.44.1 + ip: '' # monitor interface to use iface: mon0 # command to run to bring the mon interface up in case it's not up already