summaryrefslogtreecommitdiff
path: root/passphrase.sh
blob: 0e4ab63e903af57befa538fd4e56f2de5143baba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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