Author Topic: [SH] Drive scrubbing script  (Read 8722 times)

0 Members and 1 Guest are viewing this topic.

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
[SH] Drive scrubbing script
« 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. :(
« Last Edit: May 07, 2005, 05:58:38 pm by 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

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. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [SH] Drive scrubbing script
« Reply #1 on: May 07, 2005, 06:04:39 pm »
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.

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [SH] Drive scrubbing script
« Reply #2 on: May 08, 2005, 01:46:54 pm »
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

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. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [SH] Drive scrubbing script
« Reply #3 on: May 08, 2005, 02:11:36 pm »
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.

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [SH] Drive scrubbing script
« Reply #4 on: May 08, 2005, 03:23:32 pm »
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

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. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [SH] Drive scrubbing script
« Reply #5 on: May 08, 2005, 03:24:47 pm »
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.  :-)

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [SH] Drive scrubbing script
« Reply #6 on: May 11, 2005, 07:57:04 am »
Dead sexy.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: [SH] Drive scrubbing script
« Reply #7 on: May 16, 2005, 07:45:09 pm »
Hold on, hold on, wouldn't

Code: [Select]
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

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [SH] Drive scrubbing script
« Reply #8 on: May 16, 2005, 08:09:32 pm »
The answer is no.
- 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

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. 

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [SH] Drive scrubbing script
« Reply #9 on: May 16, 2005, 10:41:06 pm »
Are you going to release this any time soon? I want to try it on iago's harddrive. (No.)
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: [SH] Drive scrubbing script
« Reply #10 on: May 17, 2005, 06:54:14 pm »
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

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: [SH] Drive scrubbing script
« Reply #11 on: May 17, 2005, 06:57:51 pm »
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.
« Last Edit: May 18, 2005, 06:03:56 pm by 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

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. 

Offline deadly7

  • 42
  • x86
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: [SH] Drive scrubbing script
« Reply #12 on: May 18, 2005, 05:49:18 pm »
404 n3wby
u suk.
[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

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [SH] Drive scrubbing script
« Reply #13 on: May 18, 2005, 10:17:25 pm »
404 obliterated!
I'd personally do as Joe suggests

You might be right about that, Joe.