summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--].gitignore1
-rwxr-xr-xpassphrase.sh17
2 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index c692293..e550469 100644..100755
--- a/.gitignore
+++ b/.gitignore
@@ -76,3 +76,4 @@ $RECYCLE.BIN/
# End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux
+words.txt
diff --git a/passphrase.sh b/passphrase.sh
new file mode 100755
index 0000000..0e4ab63
--- /dev/null
+++ b/passphrase.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env zsh
+
+WORDLIST_URL='https://www.mit.edu/~ecprice/wordlist.10000'
+PASS_LEN=6
+
+if [ ! -f words.txt ]; then
+ curl "$WORDLIST_URL" > words.txt
+fi
+
+
+for i in {1..$1}; do
+ for word in $(cat words.txt | sort -R | head -n $((PASS_LEN-1))); do
+ printf "%s-" "$word"
+ done
+
+ printf "%s\n" $(cat words.txt | sort -R | head -n1)
+done