play/scripts/pppassword

17 lines
284 B
Plaintext
Executable file

#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3
import sys
import os
import secrets
a = "".join(sys.argv[1:])
d = "pq"
if "b" in a:
d = d + "b"
if "u" in a:
d = d + d.upper()
l = 16 + secrets.randbelow(16)
print(''.join([secrets.choice(d) for _ in range(l)]))