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