![]() |
VOOZH | about |
Download source code, ready-to-use binaries of TestDisk & PhotoRec, consult the documentations. It's a wiki, you can create an account and improve the English documentation or the translations.
Evaluate your knowledge with multiple choice questions about data recovery, TestDisk & PhotoRec.
Create your local copy of the development tree using git clone https://git.cgsecurity.org/testdisk.git
Consult the source via a web interface https://git.cgsecurity.org/cgit/
Need help ? Ready to help others ? Consult the forum.
All the URL of the project are available in https thanks to Letsencrypt. testdisk project uses Let's Encrypt to get free X.509 certificates for Transport Layer Security (TLS) encryption via an automated process.
testdisk is available on github at https://github.com/cgsecurity/testdisk It's a mirror of the official git repository https://git.cgsecurity.org/testdisk.git
This commercial Certificat Autority provides code signing for a reasonable annual fee for open source project. This certificate is used to sign Windows binaries distributed on https://www.cgsecurity.org
Copr automatically builds testdisk for CentOS and Fedora Linux distributions.
testdisk is build automatically on Travis CI system (See configuration)
Transifex provides a localisation plateform to testdisk. Accessible to non-developers, it's used to translate QPhotoRec, the GUI version of PhotoRec, in multiples languages.
This static analyzer checks the source code for various defects and vulnerabilities.
Software Assurance Marketplace runs several static code analyzers on git repository daily.
To support patent non-aggression, testdisk is a member of OIN Community. testdisk projet has free access to OIN’s patents and royalty free access to Linux System patents of other OIN participants.
Core Infrastructure Initiative (CII) best practice badge in progress
Git is a modern source code manager, see Git article from Wikipedia for details. To learn to use git, read the man page giteveryday (man giteveryday).
https://git.cgsecurity.org/testdisk.git is a Git repository to track TestDisk & PhotoRec source code, you can browse it using https://git.cgsecurity.org/cgit/testdisk/ or via github https://github.com/cgsecurity/testdisk
Install git using
yum install git for Fedora, RedHat, Centossudo apt-get install git-core for Debian, UbuntuConfigure your local settings
$ git config --global user.name "Your Name" $ git config --global user.email "Your Email"
Clone the current source code
$ git clone https://git.cgsecurity.org/testdisk.git
If you have already cloned the project, to update your local copy, run git pull from the testdisk directory.
Compile TestDisk & PhotoRec
$ cd testdisk $ mkdir config $ autoreconf --install -W all -I config $ ./configure $ make
If autoreconf is missing, check that automake and autoconf are present, otherwise you can replace the autoreconf command by
$ aclocal -I config $ autoheader -W all $ autoconf -W all $ automake --gnits --add-missing --copy
Read TestDisk Compilation if you have problems to compile TestDisk & PhotoRec
It's time to make your own modifications and submit the patch (pull request are also ok)
$ (edit files) $ git add (files) $ git commit -a $ git format-patch origin/master $ ls *.patch
Two spaces per logic level
All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be _<FILE>_H_.
Place a function's variables in the narrowest scope possible
Use 0 for integers, 0.0 for reals, NULL for pointers, and '\0' for chars.
If you have been unable to install git, download a snapshot of TestDisk & PhotoRec latest source code. Get the beta version, the Work-In-Progress (WIP) one.
The first step is to check if PhotoRec already identify the file.
Run fidentify sample_file. If the file is identified with an incorrect extension, check if there is way to differentiate this file from files having the extension that has been found.
If fidentify reports the format as unknown, you have found a
candidate for inclusion.
If the file format specifications aren't available, compare several samples to identify constant fields. In example, PhotoRec identifies a JPEG file when a block begins with:
To add a new file format to PhotoRec,
extern const file_hint_t file_hint_<EXTENSION>;
{ .enable=0, .file_hint=&file_hint_<EXTENSION> },
file_<EXTENSION>.c
src/file_<EXTENSION>.c.In this example, file_check_EXTENSION() is used to check for a footer.
Check
QPhotoRec is now build by default since TestDisk & PhotoRec 7.0 if Qt development package is available :
./configure && make