From 5111490c709c6f812bdde5d4a8e3dc141a2b5d3d Mon Sep 17 00:00:00 2001 From: Wystan Schmidt Date: Thu, 14 Nov 2019 20:13:50 -0700 Subject: [PATCH] Added rssi info to logging messages Signed-off-by: Wystan Schmidt --- pwnagotchi/agent.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pwnagotchi/agent.py b/pwnagotchi/agent.py index ba8bd16ca..35774dd59 100644 --- a/pwnagotchi/agent.py +++ b/pwnagotchi/agent.py @@ -337,8 +337,9 @@ def _event_poller(self): (ap, sta) = ap_and_station self._last_pwnd = ap['hostname'] if ap['hostname'] != '' and ap[ 'hostname'] != '' else ap_mac - logging.warning("!!! captured new handshake on channel %d: %s (%s) -> %s [%s (%s)] !!!" % ( \ + logging.warning("!!! captured new handshake on channel %d, %d dBm: %s (%s) -> %s [%s (%s)] !!!" % ( \ )) ap['channel'], + ap['rssi'], sta['mac'], sta['vendor'], ap['hostname'], ap['mac'], ap['vendor'])) plugins.on('handshake', self, filename, ap, sta) @@ -393,8 +394,8 @@ def associate(self, ap, throttle=0): self._view.on_assoc(ap) try: - logging.info("sending association frame to %s (%s %s) on channel %d [%d clients]..." % ( \ - ap['hostname'], ap['mac'], ap['vendor'], ap['channel'], len(ap['clients']))) + logging.info("sending association frame to %s (%s %s) on channel %d [%d clients], %d dBm..." % ( \ + ap['hostname'], ap['mac'], ap['vendor'], ap['channel'], len(ap['clients']), ap['rssi'])) self.run('wifi.assoc %s' % ap['mac']) self._epoch.track(assoc=True) except Exception as e: @@ -414,8 +415,8 @@ def deauth(self, ap, sta, throttle=0): self._view.on_deauth(sta) try: - logging.info("deauthing %s (%s) from %s (%s %s) on channel %d ..." % ( - sta['mac'], sta['vendor'], ap['hostname'], ap['mac'], ap['vendor'], ap['channel'])) + logging.info("deauthing %s (%s) from %s (%s %s) on channel %d, %d dBm ..." % ( + sta['mac'], sta['vendor'], ap['hostname'], ap['mac'], ap['vendor'], ap['channel'], ap['rssi'])) self.run('wifi.deauth %s' % sta['mac']) self._epoch.track(deauth=True) except Exception as e: