Thread: File shredders

  1. #1
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51

    Talking File shredders

    Hi all!!

    I'd like a little advice if somebody has the time,

    I'm a relative beginner to programing, my only real project being a little xor encryptor, but i
    fancied a go at writing a file shredder which has proved to be a bit complicated.

    Is this kind of thing wildly out of reach for me at the moment, and if it is can anybody recommend me some good projects to learn with. If its not that difficult can somebody give some links to some helpfull sites?

    thanx to all!

  2. #2
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Eh I think all a file shredder does is essentially open a file and overwrite each and every byte of the contents with either random or blank information.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    224
    Windows compresses some files, and they are not straight forward to delete like that.

  4. #4
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51
    Well , i thought it would be a simple little project, like what Frobozz was basically saying
    but i'm having trouble with it. Word files are fine but the real stumbling block is picture files
    which seem to be a nightmare. I can open the files but cant 'fget' any characters. Do i just need to go off and go into picture formatting with more detail or is this a programming problem??

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I can open the files but cant 'fget' any characters.
    You expect pictures to be made of characters?
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #6
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51
    well
    maybe i've turned two pages at once,but if i open a picture file in notepad
    i get a long list of stuff from the ascII table and from basic reading from wikipedia
    and a few simple tutorials i never came across anything suggesting otherwise.

    You're going to tell me i need top open the file in binary aren't you?!?

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Possibly, or maybe just stop storing the return value of [f]getc() in a char. If you do so, certain characters in a binary file can look like EOF. You've probably already figured that out if you've written an XOR encryption program.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  2. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  3. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  4. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM