Created
September 20, 2017 12:26
-
-
Save Freccia/59531a146e52e9f71dab6f927706d56c to your computer and use it in GitHub Desktop.
Got something to hide ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
RED='\033[1;31m' | |
BLUE='\033[1;34m' | |
YELLOW='\033[1;33m' | |
ENDC='\033[0m' | |
echo -e $RED "This is such a powerful tool, please be careful using it." $ENDC | |
read a | |
echo -e $BLUE "As with great powers comes great responsibilities..." $ENDC | |
read a | |
if [ $# -lt 1 ] || [ `dirname $1` != "/dev" ] ;then | |
echo -e $BLUE "Usage: wipe-iT [disk-device]" $ENDC | |
fi | |
sleep 1 | |
echo -e $YELLOW "Wait a sec." | |
echo -e " Are you really, REALLY sure you wanna wipe $1 device ? (y/n)" $ENDC | |
read R | |
if [[ ( -n $R ) && ( "$R" == "y" || "$R" == "yes" ) ]] ;then | |
echo -e $BLUE "As you want I am deleting the device $1" $ENDC | |
for n in `seq 7`; | |
do | |
exit 1 | |
# dd if=/dev/urandom of=$1 bs=8b conv=notrunc | |
done | |
else | |
echo -e $RED ABORTING $ENDC | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment