From f7edb019d2cd3c29d796f679607ce0d7d29cb778 Mon Sep 17 00:00:00 2001 From: Frank Bischof Date: Wed, 21 Feb 2024 11:45:50 +0100 Subject: [PATCH] Updated --- crypter.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crypter.sh b/crypter.sh index 9978fac..a324ffe 100755 --- a/crypter.sh +++ b/crypter.sh @@ -30,11 +30,12 @@ case "$1" in if [ "`stat ${OUTPUT} | grep Size | awk '{ print $2}'`" != 0 ] then # OK - safe to delete the original input file + echo "OK - Deleting file ${INPUT}" rm -f ${INPUT} exit 0 else # NOK - remove empty output file - echo "Output file is 0 bytes! Not removing the source file" + echo "CRITICAL - Output file ${OUTPUT} is 0 bytes! Not removing the source file ${INPUT}" rm -f ${OUTPUT} exit 2 fi @@ -45,14 +46,14 @@ case "$1" in base64 -d ${INPUT} > ${INPUT}.temp openssl enc -d $KEYS -in ${INPUT}.temp -out ${OUTPUT} rm -f ${INPUT}.temp - exit if [ "`stat ${OUTPUT} | grep Size | awk '{ print $2}'`" != 0 ] then # OK - safe to delete the original input file + echo "OK - Deleting file ${INPUT}" rm -f ${INPUT} else # NOK - remove empty output file - echo "Output file is 0 bytes! Not removing the source file" + echo "CRITICAL - Output file ${OUTPUT} is 0 bytes! Not removing the source file ${INPUT}" rm -f ${OUTPUT} exit 2 fi