Human readable password generator script.

This commit is contained in:
Artem Sapegin 2013-01-15 09:58:24 +04:00
parent 9ffbb101cf
commit 7830883fe3
1 changed files with 16 additions and 0 deletions

16
bin/passphrase Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/python
# Human readable password generator.
# Based on https://github.com/Version2beta/passphrase
NAMES_DICT = "/usr/share/dict/propernames"
DICT = "/usr/share/dict/words"
import random
name = random.sample(list(open(NAMES_DICT)), 1)
words = random.sample(list(open(DICT)), 2)
phrase = name[0].rstrip().lower()
for word in words:
phrase = phrase + word.rstrip().lower()
print phrase