When I couldn't find a decent file wiping utility on my own machine, I decided to write one. Yes, I did search the net and came up with a few... but they seem to be poorly written and overly complicated. So, in just 64 lines, I wrote one that would be useful for me, that would work well, and that is simple enough to understand. What has this to do with full-disclosure, you might ask? Everything! Call me paranoid, but if/when the feds come a-knocking, I want to be able to execute a single command that will securely delete non-encrypted data on my hard disk. i.e. all the 0-day exploits, the leaked Microsoft and Half-Life source code, and the porn from Hitler's bunker. You might want to name this program something inconspicuous (like 'index') and place it in /sbin, then add something like the following to rc.local: sleep 300 && screen -d -m find /home/foo -type f | xargs /sbin/index Just make sure to resume the screen as root within 5 minutes of system boot time :) Depending on your paranoia, you may want to change the PASSES define, which controls how many times the file is overwritten. Keep in mind that my program will overwrite your file 3 times for each increment of PASSES (once with zeroes, once with ones, and once with random data). For example, the default setting (2) will overwrite your file 6 times. With that in mind, a setting of 2 - 3 should be plenty. I tested this program with a 500 mb file, which took 52 seconds to complete on my system (using the source code attached). The same file with PASSES defined as 15 took at least 4 and a half minutes (well... I killed it just after 4:45 because it was taking too long :P). On to licensing: I release this code under the GPL. A credit to me (the original author) would be appreciated (but is not required) in any derivative work. You can send any questions or comments to me. The source should compile cleanly on Linux and likely other Unices, however it will almost certainly not work on Windows without modifications. Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34?/mn) ; tél : 08 92 68 13 50 (0,34?/mn)
Attachment:
wipe.c.gz
Description: Unix tar archive