1
0
Fork 0
main
Simon Moser vor 3 Jahren
Commit fa7921141d

@ -0,0 +1,16 @@
#!/usr/bin/python3
from argparse import ArgumentParser
from secrets import choice
from sys import path
if __name__ == "__main__":
ap = ArgumentParser(description="Generates a password out of common german words", prog="wordpass.py")
ap.add_argument("-l", "--length", type=int, default=5, help="Number of words (default: 5)")
ap.add_argument("-c", "--count", type=int, default=1, help="Number of passwords (default: 1)")
ap.add_argument("--lang", type=str, default="DE", help="Language code (default: DE)")
args = ap.parse_args()
file_path = ("" if path[0] == "" else path[0] + "/") + f"words_{args.lang}.txt"
with open(file_path) as wl:
words = wl.readlines()
for j in range(args.count):
print(''.join(choice(words).strip().title() for i in range(args.length)))

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei-Diff unterdrückt, da er zu groß ist Diff laden
Laden…
Abbrechen
Speichern