Clan x86
Technical (Development, Security, etc.) => General Programming => Topic started by: Newby on May 07, 2005, 05:55:07 pm
-
I'm currently working on a pretty pretty drive scrubbing script in shell script.
I'll post it open-source when it's complete.
Sure, it's got the basis of the basic script I stole off of iago (for i in 1 2 3 4 5; do cat /dev/urandom > /dev/hda; done) but I made it pretty. It's mad sexy too.
Format so far for the command: ./scrub.sh <drive> <number of scrubs> <wipe with zeroes at the end>
Example: ./scrub.sh /dev/hda 3 yes (I may make the last parameter a 1 or a 0, just because I don't know how to do booleans with shell scripting)
If you forget a parameter (or just run it with ./scrub.sh) it'll prompt you for the parameters you forgot.
Sure, a useless waste of time, but if someone can sell a drive scrubber for $70 (iolo) why can't I release an open-source scrubbing script?!
(Well, the drive scrubber DOES run OS-independently, has a nice GUI, has lots more options, and gives you a time-remaining number, but you get what you paid for :P)
Another reason I'm doing this is so that I keep semi-fluent in programming/scripting. I haven't coded in forever^2 so I don't wanna lose all that skill because I don't want to program. :(
-
Hmm, one of the live Linux distros I was playing with had a built-in drive scrubber. I'll have to figure out which one.
-
Mmk. So far I've got three files.
scrub/scrub-dev.sh // The development edition! Optimized for testing, as it doesn't scrub your drive if you accidentally run it! :P
scrub/scrub.sh // The normal edition. Contains all colors, no comments, and will scrub your drive good!
scrub/scrub-naked.sh // iago comes to your house and scrubs your car naked. .. .. .. Just kidding! It doesn't have any colors! 400 bytes smaller than scrub.sh, half the size of scrub-dev.sh
Yeah! Woo!
-
Don't forget to make it bootable off a floppy or a cd with a minimal Linux kernel. Have it display statistics afterwards. And have it support SCSI (can VirtualPC emulate that for testing?). If you do all those, I can probably convince them to try/use it at work.
-
It requires bash/sh to work correctly.
I'll get around to looking at that. :)
-
Well, things like Knoppix come with bash/sh.
But you can make a very compact Linux (or bsd) that fits on a floppy and is only useful for wiping. It can even give a menu instead of making the user run the command. :-)
-
Dead sexy.
-
Hold on, hold on, wouldn't
for i in 1 2 3 4 5 6 7 8 9 ; do cat /dev/urandom > /dev/hda; cat /dev/zero > /dev/hda; done
work better?
-
The answer is no.
-
Are you going to release this any time soon? I want to try it on iago's harddrive. (No.)
-
Are you going to release this any time soon? I want to try it on iago's harddrive. (No.)
Luckly, you don't have root :P
-
Are you going to release this any time soon? I want to try it on iago's harddrive. (No.)
Luckly, you don't have root :P
I was gonna comment. :P
EDIT -- Colorful source code can be found here (http://www.newbyproductions.net/junk/scrub.sh.html).
-
404 n3wby
u suk.
-
404 obliterated!