From 95e5a18f65e0676d5ce2e037caa14b75746275fd Mon Sep 17 00:00:00 2001 From: Colin P. Mccabe Date: Wed, 19 Dec 2018 16:11:14 -0800 Subject: [PATCH] Remove passtool.sh Remove passtool.sh since vault should be used instead. --- passtool.sh | 101 ----------------------------------------------------------- 1 files changed, 0 insertions(+), 101 deletions(-) delete mode 100755 passtool.sh diff --git a/passtool.sh b/passtool.sh deleted file mode 100755 index ce34965..0000000 --- a/passtool.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env bash - -die() { - echo $1 - exit 1 -} - -usage() -{ - cat < "${dest}" -} - -decrypt_file() { - dest="${1}" - src="${2}" - openssl enc -d -aes-256-ecb -k "${PASSWORD}" < "${src}" > "${dest}" -} - -SEARCH_PATTERN="" -PLAINTEXT=0 -while getopts "f:hps:" flag; do - case $flag in - f) PASSWORD_PATH="${OPTARG}";; - h) usage; exit 0;; - p) PLAINTEXT=1;; - s) SEARCH_PATTERN="${OPTARG}";; - *) echo; usage; exit 1;; - esac -done - -[[ -z ${PASSWORD_PATH} ]] && die "You must specify a password file path with -f" -[[ -f ${PASSWORD_PATH} ]] || die "No regular file found at ${PASSWORD_PATH}" - -if [[ -z ${PASSWORD} ]]; then - read -s -p "enter password: " PASSWORD -fi -if [[ ${PLAINTEXT} -eq 1 ]]; then - if [[ ${SEARCH_PATTERN} != "" ]]; then - die "You may not specify both -s and -p." - fi - encrypt_new_file -elif [[ ${SEARCH_PATTERN} != "" ]]; then - search_existing_file -else - edit_existing_file -fi - -- 1.6.6.rc1.39.g9a42