encrypt 3 years ago
commit
02322903c5
5 changed files with 26 additions and 0 deletions
  1. 6 0
      README.md
  2. 20 0
      chbs.sh
  3. 0 0
      data/jargon.txt
  4. 0 0
      data/science-terms.txt
  5. 0 0
      data/wordlist.txt

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+# Correct Horse Battery Staple
+
+![](https://imgs.xkcd.com/comics/password_strength.png)
+
+Data stolen from:
+* https://bitbucket.org/jvdl/correcthorsebatterystaple

+ 20 - 0
chbs.sh

@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# WTFPL !
+
+datadir="./data"
+separator='-'
+words=4
+
+for arg in "$@"
+do
+    case $arg in
+	-s=*|--separator=*)
+	    separator="${arg#*=}"
+	    shift
+	    ;;
+    esac
+done
+
+correcthorse=$(cat $datadir/* | sed 's/,/\n/g' | shuf | tail -n $words | sed "s/$/$separator/; s/\b\(.\)/\u\1/" | tr -d \[:space:\])
+echo $correcthorse$(shuf -i0-9 -n1)

File diff suppressed because it is too large
+ 0 - 0
data/jargon.txt


File diff suppressed because it is too large
+ 0 - 0
data/science-terms.txt


File diff suppressed because it is too large
+ 0 - 0
data/wordlist.txt


Some files were not shown because too many files changed in this diff