Page 2 of 2
Posted: 2006-04-26 04:00pm
by Vendetta
There's another great way to render CDs completely useless.
1. balance the centre of the CD on something, so the sides hang over.
2. pour lighter fluid on the CD.
3. Ignite.
The CD will soften and melt, the edges will sag downwards, and you will have an attractive little shiny pot type thing..
Re: Secure Deletion
Posted: 2006-04-26 08:06pm
by Durandal
Admiral Valdemar wrote:I'm looking for a secure way of deleting files totally on Ubuntu 5.10 Breezy Badger, but so far I see that using any journaling filesystem means secure deletion isn't guaranteed (I'm using Ext3 as default).
In that case, is it best to encrypt files tagged for deletion before sending them to the waste bin? Assuming someone wanted to get at my old password keys or financial documents etc., they'd have to not only recover the file from deletion, but crack a 4 kilobyte cipher. Would that do it?
Code: Select all
/*
* secure_delete.c
*
*
* Created by Damien Sorresso on 4/26/06.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
int main(int argc, char *argv[])
{
if( argc != 2 ) {
printf("Usage: %s <file to delete>\n", argv[0]);
return 0;
}
FILE *file = fopen(argv[1], "rb+");
if( !file ) {
printf("Could not open file %s. Exiting.\n", argv[1]);
}
struct stat buff;
stat(argv[1], &buff);
long size = buff.st_size;
int byte = 1;
long i = 0;
srand(time(0));
while( i < size ) {
fputc(byte << (rand() % 32), file);
fseek(file, i, SEEK_SET);
i++;
}
fclose(file);
return 0;
}
This will simply write over the file, byte-by-byte, with a randomly-shifted binary number. Then you just delete it. It should compile just fine under Linux.
Posted: 2006-04-26 08:16pm
by Admiral Valdemar
My hero!