summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/file_amd.c96
-rw-r--r--src/file_arj.c156
-rw-r--r--src/file_asm.c77
-rw-r--r--src/file_chm.c67
-rw-r--r--src/file_drw.c77
-rw-r--r--src/file_frm.c77
-rw-r--r--src/file_mfg.c77
-rw-r--r--src/file_prt.c77
-rw-r--r--src/file_stl.c75
-rw-r--r--src/file_tph.c78
-rw-r--r--src/file_wks.c90
-rw-r--r--src/photorec.c22
13 files changed, 970 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 7e455c8..8874ca9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,7 +19,7 @@ fs_H = analyse.h bfs.h bsd.h cramfs.h fat.h fatx.h ext2.h jfs_superblock.h jfs
testdisk_SOURCES = testdisk.c $(base_C) $(base_H) $(fs_C) $(fs_H) testdisk.h adv.c adv.h dir.c dir.h dirpart.c dirpart.h edit.c edit.h ext2_dir.c ext2_dir.h ext2_inc.h fat_adv.c fat_adv.h fat_dir.c fat_dir.h geometry.c godmode.c godmode.h intrface.c intrface.h ntfs_adv.c ntfs_dir.c ntfs_dir.h ntfs_fix.c ntfs_inc.h rfs_dir.c rfs_dir.h $(ICON_TESTDISK) next.c next.h dimage.c dimage.h
#ntfs_udl.c ntfs_udl.h
-photorec_SOURCES = photorec.c photorec.h phcfg.c phcfg.h phrecn.c phrecn.h dir.c dir.h ext2p.c ext2p.h ext2_dir.c ext2_dir.h ext2_inc.h fat_dir.c fat_dir.h fatp.c fatp.h filegen.c filegen.h file_7z.c file_a.c file_ab.c file_ace.c file_aif.c file_all.c file_amr.c file_asf.c file_au.c file_bkf.c file_bld.c file_bmp.c file_bz2.c file_cab.c file_cam.c file_cm.c file_crw.c file_ctg.c file_cwk.c file_dat.c file_dbf.c file_dim.c file_dir.c file_djv.c file_doc.c file_dpx.c file_ds2.c file_dsc.c file_dss.c file_dta.c file_dump.c file_dv.c file_dwg.c file_elf.c file_emf.c file_evt.c file_exe.c pe.h file_ext.c file_fcp.c file_fcs.c file_fh10.c file_fh5.c file_fits.c file_flac.c file_flv.c file_fs.c file_gho.c file_gif.c file_gpg.c file_gz.c file_ifo.c file_imb.c file_indd.c file_iso.c file_itu.c file_jpg.c file_jpg.h file_kdb.c file_lnk.c file_m2ts.c file_max.c file_mb.c file_mcd.c file_mdb.c file_mdf.c file_mid.c file_mkv.c file_mov.c file_mp3.c file_mpg.c file_mrw.c file_mus.c file_mysql.c file_njx.c file_ogg.c file_one.c file_orf.c file_paf.c file_pap.c file_pct.c file_pcx.c file_pdf.c file_pfx.c file_png.c file_prc.c file_ps.c file_psd.c file_pst.c file_ptb.c file_qbb.c file_qdf.c file_qxd.c file_ra.c file_raf.c file_rar.c file_raw.c file_rdc.c file_reg.c file_res.c file_riff.c file_rm.c file_rns.c file_rpm.c file_sit.c file_skp.c file_spe.c file_spss.c file_sql.c file_stu.c file_swf.c file_tar.c file_tar.h file_tib.c file_tiff.c file_txt.c file_vmdk.c file_wpd.c file_wmf.c file_x3f.c file_xcf.c file_xm.c file_xsv.c file_veg.c file_zip.c memmem.h geometry.c list.c list.h ole.h ntfs_dir.c ntfs_dir.h ntfsp.c ntfsp.h ntfs_inc.h sessionp.c sessionp.h $(base_C) $(base_H) $(fs_C) $(fs_H) $(ICON_PHOTOREC)
+photorec_SOURCES = photorec.c photorec.h phcfg.c phcfg.h phrecn.c phrecn.h dir.c dir.h ext2p.c ext2p.h ext2_dir.c ext2_dir.h ext2_inc.h fat_dir.c fat_dir.h fatp.c fatp.h filegen.c filegen.h file_7z.c file_a.c file_ab.c file_ace.c file_aif.c file_all.c file_amd.c file_amr.c file_arj.c file_asf.c file_asm.c file_au.c file_bkf.c file_bld.c file_bmp.c file_bz2.c file_cab.c file_cam.c file_chm.c file_cm.c file_crw.c file_ctg.c file_cwk.c file_dat.c file_dbf.c file_dim.c file_dir.c file_djv.c file_doc.c file_dpx.c file_drw.c file_ds2.c file_dsc.c file_dss.c file_dta.c file_dump.c file_dv.c file_dwg.c file_elf.c file_emf.c file_evt.c file_exe.c pe.h file_ext.c file_fcp.c file_fcs.c file_fh10.c file_fh5.c file_fits.c file_flac.c file_flv.c file_frm.c file_fs.c file_gho.c file_gif.c file_gpg.c file_gz.c file_ifo.c file_imb.c file_indd.c file_iso.c file_itu.c file_jpg.c file_jpg.h file_kdb.c file_lnk.c file_m2ts.c file_max.c file_mb.c file_mcd.c file_mdb.c file_mdf.c file_mfg.c file_mid.c file_mkv.c file_mov.c file_mp3.c file_mpg.c file_mrw.c file_mus.c file_mysql.c file_njx.c file_ogg.c file_one.c file_orf.c file_paf.c file_pap.c file_pct.c file_pcx.c file_pdf.c file_pfx.c file_png.c file_prc.c file_prt.c file_ps.c file_psd.c file_pst.c file_ptb.c file_qbb.c file_qdf.c file_qxd.c file_ra.c file_raf.c file_rar.c file_raw.c file_rdc.c file_reg.c file_res.c file_riff.c file_rm.c file_rns.c file_rpm.c file_sit.c file_skp.c file_spe.c file_spss.c file_sql.c file_stl.c file_stu.c file_swf.c file_tar.c file_tar.h file_tib.c file_tiff.c file_tph.c file_txt.c file_vmdk.c file_wpd.c file_wmf.c file_x3f.c file_xcf.c file_xm.c file_xsv.c file_veg.c file_wks.c file_zip.c memmem.h geometry.c list.c list.h ole.h ntfs_dir.c ntfs_dir.h ntfsp.c ntfsp.h ntfs_inc.h sessionp.c sessionp.h $(base_C) $(base_H) $(fs_C) $(fs_H) $(ICON_PHOTOREC)
#diskcp_SOURCES = diskcp.c types.h
diff --git a/src/file_amd.c b/src/file_amd.c
new file mode 100644
index 0000000..87b9e92
--- /dev/null
+++ b/src/file_amd.c
@@ -0,0 +1,96 @@
+/*
+
+ File: file_amd.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+#include "common.h"
+
+static void register_header_check_amd(file_stat_t *file_stat);
+static int header_check_amd(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static int header_check_amt(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
+const file_hint_t file_hint_amd= {
+ .extension="amd",
+ .description="AlphaCAM (amd/amt/atd/att)",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_amd
+};
+
+/* amd 1.36
+ * atd 1.19 */
+static const unsigned char amd_header[16]={
+ 'L', 'i', 'c', 'o', 'm', '-', 'A', 'P',
+ 'S', ' ', 'F', 'i', 'l', 'e', ' ', 'V' };
+
+/* amt 1.19
+ * att 1.08 */
+static const unsigned char amt_header[20]={
+ 'L', 'i', 'c', 'o', 'm', '-', 'A', 'P',
+ 'S', ' ', 'T', 'o', 'o', 'l', ' ', 'F',
+ 'i', 'l', 'e', ' '};
+
+static void register_header_check_amd(file_stat_t *file_stat)
+{
+ register_header_check(0, amd_header,sizeof(amd_header), &header_check_amd, file_stat);
+ register_header_check(0, amt_header,sizeof(amt_header), &header_check_amt, file_stat);
+}
+
+static int header_check_amd(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer, amd_header, sizeof(amd_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ /* FIXME: I don't think it's a valid way to distinguish between files */
+ if(buffer[16]=='1' && buffer[17]=='.' && buffer[18]=='1' && buffer[19]=='9')
+ file_recovery_new->extension="atd";
+ else
+ file_recovery_new->extension=file_hint_amd.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static int header_check_amt(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer, amt_header, sizeof(amt_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ /* FIXME: I don't think it's a valid way to distinguish between files */
+ if(buffer[21]=='1' && buffer[22]=='.' && buffer[23]=='0' && buffer[24]=='8')
+ file_recovery_new->extension="att";
+ else
+ file_recovery_new->extension="amt";
+ return 1;
+ }
+ return 0;
+}
+
diff --git a/src/file_arj.c b/src/file_arj.c
new file mode 100644
index 0000000..9a647ad
--- /dev/null
+++ b/src/file_arj.c
@@ -0,0 +1,156 @@
+/*
+
+ File: file_arj.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+#include "common.h"
+
+static void register_header_check_arj(file_stat_t *file_stat);
+static int header_check_arj(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_arj(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_arj= {
+ .extension="arj",
+ .description="ARJ archive",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_SIZE_32,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_arj
+};
+
+static const unsigned char arj_header[2]={0x60, 0xEA};
+/*
+ * 60 ea 24 00 22 0b 01 02 10 00 02 XX XX XX 50 48
+ * ID HS FH V V OS FL SV FT R DATE/TIME
+ *
+ * Extract from "ARJ TECHNICAL INFORMATION April 1993"
+ http://datacompression.info/ArchiveFormats/arj.txt
+ Structure of main header (low order byte first):
+
+ Bytes Description
+-------------------------------------------------------------------
+ 2 header id (main and local file) = 0x60 0xEA
+ 2 basic header size (from 'first_hdr_size' thru 'comment' below)
+ = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
+ = 0 if end of archive
+ maximum header size is 2600
+
+ 1 first_hdr_size (size up to and including 'extra data')
+ 1 archiver version number
+ 1 minimum archiver version to extract
+ 1 host OS (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MAC-OS)
+ (5 = OS/2, 6 = APPLE GS, 7 = ATARI ST, 8 = NEXT)
+ (9 = VAX VMS)
+ 1 arj flags
+ (0x01 = NOT USED)
+ (0x02 = OLD_SECURED_FLAG)
+ (0x04 = VOLUME_FLAG) indicates presence of succeeding
+ volume
+ (0x08 = NOT USED)
+ (0x10 = PATHSYM_FLAG) indicates archive name translated
+ ("\" changed to "/")
+ (0x20 = BACKUP_FLAG) indicates backup type archive
+ (0x40 = SECURED_FLAG)
+ 1 security version (2 = current)
+ 1 file type (must equal 2)
+ 1 reserved
+ 4 date time when original archive was created
+ 4 date time when archive was last modified
+ 4 archive size (currently used only for secured archives)
+ 4 security envelope file position
+ 2 filespec position in filename
+ 2 length in bytes of security envelope data
+ 2 (currently not used)
+ ? (currently none)
+
+ ? filename of archive when created (null-terminated string)
+ ? archive comment (null-terminated string)
+
+ 4 basic header CRC
+
+ 2 1st extended header size (0 if none)
+ ? 1st extended header (currently not used)
+ 4 1st extended header's CRC (not present when 0 extended header size)
+ */
+struct arj_main_header {
+ uint16_t header_id;
+ uint16_t basic_header_size;
+ uint8_t first_header_size;
+ uint8_t archiver_ver;
+ uint8_t archiver_ver_min;
+ uint8_t host_os;
+ uint8_t flags;
+ uint8_t security_ver;
+ uint8_t file_type;
+ uint8_t reserved;
+ uint32_t ctime;
+ uint32_t mtime;
+ uint32_t size;
+ uint32_t security_env_pos;
+ uint16_t filespec_pos;
+ uint16_t security_env_size;
+ uint16_t unused;
+ char filename;
+} __attribute__ ((__packed__));
+
+static void register_header_check_arj(file_stat_t *file_stat)
+{
+ register_header_check(0, arj_header,sizeof(arj_header), &header_check_arj, file_stat);
+}
+
+static int header_check_arj(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ const struct arj_main_header *arj=(const struct arj_main_header*)buffer;
+ if(memcmp(buffer, arj_header, sizeof(arj_header))==0 &&
+ le16(arj->basic_header_size) <= 2600 &&
+ arj->archiver_ver_min <= arj->archiver_ver &&
+ (arj->flags&0x01)==0 &&
+ arj->file_type==2)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_arj.extension;
+ if((arj->flags&0x040)!=0)
+ {
+ file_recovery_new->calculated_file_size=le32(arj->size);
+ file_recovery_new->data_check=&data_check_size;
+ file_recovery_new->file_check=&file_check_size;
+ }
+ else
+ file_recovery_new->file_check=&file_check_arj;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_arj(file_recovery_t *file_recovery)
+{
+ static const unsigned char arj_footer[4]={0x60, 0xEA, 0x00, 0x00 };
+ file_search_footer(file_recovery, arj_footer,sizeof(arj_footer));
+}
diff --git a/src/file_asm.c b/src/file_asm.c
new file mode 100644
index 0000000..9074a62
--- /dev/null
+++ b/src/file_asm.c
@@ -0,0 +1,77 @@
+/*
+
+ File: file_asm.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_asm(file_stat_t *file_stat);
+static int header_check_asm(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_asm(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_asm= {
+ .extension="asm",
+ .description="Pro/ENGINEER Assembly",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_asm
+};
+
+static const unsigned char asm_header[16]= {
+ '#', 'U', 'G', 'C', ':', '2', ' ', 'A',
+ 'S', 'S', 'E', 'M', 'B', 'L', 'Y', ' '};
+
+static void register_header_check_asm(file_stat_t *file_stat)
+{
+ register_header_check(0, asm_header,sizeof(asm_header), &header_check_asm, file_stat);
+}
+
+static int header_check_asm(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,asm_header,sizeof(asm_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->file_check=file_check_asm;
+ file_recovery_new->extension=file_hint_asm.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_asm(file_recovery_t *file_recovery)
+{
+ const unsigned char asm_footer[11]= {
+ '#', 'E', 'N', 'D', '_', 'O', 'F', '_',
+ 'U', 'G', 'C'};
+ file_search_footer(file_recovery, asm_footer,sizeof(asm_footer));
+ if(file_recovery->file_size>0)
+ file_recovery->file_size+=12; /* sizeof(asm_footer) + nl*/
+}
diff --git a/src/file_chm.c b/src/file_chm.c
new file mode 100644
index 0000000..4131ef3
--- /dev/null
+++ b/src/file_chm.c
@@ -0,0 +1,67 @@
+/*
+
+ File: file_chm.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+#include "log.h"
+
+static void register_header_check_chm(file_stat_t *file_stat);
+static int header_check_chm(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
+const file_hint_t file_hint_chm= {
+ .extension="chm",
+ .description="MS Windows HtmlHelp Data",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_chm
+};
+
+static const unsigned char chm_header[16]={ 'I', 'T', 'S', 'F', 0x03, 0x00, 0x00, 0x00,
+ 0x60, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00};
+
+static void register_header_check_chm(file_stat_t *file_stat)
+{
+ register_header_check(0, chm_header,sizeof(chm_header), &header_check_chm, file_stat);
+}
+
+static int header_check_chm(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer, chm_header, sizeof(chm_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->calculated_file_size=(buffer[104]<<0)+(buffer[105]<<8)+(buffer[106]<<16)+(buffer[107]<<24);
+ file_recovery_new->data_check=&data_check_size;
+ file_recovery_new->file_check=&file_check_size;
+ file_recovery_new->extension=file_hint_chm.extension;
+ return 1;
+ }
+ return 0;
+}
diff --git a/src/file_drw.c b/src/file_drw.c
new file mode 100644
index 0000000..40d5e8a
--- /dev/null
+++ b/src/file_drw.c
@@ -0,0 +1,77 @@
+/*
+
+ File: file_drw.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_drw(file_stat_t *file_stat);
+static int header_check_drw(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_drw(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_drw= {
+ .extension="drw",
+ .description="Pro/ENGINEER Drawing",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_drw
+};
+
+static const unsigned char drw_header[14]= {
+ '#', 'U', 'G', 'C', ':', '2', ' ', 'D',
+ 'R', 'A', 'W', 'I', 'N', 'G'};
+
+static void register_header_check_drw(file_stat_t *file_stat)
+{
+ register_header_check(0, drw_header,sizeof(drw_header), &header_check_drw, file_stat);
+}
+
+static int header_check_drw(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,drw_header,sizeof(drw_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->file_check=file_check_drw;
+ file_recovery_new->extension=file_hint_drw.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_drw(file_recovery_t *file_recovery)
+{
+ const unsigned char drw_footer[11]= {
+ '#', 'E', 'N', 'D', '_', 'O', 'F', '_',
+ 'U', 'G', 'C'};
+ file_search_footer(file_recovery, drw_footer,sizeof(drw_footer));
+ if(file_recovery->file_size>0)
+ file_recovery->file_size+=12; /* sizeof(drw_footer) + nl*/
+}
diff --git a/src/file_frm.c b/src/file_frm.c
new file mode 100644
index 0000000..cdb42fc
--- /dev/null
+++ b/src/file_frm.c
@@ -0,0 +1,77 @@
+/*
+
+ File: file_frm.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_frm(file_stat_t *file_stat);
+static int header_check_frm(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_frm(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_frm= {
+ .extension="frm",
+ .description="Pro/ENGINEER Drawing Form",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_frm
+};
+
+static const unsigned char frm_header[14]= {
+ '#', 'U', 'G', 'C', ':', '2', ' ', 'D',
+ 'W', 'G', 'F', 'O', 'R', 'M'};
+
+static void register_header_check_frm(file_stat_t *file_stat)
+{
+ register_header_check(0, frm_header,sizeof(frm_header), &header_check_frm, file_stat);
+}
+
+static int header_check_frm(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,frm_header,sizeof(frm_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->file_check=file_check_frm;
+ file_recovery_new->extension=file_hint_frm.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_frm(file_recovery_t *file_recovery)
+{
+ const unsigned char frm_footer[11]= {
+ '#', 'E', 'N', 'D', '_', 'O', 'F', '_',
+ 'U', 'G', 'C'};
+ file_search_footer(file_recovery, frm_footer,sizeof(frm_footer));
+ if(file_recovery->file_size>0)
+ file_recovery->file_size+=12; /* sizeof(frm_footer) + nl*/
+}
diff --git a/src/file_mfg.c b/src/file_mfg.c
new file mode 100644
index 0000000..83edb66
--- /dev/null
+++ b/src/file_mfg.c
@@ -0,0 +1,77 @@
+/*
+
+ File: file_mfg.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_mfg(file_stat_t *file_stat);
+static int header_check_mfg(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_mfg(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_mfg= {
+ .extension="mfg",
+ .description="Pro/ENGINEER Manufacturing",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_mfg
+};
+
+static const unsigned char mfg_header[16]= {
+ '#', 'U', 'G', 'C', ':', '2', ' ', 'M',
+ 'F', 'G', '_', 'A', 'S', 'S', 'E', 'M'};
+
+static void register_header_check_mfg(file_stat_t *file_stat)
+{
+ register_header_check(0, mfg_header,sizeof(mfg_header), &header_check_mfg, file_stat);
+}
+
+static int header_check_mfg(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,mfg_header,sizeof(mfg_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->file_check=file_check_mfg;
+ file_recovery_new->extension=file_hint_mfg.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_mfg(file_recovery_t *file_recovery)
+{
+ const unsigned char mfg_footer[11]= {
+ '#', 'E', 'N', 'D', '_', 'O', 'F', '_',
+ 'U', 'G', 'C'};
+ file_search_footer(file_recovery, mfg_footer,sizeof(mfg_footer));
+ if(file_recovery->file_size>0)
+ file_recovery->file_size+=12; /* sizeof(mfg_footer) + nl*/
+}
diff --git a/src/file_prt.c b/src/file_prt.c
new file mode 100644
index 0000000..8a9cc33
--- /dev/null
+++ b/src/file_prt.c
@@ -0,0 +1,77 @@
+/*
+
+ File: file_prt.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_prt(file_stat_t *file_stat);
+static int header_check_prt(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_prt(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_prt= {
+ .extension="prt",
+ .description="Pro/ENGINEER Model",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_prt
+};
+
+static const unsigned char prt_header[12]= {
+ '#', 'U', 'G', 'C', ':', '2', ' ', 'P',
+ 'A', 'R', 'T', ' '};
+
+static void register_header_check_prt(file_stat_t *file_stat)
+{
+ register_header_check(0, prt_header,sizeof(prt_header), &header_check_prt, file_stat);
+}
+
+static int header_check_prt(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,prt_header,sizeof(prt_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->file_check=file_check_prt;
+ file_recovery_new->extension=file_hint_prt.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_prt(file_recovery_t *file_recovery)
+{
+ const unsigned char prt_footer[11]= {
+ '#', 'E', 'N', 'D', '_', 'O', 'F', '_',
+ 'U', 'G', 'C'};
+ file_search_footer(file_recovery, prt_footer,sizeof(prt_footer));
+ if(file_recovery->file_size>0)
+ file_recovery->file_size+=12; /* sizeof(prt_footer) + nl*/
+}
diff --git a/src/file_stl.c b/src/file_stl.c
new file mode 100644
index 0000000..6fa2fed
--- /dev/null
+++ b/src/file_stl.c
@@ -0,0 +1,75 @@
+/*
+
+ File: file_stl.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+#include "common.h"
+
+static void register_header_check_stl(file_stat_t *file_stat);
+static int header_check_stl(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static int header_check_amt(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
+const file_hint_t file_hint_stl= {
+ .extension="stl",
+ .description="Stereolithography CAD (Binary format)",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_stl
+};
+
+static const unsigned char stl_header[6]={ 's', 'o', 'l', 'i', 'd', ' '};
+static const unsigned char spaces[16]={
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
+
+static void register_header_check_stl(file_stat_t *file_stat)
+{
+ register_header_check(0, stl_header,sizeof(stl_header), &header_check_stl, file_stat);
+}
+
+static int header_check_stl(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer, stl_header, sizeof(stl_header))==0 &&
+ memcmp(buffer+0x40, spaces, sizeof(spaces))==0)
+ {
+ /* STL Binary format
+ * http://www.ennex.com/~fabbers/StL.asp */
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_stl.extension;
+ file_recovery_new->calculated_file_size=80+4+50*
+ (uint64_t)(buffer[80]+(buffer[81]<<8)+(buffer[82]<<16)+(buffer[93]<<24));
+ file_recovery_new->data_check=&data_check_size;
+ file_recovery_new->file_check=&file_check_size;
+ return 1;
+ }
+ /* STL Ascii format is recovered in file_txt.c */
+ return 0;
+}
diff --git a/src/file_tph.c b/src/file_tph.c
new file mode 100644
index 0000000..2d2b15a
--- /dev/null
+++ b/src/file_tph.c
@@ -0,0 +1,78 @@
+/*
+
+ File: file_tph.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_tph(file_stat_t *file_stat);
+static int header_check_tph(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static void file_check_tph(file_recovery_t *file_recovery);
+
+const file_hint_t file_hint_tph= {
+ .extension="tph",
+ .description="Pro/ENGINEER ToolPath",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_tph
+};
+
+static const unsigned char tph_header[20]= {
+ '#', 'U', 'G', 'C', ':', '2', ' ', 'M',
+ 'F', 'G', '_', 'T', 'O', 'O', 'L', '_',
+ 'P', 'A', 'T', 'H'};
+
+static void register_header_check_tph(file_stat_t *file_stat)
+{
+ register_header_check(0, tph_header,sizeof(tph_header), &header_check_tph, file_stat);
+}
+
+static int header_check_tph(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,tph_header,sizeof(tph_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->file_check=file_check_tph;
+ file_recovery_new->extension=file_hint_tph.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static void file_check_tph(file_recovery_t *file_recovery)
+{
+ const unsigned char tph_footer[11]= {
+ '#', 'E', 'N', 'D', '_', 'O', 'F', '_',
+ 'U', 'G', 'C'};
+ file_search_footer(file_recovery, tph_footer,sizeof(tph_footer));
+ if(file_recovery->file_size>0)
+ file_recovery->file_size+=12; /* sizeof(tph_footer) + nl*/
+}
diff --git a/src/file_wks.c b/src/file_wks.c
new file mode 100644
index 0000000..65c489c
--- /dev/null
+++ b/src/file_wks.c
@@ -0,0 +1,90 @@
+/*
+
+ File: file_wks.c
+
+ Copyright (C) 2008 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the teras of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+
+static void register_header_check_wks(file_stat_t *file_stat);
+static int header_check_wks(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+static int header_check_wk4(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
+const file_hint_t file_hint_wks= {
+ .extension="wks",
+ .description="Lotus 1-2-3",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_wks
+};
+
+static const unsigned char wks_header[10] = { 0x00, 0x00, 0x02, 0x00, 0x04, 0x04,
+ 0x06, 0x00, 0x08, 0x00};
+/*
+ * record type=0 BOF=Beginning of file
+ * record length=2
+ * 0x0404 = 1-2-3
+ * 0x0405 = Symphony
+ *
+ * record type=6 RANGE=Active worksheet range
+ * See
+ * http://www.schnarff.com/file-formats/lotus-1-2-3/WSFF1.TXT
+ * http://www.schnarff.com/file-formats/lotus-1-2-3/WSFF2.TXT
+ */
+static const unsigned char wk4_header[8] = { 0x00, 0x00, 0x1a, 0x00, 0x02, 0x10, 0x04, 0x00};
+
+static void register_header_check_wks(file_stat_t *file_stat)
+{
+ register_header_check(0, wks_header,sizeof(wks_header), &header_check_wks, file_stat);
+ register_header_check(0, wk4_header,sizeof(wk4_header), &header_check_wk4, file_stat);
+}
+
+static int header_check_wks(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,wks_header,sizeof(wks_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_wks.extension;
+ return 1;
+ }
+ return 0;
+}
+
+static int header_check_wk4(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ if(memcmp(buffer,wk4_header,sizeof(wk4_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension="wk4";
+ return 1;
+ }
+ return 0;
+}
+
diff --git a/src/photorec.c b/src/photorec.c
index 230b71d..a4003cd 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -104,8 +104,11 @@ extern const file_hint_t file_hint_ace;
extern const file_hint_t file_hint_addressbook;
extern const file_hint_t file_hint_aif;
extern const file_hint_t file_hint_all;
+extern const file_hint_t file_hint_amd;
extern const file_hint_t file_hint_amr;
+extern const file_hint_t file_hint_arj;
extern const file_hint_t file_hint_asf;
+extern const file_hint_t file_hint_asm;
extern const file_hint_t file_hint_au;
extern const file_hint_t file_hint_bkf;
extern const file_hint_t file_hint_blend;
@@ -113,6 +116,7 @@ extern const file_hint_t file_hint_bmp;
extern const file_hint_t file_hint_bz2;
extern const file_hint_t file_hint_cab;
extern const file_hint_t file_hint_cam;
+extern const file_hint_t file_hint_chm;
extern const file_hint_t file_hint_cm;
extern const file_hint_t file_hint_crw;
extern const file_hint_t file_hint_ctg;
@@ -124,6 +128,7 @@ extern const file_hint_t file_hint_dir;
extern const file_hint_t file_hint_djv;
extern const file_hint_t file_hint_doc;
extern const file_hint_t file_hint_dpx;
+extern const file_hint_t file_hint_drw;
extern const file_hint_t file_hint_ds2;
extern const file_hint_t file_hint_dsc;
extern const file_hint_t file_hint_dss;
@@ -143,6 +148,7 @@ extern const file_hint_t file_hint_fh5;
extern const file_hint_t file_hint_fits;
extern const file_hint_t file_hint_flac;
extern const file_hint_t file_hint_flv;
+extern const file_hint_t file_hint_frm;
extern const file_hint_t file_hint_fs;
extern const file_hint_t file_hint_gif;
extern const file_hint_t file_hint_gho;
@@ -162,6 +168,7 @@ extern const file_hint_t file_hint_mb;
extern const file_hint_t file_hint_mcd;
extern const file_hint_t file_hint_mdb;
extern const file_hint_t file_hint_mdf;
+extern const file_hint_t file_hint_mfg;
extern const file_hint_t file_hint_mid;
extern const file_hint_t file_hint_mkv;
extern const file_hint_t file_hint_mov;
@@ -182,6 +189,7 @@ extern const file_hint_t file_hint_pdf;
extern const file_hint_t file_hint_pfx;
extern const file_hint_t file_hint_png;
extern const file_hint_t file_hint_prc;
+extern const file_hint_t file_hint_prt;
extern const file_hint_t file_hint_ps;
extern const file_hint_t file_hint_psd;
extern const file_hint_t file_hint_pst;
@@ -205,11 +213,13 @@ extern const file_hint_t file_hint_skp;
extern const file_hint_t file_hint_spe;
extern const file_hint_t file_hint_spss;
extern const file_hint_t file_hint_sqlite;
+extern const file_hint_t file_hint_stl;
extern const file_hint_t file_hint_stuffit;
extern const file_hint_t file_hint_swf;
extern const file_hint_t file_hint_tar;
extern const file_hint_t file_hint_tib;
extern const file_hint_t file_hint_tiff;
+extern const file_hint_t file_hint_tph;
extern const file_hint_t file_hint_fasttxt;
extern const file_hint_t file_hint_txt;
extern const file_hint_t file_hint_vmdk;
@@ -220,6 +230,7 @@ extern const file_hint_t file_hint_xcf;
extern const file_hint_t file_hint_xm;
extern const file_hint_t file_hint_xsv;
extern const file_hint_t file_hint_veg;
+extern const file_hint_t file_hint_wks;
extern const file_hint_t file_hint_zip;
static alloc_data_t *update_search_space(const file_recovery_t *file_recovery, alloc_data_t *list_search_space, alloc_data_t **new_current_search_space, uint64_t *offset, const unsigned int blocksize);
@@ -797,8 +808,11 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_addressbook},
{ .enable=0, .file_hint=&file_hint_aif },
{ .enable=0, .file_hint=&file_hint_all },
+ { .enable=0, .file_hint=&file_hint_amd },
{ .enable=0, .file_hint=&file_hint_amr },
+ { .enable=0, .file_hint=&file_hint_arj },
{ .enable=0, .file_hint=&file_hint_asf },
+ { .enable=0, .file_hint=&file_hint_asm },
{ .enable=0, .file_hint=&file_hint_au },
{ .enable=0, .file_hint=&file_hint_bkf },
{ .enable=0, .file_hint=&file_hint_blend },
@@ -806,6 +820,7 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_bz2 },
{ .enable=0, .file_hint=&file_hint_cab },
{ .enable=0, .file_hint=&file_hint_cam },
+ { .enable=0, .file_hint=&file_hint_chm },
{ .enable=0, .file_hint=&file_hint_cm },
{ .enable=0, .file_hint=&file_hint_crw },
{ .enable=0, .file_hint=&file_hint_ctg },
@@ -815,6 +830,7 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_dim },
{ .enable=0, .file_hint=&file_hint_dir },
{ .enable=0, .file_hint=&file_hint_djv },
+ { .enable=0, .file_hint=&file_hint_drw },
{ .enable=0, .file_hint=&file_hint_doc },
{ .enable=0, .file_hint=&file_hint_dpx },
{ .enable=0, .file_hint=&file_hint_ds2 },
@@ -836,6 +852,7 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_fits },
{ .enable=0, .file_hint=&file_hint_flac },
{ .enable=0, .file_hint=&file_hint_flv },
+ { .enable=0, .file_hint=&file_hint_frm },
{ .enable=0, .file_hint=&file_hint_fs },
{ .enable=0, .file_hint=&file_hint_gho },
{ .enable=0, .file_hint=&file_hint_gif },
@@ -855,6 +872,7 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_mcd },
{ .enable=0, .file_hint=&file_hint_mdb },
{ .enable=0, .file_hint=&file_hint_mdf },
+ { .enable=0, .file_hint=&file_hint_mfg },
{ .enable=0, .file_hint=&file_hint_mid },
{ .enable=0, .file_hint=&file_hint_mkv },
{ .enable=0, .file_hint=&file_hint_mov },
@@ -875,6 +893,7 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_pfx },
{ .enable=0, .file_hint=&file_hint_png },
{ .enable=0, .file_hint=&file_hint_prc },
+ { .enable=0, .file_hint=&file_hint_prt },
{ .enable=0, .file_hint=&file_hint_ps },
{ .enable=0, .file_hint=&file_hint_psd },
{ .enable=0, .file_hint=&file_hint_pst },
@@ -898,11 +917,13 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_spe },
{ .enable=0, .file_hint=&file_hint_spss },
{ .enable=0, .file_hint=&file_hint_sqlite },
+ { .enable=0, .file_hint=&file_hint_stl },
{ .enable=0, .file_hint=&file_hint_stuffit },
{ .enable=0, .file_hint=&file_hint_swf },
{ .enable=0, .file_hint=&file_hint_tar },
{ .enable=0, .file_hint=&file_hint_tib },
{ .enable=0, .file_hint=&file_hint_tiff },
+ { .enable=0, .file_hint=&file_hint_tph },
{ .enable=0, .file_hint=&file_hint_fasttxt },
{ .enable=0, .file_hint=&file_hint_txt },
{ .enable=0, .file_hint=&file_hint_vmdk },
@@ -913,6 +934,7 @@ int main( int argc, char **argv )
{ .enable=0, .file_hint=&file_hint_xm },
{ .enable=0, .file_hint=&file_hint_xsv },
{ .enable=0, .file_hint=&file_hint_veg },
+ { .enable=0, .file_hint=&file_hint_wks },
{ .enable=0, .file_hint=&file_hint_zip },
{ .enable=0, .file_hint=NULL }
};