Skip to content

Commit 88a32e2

Browse files
committed
Print more helpful airodump failure reason PR derv82#181
1 parent 2a664d4 commit 88a32e2

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

wifite/tools/tshark.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ def check_for_wps_and_update_targets(capfile, targets):
179179
try:
180180
p.wait()
181181
lines = p.stdout()
182-
except:
182+
except Exception as e:
183+
# Manually check for keyboard interrupt as only python 3.x throws
184+
# exceptions for subprocess.wait()
185+
if isinstance(e, KeyboardInterrupt):
186+
raise KeyboardInterrupt
187+
183188
# Failure is acceptable
184189
return
185190

wifite/tools/wash.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ def check_for_wps_and_update_targets(capfile, targets):
3131
try:
3232
p.wait()
3333
lines = p.stdout()
34-
except:
34+
except Exception as e:
35+
# Manually check for keyboard interrupt as only python 3.x throws
36+
# exceptions for subprocess.wait()
37+
if isinstance(e, KeyboardInterrupt):
38+
raise KeyboardInterrupt
39+
3540
# Failure is acceptable
3641
return
3742

@@ -47,7 +52,9 @@ def check_for_wps_and_update_targets(capfile, targets):
4752
wps_bssids.add(bssid)
4853
else:
4954
locked_bssids.add(bssid)
50-
except:
55+
except Exception as e:
56+
if isinstance(e, KeyboardInterrupt):
57+
raise KeyboardInterrupt
5158
pass
5259

5360
# Update targets

0 commit comments

Comments
 (0)