News:

Happy New Year! Yes, the current one, not a previous one; this is a new post, we swear!

Main Menu

[SH] Drive scrubbing script

Started by Newby, May 07, 2005, 05:55:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Newby

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. :(
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

iago

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.

Newby

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!
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

iago

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.

Newby

It requires bash/sh to work correctly.

I'll get around to looking at that. :)
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

iago

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.  :-)

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Quik

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?
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Newby

- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Joe

Are you going to release this any time soon? I want to try it on iago's harddrive. (No.)
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


iago

Quote from: Joex86] link=topic=1250.msg11016#msg11016 date=1116297666]
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

Newby

#11
Quote from: iago on May 17, 2005, 06:54:14 PM
Quote from: Joex86] link=topic=1250.msg11016#msg11016 date=1116297666]
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.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

deadly7

[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
[17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.