V8.00.000.2025.06.17

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-25 14:26:40 +02:00
parent 5faa796564
commit 8d4dfa0e00
3 changed files with 15 additions and 6 deletions

View File

@@ -78,7 +78,7 @@ print_file_err() {
printf "❌ TRACE Log saved at : %s %b" "${LOG_TRC}" "${NL}" printf "❌ TRACE Log saved at : %s %b" "${LOG_TRC}" "${NL}"
printf "❌ cat %s %b" "${LOG_TRC}" "${NL}" printf "❌ cat %s %b" "${LOG_TRC}" "${NL}"
fi fi
printf "%s" "${NL}" printf "%b" "${NL}"
} >> "${LOG_ERR}" } >> "${LOG_ERR}"
} }
@@ -149,7 +149,7 @@ print_scr_err() {
printf "%b❌ Trace Log saved at : %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2 printf "%b❌ Trace Log saved at : %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2
printf "%b❌ cat %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2 printf "%b❌ cat %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2
fi fi
print_stacktrace #print_stacktrace
printf "%b" "${NL}" printf "%b" "${NL}"
} }

View File

@@ -166,7 +166,7 @@ trap_exit_non_zero() {
printf "%b❌ Debug Log saved at : %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2 printf "%b❌ Debug Log saved at : %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2
printf "%b❌ cat %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2 printf "%b❌ cat %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2
fi fi
print_stacktrace #print_stacktrace
fi fi
exit "${var_code}" exit "${var_code}"

View File

@@ -31,7 +31,16 @@ nuke_passphrase() {
### No tracing for security reasons ### No tracing for security reasons
#[[ "${VAR_DEBUG_TRACE,,}" == "true" ]] && set +x #[[ "${VAR_DEBUG_TRACE,,}" == "true" ]] && set +x
if [[ ! -f "${var_nuke_pwd_file}" ]] || ! IFS= read -r var_temp_plain_nuke_pwd < "${var_nuke_pwd_file}"; then if [[ ! -f "${var_nuke_pwd_file}" ]]; then
return "${ERR_READ_NUKE_FILE}"
fi
if ! read -r var_temp_plain_nuke_pwd < "${var_nuke_pwd_file}"; then
return "${ERR_READ_NUKE_FILE}"
fi
if [[ -z "${var_temp_plain_nuke_pwd}" ]]; then
do_log "fatal" "file_only" "Nuke password file '${var_nuke_pwd_file}' is empty."
return "${ERR_READ_NUKE_FILE}" return "${ERR_READ_NUKE_FILE}"
fi fi
### Turn on tracing again ### Turn on tracing again
@@ -49,13 +58,13 @@ nuke_passphrase() {
declare -grx VAR_NUKE_HASH="${var_temp_nuke_hash}" declare -grx VAR_NUKE_HASH="${var_temp_nuke_hash}"
unset var_temp_nuke_hash var_temp_plain_nuke_pwd unset var_temp_nuke_hash var_temp_plain_nuke_pwd
do_log "debug" "true" "NUKE hash starts with: ${VAR_NUKE_HASH:0:12}..." do_log "debug" "file_only" "NUKE hash starts with: ${VAR_NUKE_HASH:0:12}..."
sync sync
if shred -vfzu -n 5 "${var_nuke_pwd_file}" > /dev/null 2>&1; then if shred -vfzu -n 5 "${var_nuke_pwd_file}" > /dev/null 2>&1; then
do_log "info" "file_only" "✅ Password file '${var_nuke_pwd_file}': shred -vfzu -n 5 >> done." do_log "info" "file_only" "✅ Password file '${var_nuke_pwd_file}': shred -vfzu -n 5 >> done."
else else
do_log "warn" "false" "❌ Password file '${var_nuke_pwd_file}': shred -vfzu -n 5 >> NOT successful." do_log "warn" "file_only" "❌ Password file '${var_nuke_pwd_file}': shred -vfzu -n 5 >> NOT successful."
fi fi
sync sync