Small update version 2.1.1

This commit is contained in:
Jeroen Oudshoorn
2023-08-29 23:48:07 +02:00
parent d7fa4b8a5f
commit df037ab707

View File

@ -230,8 +230,8 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
if ap['mac'] == ap_mac:
for sta in ap['clients']:
if sta['mac'] == station_mac:
return (ap, sta)
return (ap, {'mac': station_mac, 'vendor': ''})
return ap, sta
return ap, {'mac': station_mac, 'vendor': ''}
return None
def _update_uptime(self, s):
@ -260,7 +260,7 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
txt = '%d (%d)' % (len(self._handshakes), tot)
if self._last_pwnd is not None:
txt += ' [%s]' % self._last_pwnd[:11]
txt += ' [%s]' % self._last_pwnd[:11] # So it doesn't overlap with fix_brcmfmac_plugin
self._view.set('shakes', txt)
@ -305,11 +305,9 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
if not no_exceptions:
raise
def start_session_fetcher(self):
_thread.start_new_thread(self._fetch_stats, ())
def _fetch_stats(self):
while True:
try:
@ -342,7 +340,6 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
time.sleep(5)
async def _on_event(self, msg):
found_handshake = False
jmsg = json.loads(msg)