Add --count option.
This commit is contained in:
parent
355c02cf7e
commit
3ddaa83edd
1 changed files with 37 additions and 28 deletions
|
@ -75,6 +75,7 @@ def random_hex(length):
|
||||||
return token
|
return token
|
||||||
|
|
||||||
def passwordy_argparse(args):
|
def passwordy_argparse(args):
|
||||||
|
for index in range(args.count):
|
||||||
if args.sentence:
|
if args.sentence:
|
||||||
password = make_sentence(args.length, args.separator)
|
password = make_sentence(args.length, args.separator)
|
||||||
else:
|
else:
|
||||||
|
@ -155,6 +156,14 @@ def main(argv):
|
||||||
In normal mode, the --groups-of chunks will be joined with this string.
|
In normal mode, the --groups-of chunks will be joined with this string.
|
||||||
''',
|
''',
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--count',
|
||||||
|
type=int,
|
||||||
|
default=1,
|
||||||
|
help='''
|
||||||
|
Generate this many passwords, to be printed out one per line.
|
||||||
|
''',
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--letters',
|
'--letters',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|
Loading…
Reference in a new issue