diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-09-26 00:29:13 -0400 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-09-26 00:29:13 -0400 |
| commit | fa7f67ad9c85fbed8bc1f5ba5d98681c763b3248 (patch) | |
| tree | f5a63e3958bd2311ad850b5cc4db3ffbc30efa39 /mkpw.py | |
| parent | af2368e499f4e7bd5109aa25a041b1b497842129 (diff) | |
| download | mkpw-0.1.0.tar.gz | |
Diffstat (limited to 'mkpw.py')
| -rwxr-xr-x | mkpw.py | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -15,6 +15,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. +from secrets import choice +from argparse import ArgumentParser + WORDS = [ "abacuss", "abdomens", @@ -7993,19 +7996,12 @@ WORDS = [ "zooms", ] -import secrets -from argparse import ArgumentParser - argparser = ArgumentParser() -argparser.add_argument("-l", "--length", type=int, default=7) -args = argparser.parse_args() -choices = [] +argparser.add_argument("-l", "--length", type=int, default=7) -for _ in range(length): - word = secrets.choice(WORDS) - choices.append(word) +args = argparser.parse_args() -password = "-".join(c for c in choices) +pw = "-".join(choice(WORDS) for _ in range(args.length)) -print(password) +print(pw) |
