manage hdd liike ram?

This is a discussion on manage hdd liike ram? within the C Programming forums, part of the General Programming Boards category; I was curious, there's a program called "ZDelete" out there that doesn't just "delete" something from your hard drive, it ...

  1. #1
    Dogbert B-Con's Avatar
    Join Date
    Mar 2004
    Posts
    25

    manage hdd liike ram?

    I was curious, there's a program called "ZDelete" out there that doesn't just "delete" something from your hard drive, it physically removes it. I was wondering if that might be possible to do in C.

    What do you do in order to do that? Does it kinda work like ram, where you can manually set certain addresses to a value, and just find the beginning and end of the program and set all value's in between to NULL or something?

    I was just curious, and it might make for some nice extra-credit work for me
    "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

  2. #2
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    It just writes over the data with "a character, its complement, then a random character" to make sure that it has no remains physically, not just software wise. This could be easily implemented in c.
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    channel: #c

  3. #3
    Dogbert B-Con's Avatar
    Join Date
    Mar 2004
    Posts
    25
    OK, how could I do that? I only have a college semester's training in C, nothing special.... :s
    "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    It is an OS specific operation. Tell us the OS we will tell you how, but bear in mind this is one of those "oh crap this is over my head" moments for you in all probability.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    1) Get the size of the file.
    2) Open the file for writing.
    3) While not at the end of the file, a random byte.
    4) Rewind the file.
    5) While you're still having fun, go to step 3.
    6) Close the file.
    7) Delete the file.

    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Actually Quzah is right. So long as you keep the file the same size there is 0 chance of the file being moved to a different location on the HDD. Good one Quzah.

  7. #7
    Dogbert B-Con's Avatar
    Join Date
    Mar 2004
    Posts
    25
    Thanx quzah, shudda thought of that.... That'll work nicely....

    Since this won't always be on a Windows machine, is there a way, without addressing the system, to delete the file?
    "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

  8. #8
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    remove it.

    Quzah.
    Hope is the first step on the road to disappointment.

  9. #9
    Dogbert B-Con's Avatar
    Join Date
    Mar 2004
    Posts
    25
    Thanx

    OK, I have everything I need and I've writting the program, I think overwriting it 3, maybe 4, time should be enough....?
    "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RAM upgrade
    By BobS0327 in forum Tech Board
    Replies: 6
    Last Post: 12-10-2008, 08:14 AM
  2. Ways to save RAM when RAM is very limited
    By suzanne_lim in forum C Programming
    Replies: 22
    Last Post: 02-07-2006, 01:39 AM
  3. Programming and RAM
    By spveer in forum C Programming
    Replies: 3
    Last Post: 06-16-2005, 12:17 PM
  4. RAM how do i know?
    By Boomba in forum Tech Board
    Replies: 5
    Last Post: 06-18-2003, 09:17 PM
  5. pointerz
    By xlordt in forum C Programming
    Replies: 6
    Last Post: 01-11-2002, 08:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21