summaryrefslogtreecommitdiff
path: root/passphrase.sh
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2024-03-01 19:51:00 -0500
committerShav Kinderlehrer <[email protected]>2024-03-01 19:51:00 -0500
commit8f099d14afd8bc755c3be319812b45a2856a70bd (patch)
tree53c7f5ee115abead34b427973d05694c29c806f0 /passphrase.sh
parentb0d5301b904d60d300a2b7ab2a93da28bb15049f (diff)
downloadscripts-main.tar.gz
scripts-main.zip
Add passhprase generatorHEADmain
Diffstat (limited to 'passphrase.sh')
-rwxr-xr-xpassphrase.sh17
1 files changed, 17 insertions, 0 deletions
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