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

@@ -195,7 +195,7 @@ class Airodump(object):
# The current row corresponds to a "Client" (computer)
try:
client = Client(row)
except IndexError:
except IndexError, ValueError:
# Skip if we can't parse the client row
continue

View File

@@ -170,6 +170,12 @@ class Bully(Attack):
if pixie_re:
self.state = "{R}Failed{W}"
# [+] Running pixiewps with the information, wait ...
pixie_re = re.compile(r".*Running pixiewps with the information").match(line)
if pixie_re:
self.state = "{G}Running pixiewps...{W}"
# [*] Pin is '80246213', key is 'password'
pin_key_re = re.compile(r"^\s*Pin is '(\d*)', key is '(.*)'\s*$").match(line)
if pin_key_re:

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()