Page 1 of 1

Deleted file recovery program using C C++

Posted: 16 Jul 2019, 06:30
by lisaly90
I want to write a program that can recover deleted files from hard drive ( FAT32/NTFS partition Windows).

I don't know where to start from. What should be the starting point of this? What should i read to pursue this?

Help is required.

Which system level structs should i study?

Re: Deleted file recovery program using C C++

Posted: 17 Jul 2019, 06:02
by cgrenier
PhotoRec is using file header to identify the beginning of files and recover them.
TestDisk knows about the filesystems internal to recover files from exFAT, FAT32, NTFS... to recover them with their original filenames.
You can learn about the two method by reading the source code.
As TestDisk and PhotoRec are under GNU GPL 2 or later license, if you "borrow" source code from one of the programs, your program need to be under the same license.

Re: Deleted file recovery program using C C++

Posted: 17 Jul 2019, 06:29
by recuperation
Start with FAT(32) because it is the easiest one.

Search for:

Microsoft Extensible Firmware Initiative FAT32 File System Specification
FAT: General Overview of On-Disk Format

Version 1.03, December 6, 2000
Microsoft Corporation

My personal favorite is an old article in German language from the German computer magazine labeled "c't".
You an buy the article here:
https://shop.heise.de/katalog/datenpuzzle-1

It covers the old MBR-style partitioning scheme as well.
There is another article that applies to ext2-structures in this issue of the magazine - has to be purchased separately.