Allow use of own wordlist

pull/66/head
David Trail 8 years ago
parent 92028f21d7
commit 4e785dca72

@ -87,7 +87,7 @@ try:
except ImportError: except ImportError:
# Module unavailable, use the default phrase # Module unavailable, use the default phrase
pass pass
os_wordlist = '/usr/share/dict/words' os_wordlist = config.get('wordlist', '/usr/share/dict/words')
if os.name == 'posix' and os.path.isfile(os_wordlist): if os.name == 'posix' and os.path.isfile(os_wordlist):
# Generate a random string of words from our system's dictionary # Generate a random string of words from our system's dictionary
fh = open(os_wordlist) fh = open(os_wordlist)

@ -72,4 +72,7 @@ replacement_format: random
# See: https://docs.python.org/3/library/logging.html#logging-levels # See: https://docs.python.org/3/library/logging.html#logging-levels
debug: DEBUG debug: DEBUG
# Define your own wordlist to use as substitution text
wordlist: False
# vim: syntax=yaml ts=2 # vim: syntax=yaml ts=2

Loading…
Cancel
Save