From 7830883fe371cd6a53bda141ce36d9642849db0a Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Tue, 15 Jan 2013 09:58:24 +0400 Subject: [PATCH] Human readable password generator script. --- bin/passphrase | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/passphrase diff --git a/bin/passphrase b/bin/passphrase new file mode 100755 index 0000000..d32c712 --- /dev/null +++ b/bin/passphrase @@ -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