Skip to content

Commit

Permalink
Merge pull request #360 from JustGuardian/master
Browse files Browse the repository at this point in the history
Patch for SyntaxWarning at line 287
  • Loading branch information
kimocoder authored Feb 24, 2025
2 parents 41e8724 + a589fd7 commit f4ee69a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion wifite/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def parse_settings_args(cls, args):
Color.pl('{+} {C}option:{W} using {G}random mac address{W} when scanning & attacking')

if args.channel:
chn_arg_re = re.compile("^\d+((,\d+)|(-\d+,\d+))*(-\d+)?$")
chn_arg_re = re.compile(r"^\d+((,\d+)|(-\d+,\d+))*(-\d+)?$")
if not chn_arg_re.match(args.channel):
raise ValueError("Invalid channel! The format must be 1,3-6,9")

Expand Down
4 changes: 4 additions & 0 deletions wifite/util/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def pexception(exception):
# Don't dump trace for the "no targets found" case.
if 'No targets found' in str(exception):
return

# Don't dump trace for the "interface not in monitor mode" case.
if 'Enabled interface not in monitor mode' in str(exception):
return

from ..config import Configuration
if Configuration.verbose > 0 or Configuration.print_stack_traces:
Expand Down

0 comments on commit f4ee69a

Please sign in to comment.