Skip to content

Commit

Permalink
Always print stack traces for errors during WEP attack
Browse files Browse the repository at this point in the history
Should make troubleshooting #27 easier.
  • Loading branch information
derv82 committed Mar 11, 2018
1 parent 697207f commit 93af516
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Wifite.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def run(self):
result = False
try:
result = attack.run()
except Exception, e:
except Exception as e:
Color.pl("\n{!} {R}Error: {O}%s" % str(e))
if Configuration.verbose > 0 or True:
if Configuration.verbose > 0 or Configuration.print_stack_traces:
Color.pl('\n{!} {O}Full stack trace below')
from traceback import format_exc
Color.p('\n{!} ')
Expand Down
11 changes: 10 additions & 1 deletion py/AttackWEP.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,16 @@ def run(self):
self.success = False
return self.success
except Exception as e:
Color.pl("\n{+} {R}Error: {O}%s{W}" % e)
Color.pl("\n{!} {R}Error: {O}%s" % str(e))
if Configuration.verbose > 0 or Configuration.print_stack_traces:
Color.pl('\n{!} {O}Full stack trace below')
from traceback import format_exc
Color.p('\n{!} ')
err = format_exc().strip()
err = err.replace('\n', '\n{!} {C} ')
err = err.replace(' File', '{W}File')
err = err.replace(' Exception: ', '{R}Exception: {O}')
Color.pl(err)
continue
# End of big try-catch
# End of for-each-attack-type loop
Expand Down
1 change: 1 addition & 0 deletions py/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def initialize(load_interface=True):
Configuration.initialized = True

Configuration.verbose = 0 # Verbosity level.
Configuration.print_stack_traces = True

Configuration.kill_conflicting_processes = False

Expand Down

0 comments on commit 93af516

Please sign in to comment.