Skip to content

Commit

Permalink
Fix bug when airodump output for clients is unexpected/unparsable
Browse files Browse the repository at this point in the history
  • Loading branch information
derv82 committed May 18, 2017
1 parent c4773c6 commit c812edf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py/Airodump.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def get_targets_from_csv(csv_filename):
# 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

Expand Down
6 changes: 6 additions & 0 deletions py/Bully.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ def parse_line(self, line):
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:
Expand Down
4 changes: 2 additions & 2 deletions py/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def __init__(self, fields):
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()


Expand Down

0 comments on commit c812edf

Please sign in to comment.