X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=dec.sh;h=d5c27095f62045fe824fdf7907d56e31c4db4809;hb=fbb7220527c04fb8b07aa777c2f46c26e35f56ed;hp=ef4aaa1455aa3030eaa120ca26d6656893046b8e;hpb=aaee3c8df14e4d369807541055c55fa06265d551;p=cmccabe-bin diff --git a/dec.sh b/dec.sh index ef4aaa1..d5c2709 100755 --- a/dec.sh +++ b/dec.sh @@ -5,8 +5,9 @@ die() { exit 1 } -[ "x${SALT}" = "x" ] && die "you must set SALT to the salt." -[ "x${PASS}" = "x" ] && die "you must set PASS to the password" +if [[ "x${PASS}" = "x" ]]; then + read -s -p "enter password: " PASS +fi RET=0 for FILE in "$@"; do @@ -16,7 +17,6 @@ for FILE in "$@"; do echo "Not decrypting $FILE because there is already a ${BASE_FILE}" else if openssl enc -d -aes-256-ecb \ - -S "$SALT" \ -k "$PASS" < "${FILE}" > "${BASE_FILE}"; then echo "Created ${BASE_FILE}" else