From 39bba7b885726aa390bfd3bfbfe02fb5cf811b73 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 10 Dec 2020 18:52:57 +0100 Subject: Command line parser --- download/download.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'download') diff --git a/download/download.py b/download/download.py index 25fae89..6939c59 100755 --- a/download/download.py +++ b/download/download.py @@ -39,6 +39,9 @@ if __name__ == '__main__': parser.add_argument('-i', '--in', dest='dumpF', action='store', help='the input dump file\'s filename', default='') + parser.add_argument('-l', '--word-list', dest='wordList', action='store', + help='the alternative output, filename of the word list', + default=None) parser.add_argument('-d', '--download', dest='download', action='store_true', help='to download the lastest dump') @@ -46,6 +49,9 @@ if __name__ == '__main__': download = True + if not arg.wordList: + arg.wordList = arg.outputF + '.wordlist' + if download and arg.dumpF: print('''Incompatible options '-i' and '-d'.''') exit(1) -- cgit v1.2.3-54-g00ecf