Skip to content

Instantly share code, notes, and snippets.

@alertedsnake
alertedsnake / randompw.py
Last active January 4, 2018 17:54
xkcd #936 password generator
#!/usr/bin/env python3
"""
Random password generator, ala https://xkcd.com/936/
The wordlist is assumed to be a list of words in the language of your choice,
of the sizes of your choice. I got mine out of aspell::
aspell dump master | \
sed -e "s/'s$//" -e '/^[A-Z]/d' -e '/^.\{4,6\}$/!d' | \
sort -u > wordlist.txt