diff --git a/wifite/args.py b/wifite/args.py index 6c07e6201..611ff3531 100755 --- a/wifite/args.py +++ b/wifite/args.py @@ -144,14 +144,18 @@ def _add_global_args(self, glob): help=self._verbose('ESSID (e.g. {GR}NETGEAR07{W}) of access point to attack')) glob.add_argument('--essid', help=argparse.SUPPRESS, action='store', dest='target_essid', type=str) + def file_to_list(file_path): + with open(file_path, 'r') as f: + return [line.strip() for line in f] + + ... glob.add_argument('-E', - action='append', - dest='ignore_essids', - metavar='[text]', - type=str, + action='store', + dest='ignore_essids_file', + metavar='[file]', + type=argparse.FileType('r'), default=None, - help=self._verbose( - 'Hides targets with ESSIDs that match the given text. Can be used more than once.')) + help=self._verbose('Hides targets with ESSIDs that match the given text in the file.')) glob.add_argument('--ignore-essid', help=argparse.SUPPRESS, action='append', dest='ignore_essids', type=str) glob.add_argument('-ic',