Created
July 29, 2025 05:28
-
-
Save ObjectBoxPC/f974d9bc894c8af28959dc0bf733d8dc to your computer and use it in GitHub Desktop.
Create "hybrid" passwords with a combination of Diceware words and random symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import secrets | |
import string | |
WORD_LIST = "/usr/share/keepassxc/wordlists/eff_large.wordlist" | |
words = [w.strip() for w in open(WORD_LIST)] | |
symbols = string.ascii_letters + string.digits + string.punctuation | |
word_part = " ".join(secrets.choice(words) for _ in range(4)) | |
symbol_part = "".join(secrets.choice(symbols) for _ in range(4)) | |
print("{} {}".format(word_part, symbol_part)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment