summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2007-12-23 14:54:58 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2007-12-23 14:54:58 +0100
commitbda51eefe0ca607de7703da6dc9e9413cf71ab25 (patch)
tree4633ec468707c407ebf6d30c1708ba97809e7fcb /src
parent745062401f92300b9c54cb3fa4ef91e608d1cf04 (diff)
Remove header_check from struct file_hint_struct
Add Microsoft Visual Studio Resource file .res support
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/file_7z.c1
-rw-r--r--src/file_a.c1
-rw-r--r--src/file_ab.c1
-rw-r--r--src/file_ace.c1
-rw-r--r--src/file_aif.c1
-rw-r--r--src/file_all.c1
-rw-r--r--src/file_asf.c1
-rw-r--r--src/file_au.c1
-rw-r--r--src/file_bkf.c1
-rw-r--r--src/file_bld.c1
-rw-r--r--src/file_bmp.c1
-rw-r--r--src/file_bz2.c1
-rw-r--r--src/file_cab.c1
-rw-r--r--src/file_cam.c1
-rw-r--r--src/file_cm.c1
-rw-r--r--src/file_crw.c1
-rw-r--r--src/file_ctg.c1
-rw-r--r--src/file_cwk.c1
-rw-r--r--src/file_dat.c1
-rw-r--r--src/file_dbf.c1
-rw-r--r--src/file_dir.c1
-rw-r--r--src/file_djv.c1
-rw-r--r--src/file_doc.c1
-rw-r--r--src/file_dpx.c1
-rw-r--r--src/file_dsc.c1
-rw-r--r--src/file_dta.c1
-rw-r--r--src/file_dump.c1
-rw-r--r--src/file_dv.c1
-rw-r--r--src/file_dwg.c1
-rw-r--r--src/file_elf.c1
-rw-r--r--src/file_evt.c1
-rw-r--r--src/file_exe.c1
-rw-r--r--src/file_ext.c1
-rw-r--r--src/file_fh10.c1
-rw-r--r--src/file_fh5.c1
-rw-r--r--src/file_flac.c1
-rw-r--r--src/file_flv.c1
-rw-r--r--src/file_fs.c1
-rw-r--r--src/file_gif.c1
-rw-r--r--src/file_gz.c1
-rw-r--r--src/file_imb.c1
-rw-r--r--src/file_indd.c1
-rw-r--r--src/file_itu.c1
-rw-r--r--src/file_jpg.c1
-rw-r--r--src/file_kdb.c1
-rw-r--r--src/file_max.c1
-rw-r--r--src/file_mb.c1
-rw-r--r--src/file_mdb.c2
-rw-r--r--src/file_mdf.c1
-rw-r--r--src/file_mid.c1
-rw-r--r--src/file_mkv.c1
-rw-r--r--src/file_mov.c1
-rw-r--r--src/file_mp3.c1
-rw-r--r--src/file_mpg.c1
-rw-r--r--src/file_mrw.c1
-rw-r--r--src/file_mus.c1
-rw-r--r--src/file_mysql.c1
-rw-r--r--src/file_njx.c1
-rw-r--r--src/file_ogg.c1
-rw-r--r--src/file_one.c1
-rw-r--r--src/file_orf.c1
-rw-r--r--src/file_pap.c1
-rw-r--r--src/file_pcx.c1
-rw-r--r--src/file_pdf.c1
-rw-r--r--src/file_png.c1
-rw-r--r--src/file_prc.c1
-rw-r--r--src/file_ps.c1
-rw-r--r--src/file_psd.c1
-rw-r--r--src/file_pst.c1
-rw-r--r--src/file_ptb.c1
-rw-r--r--src/file_qbb.c1
-rw-r--r--src/file_qdf.c1
-rw-r--r--src/file_qxd.c1
-rw-r--r--src/file_ra.c1
-rw-r--r--src/file_raf.c1
-rw-r--r--src/file_rar.c1
-rw-r--r--src/file_raw.c1
-rw-r--r--src/file_rdc.c1
-rw-r--r--src/file_reg.c1
-rw-r--r--src/file_res.c61
-rw-r--r--src/file_riff.c1
-rw-r--r--src/file_rm.c1
-rw-r--r--src/file_rns.c1
-rw-r--r--src/file_rpm.c1
-rw-r--r--src/file_sit.c1
-rw-r--r--src/file_skp.c1
-rw-r--r--src/file_spe.c1
-rw-r--r--src/file_spss.c1
-rw-r--r--src/file_stu.c1
-rw-r--r--src/file_swf.c1
-rw-r--r--src/file_tar.c1
-rw-r--r--src/file_tib.c1
-rw-r--r--src/file_tiff.c1
-rw-r--r--src/file_txt.c8
-rw-r--r--src/file_vmdk.c1
-rw-r--r--src/file_wmf.c1
-rw-r--r--src/file_wpd.c1
-rw-r--r--src/file_x3f.c1
-rw-r--r--src/file_xcf.c1
-rw-r--r--src/file_xm.c1
-rw-r--r--src/file_zip.c1
-rw-r--r--src/filegen.h2
-rw-r--r--src/photorec.c2
104 files changed, 67 insertions, 108 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d2b247c..46d2f72 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_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
#ntfs_udl.c ntfs_udl.h
-photorec_SOURCES = photorec.c photorec.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_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_dir.c file_djv.c file_doc.c file_dpx.c file_dsc.c file_dta.c file_dv.c file_dwg.c file_elf.c file_evt.c file_exe.c pe.h file_ext.c file_fh10.c file_fh5.c file_flac.c file_flv.c file_fs.c file_gif.c file_gz.c file_imb.c file_indd.c file_dump.c file_itu.c file_jpg.c file_jpg.h file_kdb.c file_max.c file_mb.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_pap.c file_pcx.c file_pdf.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_riff.c file_rm.c file_rns.c file_rpm.c file_sit.c file_skp.c file_spe.c file_spss.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_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 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_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_dir.c file_djv.c file_doc.c file_dpx.c file_dsc.c file_dta.c file_dv.c file_dwg.c file_elf.c file_evt.c file_exe.c pe.h file_ext.c file_fh10.c file_fh5.c file_flac.c file_flv.c file_fs.c file_gif.c file_gz.c file_imb.c file_indd.c file_dump.c file_itu.c file_jpg.c file_jpg.h file_kdb.c file_max.c file_mb.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_pap.c file_pcx.c file_pdf.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_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_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_7z.c b/src/file_7z.c
index 02c0aef..0f07732 100644
--- a/src/file_7z.c
+++ b/src/file_7z.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_7z= {
.min_header_distance=0,
.max_filesize=1024*1024,
.recover=1,
- .header_check=&header_check_7z,
.register_header_check=&register_header_check_7z
};
diff --git a/src/file_a.c b/src/file_a.c
index cb85847..8d4777d 100644
--- a/src/file_a.c
+++ b/src/file_a.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_a= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_a,
.register_header_check=&register_header_check_a
};
diff --git a/src/file_ab.c b/src/file_ab.c
index 1788f50..dac5a4a 100644
--- a/src/file_ab.c
+++ b/src/file_ab.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_addressbook= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_addressbook,
.register_header_check=&register_header_check_ab
};
diff --git a/src/file_ace.c b/src/file_ace.c
index f62ce9d..89f959f 100644
--- a/src/file_ace.c
+++ b/src/file_ace.c
@@ -44,7 +44,6 @@ const file_hint_t file_hint_ace= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_ace,
.register_header_check=&register_header_check_ace
};
diff --git a/src/file_aif.c b/src/file_aif.c
index 9127ea3..41bb93d 100644
--- a/src/file_aif.c
+++ b/src/file_aif.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_aif= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_aif,
.register_header_check=&register_header_check_aif
};
diff --git a/src/file_all.c b/src/file_all.c
index 271fcf5..998e81d 100644
--- a/src/file_all.c
+++ b/src/file_all.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_all= {
.min_header_distance=0,
.max_filesize=50*1024*1024,
.recover=1,
- .header_check=&header_check_all,
.register_header_check=&register_header_check_all
};
diff --git a/src/file_asf.c b/src/file_asf.c
index f826d11..247b86b 100644
--- a/src/file_asf.c
+++ b/src/file_asf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_asf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_asf,
.register_header_check=&register_header_check_asf
};
diff --git a/src/file_au.c b/src/file_au.c
index 0c647f1..bdc75e3 100644
--- a/src/file_au.c
+++ b/src/file_au.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_au= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_au,
.register_header_check=&register_header_check_au
};
diff --git a/src/file_bkf.c b/src/file_bkf.c
index ec90e18..0324c67 100644
--- a/src/file_bkf.c
+++ b/src/file_bkf.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_bkf= {
.min_header_distance=0,
.max_filesize=-1,
.recover=1,
- .header_check=&header_check_bkf,
.register_header_check=&register_header_check_bkf
};
diff --git a/src/file_bld.c b/src/file_bld.c
index 1b7253f..0d24912 100644
--- a/src/file_bld.c
+++ b/src/file_bld.c
@@ -44,7 +44,6 @@ const file_hint_t file_hint_blend= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_blend,
.register_header_check=&register_header_check_blend
};
diff --git a/src/file_bmp.c b/src/file_bmp.c
index 620ea8c..c6d5676 100644
--- a/src/file_bmp.c
+++ b/src/file_bmp.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_bmp= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_bmp,
.register_header_check=&register_header_check_bmp
};
diff --git a/src/file_bz2.c b/src/file_bz2.c
index 7525bd1..19ef33f 100644
--- a/src/file_bz2.c
+++ b/src/file_bz2.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_bz2= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_bz2,
.register_header_check=&register_header_check_bz2
};
diff --git a/src/file_cab.c b/src/file_cab.c
index fee419d..5b4d9d4 100644
--- a/src/file_cab.c
+++ b/src/file_cab.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_cab= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_cab,
.register_header_check=&register_header_check_cab
};
diff --git a/src/file_cam.c b/src/file_cam.c
index 0953c5d..617dc3d 100644
--- a/src/file_cam.c
+++ b/src/file_cam.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_cam= {
.min_header_distance=0,
.max_filesize=10*1024*1024,
.recover=1,
- .header_check=&header_check_cam,
.register_header_check=&register_header_check_cam
};
diff --git a/src/file_cm.c b/src/file_cm.c
index 5f24cb3..ee73fcd 100644
--- a/src/file_cm.c
+++ b/src/file_cm.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_cm= {
.min_header_distance=0x0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_cm,
.register_header_check=&register_header_check_cm
};
diff --git a/src/file_crw.c b/src/file_crw.c
index 6de8f9a..25f0c74 100644
--- a/src/file_crw.c
+++ b/src/file_crw.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_crw= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_crw,
.register_header_check=&register_header_check_crw
};
diff --git a/src/file_ctg.c b/src/file_ctg.c
index 8dc8489..3d1133a 100644
--- a/src/file_ctg.c
+++ b/src/file_ctg.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_ctg= {
.min_header_distance=0,
.max_filesize=4634,
.recover=0,
- .header_check=&header_check_ctg,
.register_header_check=&register_header_check_ctg
};
diff --git a/src/file_cwk.c b/src/file_cwk.c
index 43691e9..99f1bfb 100644
--- a/src/file_cwk.c
+++ b/src/file_cwk.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_cwk= {
.min_header_distance=0,
.max_filesize=200*1024*1024,
.recover=1,
- .header_check=&header_check_cwk,
.register_header_check=&register_header_check_cwk
};
diff --git a/src/file_dat.c b/src/file_dat.c
index 6654186..2aee0af 100644
--- a/src/file_dat.c
+++ b/src/file_dat.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_dat= {
.min_header_distance=0,
.max_filesize=2*1024*1024,
.recover=1,
- .header_check=&header_check_dat,
.register_header_check=&register_header_check_dat
};
diff --git a/src/file_dbf.c b/src/file_dbf.c
index 25eaa77..ee6f0a6 100644
--- a/src/file_dbf.c
+++ b/src/file_dbf.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_dbf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_dbf,
.register_header_check=&register_header_check_dbf
};
diff --git a/src/file_dir.c b/src/file_dir.c
index 2c56440..e58fada 100644
--- a/src/file_dir.c
+++ b/src/file_dir.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_dir= {
.min_header_distance=0,
.max_filesize=1,
.recover=0,
- .header_check=&header_check_dir,
.register_header_check=&register_header_check_dir
};
diff --git a/src/file_djv.c b/src/file_djv.c
index f1a650c..28cccff 100644
--- a/src/file_djv.c
+++ b/src/file_djv.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_djv= {
.min_header_distance=0,
.max_filesize=200*1024*1024,
.recover=1,
- .header_check=&header_check_djv,
.register_header_check=&register_header_check_djv
};
diff --git a/src/file_doc.c b/src/file_doc.c
index 4324a63..6577d54 100644
--- a/src/file_doc.c
+++ b/src/file_doc.c
@@ -48,7 +48,6 @@ const file_hint_t file_hint_doc= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_doc,
.register_header_check=&register_header_check_doc
};
diff --git a/src/file_dpx.c b/src/file_dpx.c
index 9a1e12b..92ac6c5 100644
--- a/src/file_dpx.c
+++ b/src/file_dpx.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_dpx= {
.min_header_distance=0,
.max_filesize=10*1024*1024,
.recover=1,
- .header_check=&header_check_dpx,
.register_header_check=&register_header_check_dpx
};
diff --git a/src/file_dsc.c b/src/file_dsc.c
index d7c9634..24a1e24 100644
--- a/src/file_dsc.c
+++ b/src/file_dsc.c
@@ -38,7 +38,6 @@ const file_hint_t file_hint_dsc= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=0,
- .header_check=&header_check_dsc,
.register_header_check=&register_header_check_dsc
};
diff --git a/src/file_dta.c b/src/file_dta.c
index c3b18e7..4e8d77f 100644
--- a/src/file_dta.c
+++ b/src/file_dta.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_dta= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_dta,
.register_header_check=&register_header_check_dta
};
diff --git a/src/file_dump.c b/src/file_dump.c
index 66b607d..248ef67 100644
--- a/src/file_dump.c
+++ b/src/file_dump.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_dump= {
.min_header_distance=0,
.max_filesize=(((uint64_t)1<<33)-1),
.recover=1,
- .header_check=&header_check_dump,
.register_header_check=&register_header_check_dump
};
diff --git a/src/file_dv.c b/src/file_dv.c
index d69e4b3..f8f9d53 100644
--- a/src/file_dv.c
+++ b/src/file_dv.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_dv= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_dv,
.register_header_check=&register_header_check_dv
};
static const unsigned char dv_header[3]= {0x1f, 0x07, 0x00};
diff --git a/src/file_dwg.c b/src/file_dwg.c
index e4769ac..7ba9629 100644
--- a/src/file_dwg.c
+++ b/src/file_dwg.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_dwg= {
.min_header_distance=0,
.max_filesize=10*1024*1024,
.recover=1,
- .header_check=&header_check_dwg,
.register_header_check=&register_header_check_dwg
};
diff --git a/src/file_elf.c b/src/file_elf.c
index 36ba814..caa0c68 100644
--- a/src/file_elf.c
+++ b/src/file_elf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_elf= {
.min_header_distance=0,
.max_filesize=10*1024*1024,
.recover=1,
- .header_check=&header_check_elf,
.register_header_check=&register_header_check_elf
};
diff --git a/src/file_evt.c b/src/file_evt.c
index 4d5fd3f..60c0664 100644
--- a/src/file_evt.c
+++ b/src/file_evt.c
@@ -42,7 +42,6 @@ const file_hint_t file_hint_evt= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_evt,
.register_header_check=&register_header_check_evt
};
diff --git a/src/file_exe.c b/src/file_exe.c
index 548cce6..2d3565d 100644
--- a/src/file_exe.c
+++ b/src/file_exe.c
@@ -42,7 +42,6 @@ const file_hint_t file_hint_exe= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_exe,
.register_header_check=&register_header_check_exe
};
diff --git a/src/file_ext.c b/src/file_ext.c
index 6b5fbb9..57e6711 100644
--- a/src/file_ext.c
+++ b/src/file_ext.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_ext2_sb= {
.min_header_distance=0,
.max_filesize=1,
.recover=0,
- .header_check=&header_check_ext2_sb,
.register_header_check=&register_header_check_ext2_sb
};
diff --git a/src/file_fh10.c b/src/file_fh10.c
index abdc47c..225b26c 100644
--- a/src/file_fh10.c
+++ b/src/file_fh10.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_fh10= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_fh10,
.register_header_check=&register_header_check_fh10
};
diff --git a/src/file_fh5.c b/src/file_fh5.c
index cee9a37..64cc0be 100644
--- a/src/file_fh5.c
+++ b/src/file_fh5.c
@@ -49,7 +49,6 @@ const file_hint_t file_hint_fh5= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_fh5,
.register_header_check=&register_header_check_fh5
};
diff --git a/src/file_flac.c b/src/file_flac.c
index f43690c..8caada1 100644
--- a/src/file_flac.c
+++ b/src/file_flac.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_flac= {
.min_header_distance=0,
.max_filesize=100*1024*1024,
.recover=1,
- .header_check=&header_check_flac,
.register_header_check=&register_header_check_flac
};
diff --git a/src/file_flv.c b/src/file_flv.c
index ae73b23..9de0b15 100644
--- a/src/file_flv.c
+++ b/src/file_flv.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_flv= {
.min_header_distance=0,
.max_filesize=200*1024*1024,
.recover=1,
- .header_check=&header_check_flv,
.register_header_check=&register_header_check_flv
};
diff --git a/src/file_fs.c b/src/file_fs.c
index 6e83b4e..8846652 100644
--- a/src/file_fs.c
+++ b/src/file_fs.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_fs= {
.min_header_distance=0,
.max_filesize=200*1024*1024,
.recover=1,
- .header_check=&header_check_fs,
.register_header_check=&register_header_check_fs
};
diff --git a/src/file_gif.c b/src/file_gif.c
index de130ff..a63ff9e 100644
--- a/src/file_gif.c
+++ b/src/file_gif.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_gif= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_gif,
.register_header_check=&register_header_check_gif
};
diff --git a/src/file_gz.c b/src/file_gz.c
index 0dd64a2..1d41b8c 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_gz= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_gz,
.register_header_check=&register_header_check_gz
};
diff --git a/src/file_imb.c b/src/file_imb.c
index 587d63c..9b04ec4 100644
--- a/src/file_imb.c
+++ b/src/file_imb.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_imb= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_imb,
.register_header_check=&register_header_check_imb
};
diff --git a/src/file_indd.c b/src/file_indd.c
index 56b3bbf..e94c5e1 100644
--- a/src/file_indd.c
+++ b/src/file_indd.c
@@ -52,7 +52,6 @@ file_hint_t file_hint_indd= {
.min_header_distance=8192,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_indd,
.register_header_check=&register_header_check_indd
};
diff --git a/src/file_itu.c b/src/file_itu.c
index 43fbda8..2ecfba0 100644
--- a/src/file_itu.c
+++ b/src/file_itu.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_itunes= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_itunes,
.register_header_check=&register_header_check_itunes
};
static const unsigned char itunes_header[8]= {'m', 'h', 'b', 'd', 0x68, 0x00, 0x00, 0x00};
diff --git a/src/file_jpg.c b/src/file_jpg.c
index a00a62a..40e98ce 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -50,7 +50,6 @@ const file_hint_t file_hint_jpg= {
.min_header_distance=0,
.max_filesize=50*1024*1024,
.recover=1,
- .header_check=&header_check_jpg,
.register_header_check=&register_header_check_jpg
};
diff --git a/src/file_kdb.c b/src/file_kdb.c
index ec67750..f3859ac 100644
--- a/src/file_kdb.c
+++ b/src/file_kdb.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_kdb= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_kdb,
.register_header_check=&register_header_check_kdb
};
diff --git a/src/file_max.c b/src/file_max.c
index 4784df9..a824f1c 100644
--- a/src/file_max.c
+++ b/src/file_max.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_max= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_max,
.register_header_check=&register_header_check_max
};
diff --git a/src/file_mb.c b/src/file_mb.c
index 01c5acd..7024a96 100644
--- a/src/file_mb.c
+++ b/src/file_mb.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_mb= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mb,
.register_header_check=&register_header_check_mb
};
diff --git a/src/file_mdb.c b/src/file_mdb.c
index a548887..0b51c42 100644
--- a/src/file_mdb.c
+++ b/src/file_mdb.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_mdb= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_db,
.register_header_check=&register_header_check_mdb
};
@@ -51,7 +50,6 @@ const file_hint_t file_hint_accdb= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_db,
.register_header_check=&register_header_check_accdb
};
diff --git a/src/file_mdf.c b/src/file_mdf.c
index c72d787..e72189a 100644
--- a/src/file_mdf.c
+++ b/src/file_mdf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_mdf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mdf,
.register_header_check=&register_header_check_mdf
};
diff --git a/src/file_mid.c b/src/file_mid.c
index 65cab25..44c3a20 100644
--- a/src/file_mid.c
+++ b/src/file_mid.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_mid= {
.min_header_distance=0,
.max_filesize=50*1024*1024,
.recover=1,
- .header_check=&header_check_mid,
.register_header_check=&register_header_check_mid
};
diff --git a/src/file_mkv.c b/src/file_mkv.c
index faa7c9e..08405f4 100644
--- a/src/file_mkv.c
+++ b/src/file_mkv.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_mkv= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mkv,
.register_header_check=&register_header_check_mkv
};
diff --git a/src/file_mov.c b/src/file_mov.c
index 4f2e0cc..0af7373 100644
--- a/src/file_mov.c
+++ b/src/file_mov.c
@@ -43,7 +43,6 @@ const file_hint_t file_hint_mov= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mov,
.register_header_check=&register_header_check_mov
};
diff --git a/src/file_mp3.c b/src/file_mp3.c
index 86dd360..d45bddb 100644
--- a/src/file_mp3.c
+++ b/src/file_mp3.c
@@ -48,7 +48,6 @@ const file_hint_t file_hint_mp3= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mp3,
.register_header_check=&register_header_check_mp3
};
diff --git a/src/file_mpg.c b/src/file_mpg.c
index 948d871..9cf6d91 100644
--- a/src/file_mpg.c
+++ b/src/file_mpg.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_mpg= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mpg,
.register_header_check=&register_header_check_mpg
};
diff --git a/src/file_mrw.c b/src/file_mrw.c
index ba7b8cb..ade7e53 100644
--- a/src/file_mrw.c
+++ b/src/file_mrw.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_mrw= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mrw,
.register_header_check=&register_header_check_mrw
};
diff --git a/src/file_mus.c b/src/file_mus.c
index 777b9ec..031a385 100644
--- a/src/file_mus.c
+++ b/src/file_mus.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_mus= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_mus,
.register_header_check=&register_header_check_mus
};
diff --git a/src/file_mysql.c b/src/file_mysql.c
index 34c56ea..f72b6de 100644
--- a/src/file_mysql.c
+++ b/src/file_mysql.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_mysql= {
.min_header_distance=0,
.max_filesize=0,
.recover=1,
- .header_check=&header_check_mysql,
.register_header_check=&register_header_check_mysql
};
diff --git a/src/file_njx.c b/src/file_njx.c
index 343c74b..1a991bf 100644
--- a/src/file_njx.c
+++ b/src/file_njx.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_njx= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_njx,
.register_header_check=&register_header_check_njx
};
diff --git a/src/file_ogg.c b/src/file_ogg.c
index 7bf53d1..5ccf841 100644
--- a/src/file_ogg.c
+++ b/src/file_ogg.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_ogg= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_ogg,
.register_header_check=&register_header_check_ogg
};
diff --git a/src/file_one.c b/src/file_one.c
index 0be02be..bf45a66 100644
--- a/src/file_one.c
+++ b/src/file_one.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_one= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_one,
.register_header_check=&register_header_check_one
};
diff --git a/src/file_orf.c b/src/file_orf.c
index 5dd4165..3f596d9 100644
--- a/src/file_orf.c
+++ b/src/file_orf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_orf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_orf,
.register_header_check=&register_header_check_orf
};
diff --git a/src/file_pap.c b/src/file_pap.c
index 76debc2..a974960 100644
--- a/src/file_pap.c
+++ b/src/file_pap.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_pap= {
.min_header_distance=0,
.max_filesize=1024*1024,
.recover=1,
- .header_check=&header_check_pap,
.register_header_check=&register_header_check_pap
};
diff --git a/src/file_pcx.c b/src/file_pcx.c
index 5924068..7f79f4d 100644
--- a/src/file_pcx.c
+++ b/src/file_pcx.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_pcx= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_pcx,
.register_header_check=&register_header_check_pcx
};
diff --git a/src/file_pdf.c b/src/file_pdf.c
index ce605cf..84e60b9 100644
--- a/src/file_pdf.c
+++ b/src/file_pdf.c
@@ -42,7 +42,6 @@ const file_hint_t file_hint_pdf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_pdf,
.register_header_check=&register_header_check_pdf
};
diff --git a/src/file_png.c b/src/file_png.c
index 6c8bd44..9f6d4b2 100644
--- a/src/file_png.c
+++ b/src/file_png.c
@@ -47,7 +47,6 @@ const file_hint_t file_hint_png= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_png,
.register_header_check=&register_header_check_png
};
diff --git a/src/file_prc.c b/src/file_prc.c
index 9ee2456..670867c 100644
--- a/src/file_prc.c
+++ b/src/file_prc.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_prc= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_prc,
.register_header_check=&register_header_check_prc
};
diff --git a/src/file_ps.c b/src/file_ps.c
index 6f2bf6c..de87472 100644
--- a/src/file_ps.c
+++ b/src/file_ps.c
@@ -42,7 +42,6 @@ const file_hint_t file_hint_ps= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_ps,
.register_header_check=&register_header_check_ps
};
diff --git a/src/file_psd.c b/src/file_psd.c
index 1d21796..af84934 100644
--- a/src/file_psd.c
+++ b/src/file_psd.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_psd= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_psd,
.register_header_check=&register_header_check_psd
};
diff --git a/src/file_pst.c b/src/file_pst.c
index 529ff3d..c97b64e 100644
--- a/src/file_pst.c
+++ b/src/file_pst.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_pst= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_pst,
.register_header_check=&register_header_check_pst
};
diff --git a/src/file_ptb.c b/src/file_ptb.c
index 82f7e7f..9c17459 100644
--- a/src/file_ptb.c
+++ b/src/file_ptb.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_ptb= {
.min_header_distance=0,
.max_filesize=10*1024*1024,
.recover=1,
- .header_check=&header_check_ptb,
.register_header_check=&register_header_check_ptb
};
diff --git a/src/file_qbb.c b/src/file_qbb.c
index 3b9ee8f..6c08e0f 100644
--- a/src/file_qbb.c
+++ b/src/file_qbb.c
@@ -42,7 +42,6 @@ const file_hint_t file_hint_qbb= {
.min_header_distance=0,
.max_filesize=30*1024*1024,
.recover=1,
- .header_check=&header_check_qbb,
.register_header_check=&register_header_check_qbb
};
diff --git a/src/file_qdf.c b/src/file_qdf.c
index 40a83e7..ffb2963 100644
--- a/src/file_qdf.c
+++ b/src/file_qdf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_qdf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_qdf,
.register_header_check=&register_header_check_qdf
};
diff --git a/src/file_qxd.c b/src/file_qxd.c
index affbcd5..a4150ba 100644
--- a/src/file_qxd.c
+++ b/src/file_qxd.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_qxd= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_qxd,
.register_header_check=&register_header_check_qxd
};
diff --git a/src/file_ra.c b/src/file_ra.c
index 752599e..1932453 100644
--- a/src/file_ra.c
+++ b/src/file_ra.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_ra= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_ra,
.register_header_check=&register_header_check_ra
};
diff --git a/src/file_raf.c b/src/file_raf.c
index 10f3a47..ca5ce9c 100644
--- a/src/file_raf.c
+++ b/src/file_raf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_raf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_raf,
.register_header_check=&register_header_check_raf
};
diff --git a/src/file_rar.c b/src/file_rar.c
index 8909963..3eed14c 100644
--- a/src/file_rar.c
+++ b/src/file_rar.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_rar= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_rar,
.register_header_check=&register_header_check_rar
};
diff --git a/src/file_raw.c b/src/file_raw.c
index bd70bed..8ba7e6f 100644
--- a/src/file_raw.c
+++ b/src/file_raw.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_raw= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_raw,
.register_header_check=&register_header_check_raw
};
diff --git a/src/file_rdc.c b/src/file_rdc.c
index aa98efc..ea9a76b 100644
--- a/src/file_rdc.c
+++ b/src/file_rdc.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_rdc= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_rdc,
.register_header_check=&register_header_check_rdc
};
diff --git a/src/file_reg.c b/src/file_reg.c
index 626874f..f9377e6 100644
--- a/src/file_reg.c
+++ b/src/file_reg.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_reg= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_reg,
.register_header_check=&register_header_check_reg
};
diff --git a/src/file_res.c b/src/file_res.c
new file mode 100644
index 0000000..a5ed458
--- /dev/null
+++ b/src/file_res.c
@@ -0,0 +1,61 @@
+/*
+
+ File: file_res.c
+
+ Copyright (C) 2007 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_res(file_stat_t *file_stat);
+static int header_check_res(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_res= {
+ .extension="res",
+ .description="Microsoft Visual Studio Resource file",
+ .min_header_distance=0,
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .register_header_check=&register_header_check_res
+};
+
+static const unsigned char MS_res_header[9]= {0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xFF};
+
+static void register_header_check_res(file_stat_t *file_stat)
+{
+ register_header_check(0, MS_res_header,sizeof(MS_res_header), &header_check_res, file_stat);
+}
+
+static int header_check_res(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,MS_res_header,sizeof(MS_res_header))==0)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_res.extension;
+ return 1;
+ }
+ return 0;
+}
diff --git a/src/file_riff.c b/src/file_riff.c
index 5fdd487..a6736b2 100644
--- a/src/file_riff.c
+++ b/src/file_riff.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_riff= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_riff,
.register_header_check=&register_header_check_riff
};
diff --git a/src/file_rm.c b/src/file_rm.c
index b428b82..e5641e1 100644
--- a/src/file_rm.c
+++ b/src/file_rm.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_rm= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_rm,
.register_header_check=&register_header_check_rm
};
diff --git a/src/file_rns.c b/src/file_rns.c
index 8f25a26..7f2b9cb 100644
--- a/src/file_rns.c
+++ b/src/file_rns.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_rns= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_rns,
.register_header_check=&register_header_check_rns
};
diff --git a/src/file_rpm.c b/src/file_rpm.c
index 155f7f3..4f96bf9 100644
--- a/src/file_rpm.c
+++ b/src/file_rpm.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_rpm= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_rpm,
.register_header_check=&register_header_check_rpm
};
diff --git a/src/file_sit.c b/src/file_sit.c
index d525a02..5ebc2c8 100644
--- a/src/file_sit.c
+++ b/src/file_sit.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_sit= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_sit,
.register_header_check=&register_header_check_sit
};
diff --git a/src/file_skp.c b/src/file_skp.c
index 7357d67..d10c8fe 100644
--- a/src/file_skp.c
+++ b/src/file_skp.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_skp= {
.min_header_distance=0,
.max_filesize=10*1024*1024,
.recover=1,
- .header_check=&header_check_skp,
.register_header_check=&register_header_check_skp
};
diff --git a/src/file_spe.c b/src/file_spe.c
index c7bde08..04fd99d 100644
--- a/src/file_spe.c
+++ b/src/file_spe.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_spe= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_spe,
.register_header_check=&register_header_check_spe
};
diff --git a/src/file_spss.c b/src/file_spss.c
index 3002897..e64222c 100644
--- a/src/file_spss.c
+++ b/src/file_spss.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_spss= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_spss,
.register_header_check=&register_header_check_spss
};
diff --git a/src/file_stu.c b/src/file_stu.c
index 51e54cb..167f0e5 100644
--- a/src/file_stu.c
+++ b/src/file_stu.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_stuffit= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_stuffit,
.register_header_check=&register_header_check_stuffit
};
diff --git a/src/file_swf.c b/src/file_swf.c
index 6bb5071..49baeb5 100644
--- a/src/file_swf.c
+++ b/src/file_swf.c
@@ -40,7 +40,6 @@ const file_hint_t file_hint_swf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_swf,
.register_header_check=&register_header_check_swf
};
diff --git a/src/file_tar.c b/src/file_tar.c
index 2333796..7814032 100644
--- a/src/file_tar.c
+++ b/src/file_tar.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_tar= {
.min_header_distance=0x200,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_tar,
.register_header_check=&register_header_check_tar
};
diff --git a/src/file_tib.c b/src/file_tib.c
index 3434f6f..56042c6 100644
--- a/src/file_tib.c
+++ b/src/file_tib.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_tib= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_tib,
.register_header_check=&register_header_check_tib
};
diff --git a/src/file_tiff.c b/src/file_tiff.c
index 1c1c45b..2592ee3 100644
--- a/src/file_tiff.c
+++ b/src/file_tiff.c
@@ -44,7 +44,6 @@ const file_hint_t file_hint_tiff= {
.min_header_distance=0,
.max_filesize=200*1024*1024,
.recover=1,
- .header_check=&header_check_tiff,
.register_header_check=&register_header_check_tiff
};
diff --git a/src/file_txt.c b/src/file_txt.c
index 7575011..1405411 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -61,7 +61,6 @@ file_hint_t file_hint_fasttxt= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_fasttxt,
.register_header_check=&register_header_check_fasttxt
};
@@ -71,7 +70,6 @@ file_hint_t file_hint_txt= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_txt,
.register_header_check=&register_header_check_txt
};
@@ -86,7 +84,7 @@ static const unsigned char header_sh[9] = "#!/bin/sh";
static const unsigned char header_slk[10] = "ID;PSCALC3";
static const unsigned char header_ram[7] = "rtsp://";
static const unsigned char header_xml[14] = "<?xml version=";
-static const char sign_html[] = "<html";
+static const char sign_html[5] = "<html";
static void register_header_check_txt(file_stat_t *file_stat)
{
@@ -283,8 +281,8 @@ static int UTF2Lat(unsigned char *buffer_lower, const unsigned char *buffer, con
static int header_check_fasttxt(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 char sign_grisbi[] = "Version_grisbi";
- const char sign_fst[] = "QBFSD";
+ const char sign_grisbi[14] = "Version_grisbi";
+ const char sign_fst[5] = "QBFSD";
if(memcmp(buffer,header_cls,sizeof(header_cls))==0)
{
reset_file_recovery(file_recovery_new);
diff --git a/src/file_vmdk.c b/src/file_vmdk.c
index f737179..5844ac7 100644
--- a/src/file_vmdk.c
+++ b/src/file_vmdk.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_vmdk= {
.min_header_distance=0,
.max_filesize=(uint64_t)2048*1024*1024*1024,
.recover=1,
- .header_check=&header_check_vmdk,
.register_header_check=&register_header_check_vmdk
};
diff --git a/src/file_wmf.c b/src/file_wmf.c
index 8ad40d7..65813af 100644
--- a/src/file_wmf.c
+++ b/src/file_wmf.c
@@ -41,7 +41,6 @@ const file_hint_t file_hint_wmf= {
.min_header_distance=0,
.max_filesize=50*1024*1024,
.recover=1,
- .header_check=&header_check_wmf,
.register_header_check=&register_header_check_wmf
};
diff --git a/src/file_wpd.c b/src/file_wpd.c
index 0426c8e..017f9bd 100644
--- a/src/file_wpd.c
+++ b/src/file_wpd.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_wpd= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_wpd,
.register_header_check=&register_header_check_wpd
};
diff --git a/src/file_x3f.c b/src/file_x3f.c
index 9e71338..8d44d0d 100644
--- a/src/file_x3f.c
+++ b/src/file_x3f.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_x3f= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_x3f,
.register_header_check=&register_header_check_x3f
};
diff --git a/src/file_xcf.c b/src/file_xcf.c
index a8173f1..9154085 100644
--- a/src/file_xcf.c
+++ b/src/file_xcf.c
@@ -39,7 +39,6 @@ const file_hint_t file_hint_xcf= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_xcf,
.register_header_check=&register_header_check_xcf
};
diff --git a/src/file_xm.c b/src/file_xm.c
index f76d6f2..84ab391 100644
--- a/src/file_xm.c
+++ b/src/file_xm.c
@@ -42,7 +42,6 @@ const file_hint_t file_hint_xm= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_xm,
.register_header_check=&register_header_check_xm
};
diff --git a/src/file_zip.c b/src/file_zip.c
index 2e7b4aa..be98a01 100644
--- a/src/file_zip.c
+++ b/src/file_zip.c
@@ -52,7 +52,6 @@ const file_hint_t file_hint_zip= {
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
- .header_check=&header_check_zip,
.register_header_check=&register_header_check_zip
};
diff --git a/src/filegen.h b/src/filegen.h
index a98ce4b..d45034c 100644
--- a/src/filegen.h
+++ b/src/filegen.h
@@ -84,8 +84,6 @@ struct file_hint_struct
const uint64_t max_filesize;
const int recover;
void (*register_header_check)(file_stat_t *file_stat);
- int (*header_check)(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);
};
struct alloc_data_struct
diff --git a/src/photorec.c b/src/photorec.c
index c70c79c..29dd785 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -170,6 +170,7 @@ extern const file_hint_t file_hint_rar;
extern const file_hint_t file_hint_raw;
extern const file_hint_t file_hint_rdc;
extern const file_hint_t file_hint_reg;
+extern const file_hint_t file_hint_res;
extern const file_hint_t file_hint_riff;
extern const file_hint_t file_hint_rm;
extern const file_hint_t file_hint_rns;
@@ -839,6 +840,7 @@ int main( int argc, char **argv )
{ .enable=1, .file_hint=&file_hint_raw },
{ .enable=1, .file_hint=&file_hint_rdc },
{ .enable=1, .file_hint=&file_hint_reg },
+ { .enable=1, .file_hint=&file_hint_res },
{ .enable=1, .file_hint=&file_hint_riff },
{ .enable=1, .file_hint=&file_hint_rm },
{ .enable=1, .file_hint=&file_hint_rns },