Fix bug when airodump output for clients is unexpected/unparsable

This commit is contained in:
derv82
2017-05-18 00:14:49 -04:00
parent c4773c6d1a
commit c812edf630
3 changed files with 9 additions and 3 deletions

View File

@@ -22,8 +22,8 @@ class Client(object):
6 Probed ESSIDs
'''
self.station = fields[0].strip()
self.power = int(fields[3].strip()) if fields[3].strip().isdigit() else 0
self.packets = int(fields[4].strip()) if fields[4].strip().isdigit() else 0
self.power = int(fields[3].strip())
self.packets = int(fields[4].strip())
self.bssid = fields[5].strip()