#!/bin/bash
# Filename: Recursive-Wipe
# Author: robz
# Version: 200111
# Script to securely multi-pass erase multiple files and/or directories.
# Put it in your "nautilus-scripts" directory and right click to use.
# Will overwrite file & filename with 2 passes of random data, truncate file
# size then erase the sorry remains. If a directory is erased all directories
# and files within it will receive the same treatment.
# Default gnome-terminal profile actions are used, ie. auto close on exit.
# CAVEAT - this is secure within the limits of a journalling file system.
# See man pages for "wipe or shred" for full explanation.
# Create newline delimited selected files list, handling spaces in file names.
FILE=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" |\
awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##)
zenity\
--question\
--title="Secure Wipe"\
--text="<b>You are about to permanantly wipe:</b>\n$FILE\
\n<span color=\"red\"><b>Are you sure you want to do this?</b></span>"\
--ok-label="ZAP!"\
--cancel-label="Hell No!"
if [ "$?" = 1 ] ; then
exit $?
else
gnome-terminal --geometry 70x10+5+30\
--title="WIPE FILES - It's really gone!!" -x\
bash -c "wipe -rfcqQ2 $FILE && tput bold; tput setaf 3;\
echo -en '\nHit a key to exit this shell '; tput civis;\
read -t10 -n1"
fi
# Filename: Recursive-Wipe
# Author: robz
# Version: 200111
# Script to securely multi-pass erase multiple files and/or directories.
# Put it in your "nautilus-scripts" directory and right click to use.
# Will overwrite file & filename with 2 passes of random data, truncate file
# size then erase the sorry remains. If a directory is erased all directories
# and files within it will receive the same treatment.
# Default gnome-terminal profile actions are used, ie. auto close on exit.
# CAVEAT - this is secure within the limits of a journalling file system.
# See man pages for "wipe or shred" for full explanation.
# Create newline delimited selected files list, handling spaces in file names.
FILE=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" |\
awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##)
zenity\
--question\
--title="Secure Wipe"\
--text="<b>You are about to permanantly wipe:</b>\n$FILE\
\n<span color=\"red\"><b>Are you sure you want to do this?</b></span>"\
--ok-label="ZAP!"\
--cancel-label="Hell No!"
if [ "$?" = 1 ] ; then
exit $?
else
gnome-terminal --geometry 70x10+5+30\
--title="WIPE FILES - It's really gone!!" -x\
bash -c "wipe -rfcqQ2 $FILE && tput bold; tput setaf 3;\
echo -en '\nHit a key to exit this shell '; tput civis;\
read -t10 -n1"
fi
Powered by ScribeFire.
No comments:
Post a Comment