V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -78,7 +78,7 @@ print_file_err() {
|
||||
printf "❌ TRACE Log saved at : %s %b" "${LOG_TRC}" "${NL}"
|
||||
printf "❌ cat %s %b" "${LOG_TRC}" "${NL}"
|
||||
fi
|
||||
printf "%s" "${NL}"
|
||||
printf "%b" "${NL}"
|
||||
} >> "${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❌ cat %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2
|
||||
fi
|
||||
print_stacktrace
|
||||
#print_stacktrace
|
||||
printf "%b" "${NL}"
|
||||
}
|
||||
|
||||
|
||||
@@ -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❌ cat %s %b%b" "${RED}" "${LOG_TRC}" "${RES}" "${NL}" >&2
|
||||
fi
|
||||
print_stacktrace
|
||||
#print_stacktrace
|
||||
fi
|
||||
|
||||
exit "${var_code}"
|
||||
|
||||
@@ -31,7 +31,16 @@ nuke_passphrase() {
|
||||
|
||||
### No tracing for security reasons
|
||||
#[[ "${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}"
|
||||
fi
|
||||
### Turn on tracing again
|
||||
@@ -49,13 +58,13 @@ nuke_passphrase() {
|
||||
declare -grx VAR_NUKE_HASH="${var_temp_nuke_hash}"
|
||||
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
|
||||
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."
|
||||
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
|
||||
sync
|
||||
|
||||
|
||||
Reference in New Issue
Block a user