From a28c575d60824ec87ef0e4c6be2fae879f101d24 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Tue, 26 May 2026 20:50:50 -0600 Subject: [PATCH] migration --- bash_antiforensics_methods_test_scratch.sh | 9 +++++++++ migration.tmp | 0 2 files changed, 9 insertions(+) create mode 100644 migration.tmp diff --git a/bash_antiforensics_methods_test_scratch.sh b/bash_antiforensics_methods_test_scratch.sh index 9e2a13c..6cf4919 100644 --- a/bash_antiforensics_methods_test_scratch.sh +++ b/bash_antiforensics_methods_test_scratch.sh @@ -41,6 +41,15 @@ zero_delete_dir () { rm -rf "$1" } +# a function to securely zero out and unset a variable# wip; + secure_unset_var () { + truncate_str=$(printf "%600s" | sed 's/ /0/g') # 600 ascii zeros in a row + eval "\$$1=\"$truncate_str\"" # set the new var to the 600 zeros + eval "echo \$$1" + eval "unset \$$1" # unser string varname + unset truncate_str # unset zeros +} + # nuke file ## if shred is available, it zeros the file and deletes it, otherwise rm -f's it shred -uz "$mytempfile" || rm -f "$mytempfile" diff --git a/migration.tmp b/migration.tmp new file mode 100644 index 0000000..e69de29