summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-06-23 18:57:30 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-06-23 18:57:30 +0200
commit813f8cc70a01b7275f1e38829f11f5cca372c902 (patch)
tree99523be377279882954533e6e06d8d3f3380f1ee
parentc62ef5bb5b0a3659dd2805cfdc3ecda1cb3d774f (diff)
PhotoRec: add file format name near the extension
-rw-r--r--src/file_doc.c12
-rw-r--r--src/file_exe.c1
-rw-r--r--src/file_mdf.c2
-rw-r--r--src/file_riff.c1
-rw-r--r--src/file_spss.c2
-rw-r--r--src/file_txt.c3
6 files changed, 13 insertions, 8 deletions
diff --git a/src/file_doc.c b/src/file_doc.c
index 0ba69df..bba48a4 100644
--- a/src/file_doc.c
+++ b/src/file_doc.c
@@ -110,7 +110,7 @@ static int header_check_doc(const unsigned char *buffer, const unsigned int buff
file_recovery_new->extension="sdd";
}
else if(td_memmem(buffer,buffer_size,"W\0k\0s\0S\0S\0W\0o\0r\0k\0B\0o\0o\0k\0",26)!=NULL)
- {
+ { /* Microsoft Works Spreadsheet or Chart */
file_recovery_new->extension="xlr";
}
else if(td_memmem(buffer,buffer_size,"I\0m\0a\0g\0e\0s\0S\0t\0o\0r\0e\0",22)!=NULL)
@@ -150,6 +150,10 @@ static int header_check_doc(const unsigned char *buffer, const unsigned int buff
{
file_recovery_new->extension="pub";
}
+ else if(td_memmem(buffer,buffer_size,"Publisher",9)!=NULL)
+ { /* Publisher */
+ file_recovery_new->extension="pub";
+ }
else if(td_memmem(buffer, buffer_size, "Microsoft Works Database", 24)!=NULL
|| td_memmem( buffer, buffer_size, "MSWorksDBDoc", 12)!=NULL)
{ /* Microsoft Works .wdb */
@@ -160,17 +164,13 @@ static int header_check_doc(const unsigned char *buffer, const unsigned int buff
file_recovery_new->extension="wps";
}
else if(td_memmem(buffer,buffer_size,"MetaStock",9)!=NULL)
- {
+ { /* MetaStock */
file_recovery_new->extension="mws";
}
else if(td_memmem(buffer,buffer_size,"_\0_\0n\0a\0m\0e\0i\0d\0_\0v\0e\0r\0s\0i\0o\0n\0001\0.\0000\0",38)!=NULL)
{ /* Outlook */
file_recovery_new->extension="msg";
}
- else if(td_memmem(buffer,buffer_size,"Publisher",9)!=NULL)
- { /* Publisher */
- file_recovery_new->extension="pub";
- }
else if(td_memmem(buffer,buffer_size,"L\0i\0c\0o\0m\0",10)!=NULL)
{ /* Licom AlphaCAM */
file_recovery_new->extension="amb";
diff --git a/src/file_exe.c b/src/file_exe.c
index ef0da40..8035865 100644
--- a/src/file_exe.c
+++ b/src/file_exe.c
@@ -77,6 +77,7 @@ static int header_check_exe(const unsigned char *buffer, const unsigned int buff
}
if(le16(pe_hdr->Characteristics) & 0x2000)
{
+ /* Dynamic Link Library */
reset_file_recovery(file_recovery_new);
file_recovery_new->extension="dll";
}
diff --git a/src/file_mdf.c b/src/file_mdf.c
index 0c615e7..257231e 100644
--- a/src/file_mdf.c
+++ b/src/file_mdf.c
@@ -36,7 +36,7 @@ static int header_check_mdf(const unsigned char *buffer, const unsigned int buff
const file_hint_t file_hint_mdf= {
.extension="mdf",
- .description="Microsoft SQL mdf",
+ .description="Microsoft SQL Server Master Database File",
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
diff --git a/src/file_riff.c b/src/file_riff.c
index 037b86c..ef41b60 100644
--- a/src/file_riff.c
+++ b/src/file_riff.c
@@ -67,6 +67,7 @@ static int header_check_riff(const unsigned char *buffer, const unsigned int buf
file_recovery_new->extension="cdr";
else if(memcmp(&buffer[8],"NUND",4)==0)
{
+ /* Cubase Project File */
file_recovery_new->extension="cpr";
file_recovery_new->calculated_file_size=(((uint64_t)buffer[4])<<24) + (((uint64_t)buffer[5])<<16) +
(((uint64_t)buffer[6])<<8) + (uint64_t)buffer[7] + 12;
diff --git a/src/file_spss.c b/src/file_spss.c
index 0d5126a..4fa39d8 100644
--- a/src/file_spss.c
+++ b/src/file_spss.c
@@ -35,7 +35,7 @@ static int header_check_spss(const unsigned char *buffer, const unsigned int buf
const file_hint_t file_hint_spss= {
.extension="sav",
- .description="SPSS",
+ .description="SPSS (Statistical Package for the Social Sciences) saved data",
.min_header_distance=0,
.max_filesize=PHOTOREC_MAX_FILE_SIZE,
.recover=1,
diff --git a/src/file_txt.c b/src/file_txt.c
index a5a571b..a7d8461 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -419,7 +419,10 @@ static int header_check_fasttxt(const unsigned char *buffer, const unsigned int
reset_file_recovery(file_recovery_new);
file_recovery_new->data_check=&data_check_txt;
if(td_memmem(buffer, buffer_size, sign_grisbi, sizeof(sign_grisbi))!=NULL)
+ {
+ /* Grisbi - Personal Finance Manager XML data */
file_recovery_new->extension="gsb";
+ }
else if(td_memmem(buffer, buffer_size, sign_fst, sizeof(sign_fst))!=NULL)
file_recovery_new->extension="fst";
else if(td_memmem(buffer, buffer_size, sign_html, sizeof(sign_html))!=NULL)