summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-01-05 07:58:03 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2011-01-05 07:58:03 +0100
commit1b0252227eba5e93f5349ff4d5029d0a095ed4ff (patch)
treed2e687b3d35716afc71b319d12282cbbfd60c776 /src
parent2bca2d6e5370c5a402322049f90e9eb9152d81a2 (diff)
PhotoRec: recover MS Internet Shortcut .url files and avoid some false positives with text files and Fortran .f
Diffstat (limited to 'src')
-rw-r--r--src/file_txt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/file_txt.c b/src/file_txt.c
index f6c33c8..fb9aee3 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -642,6 +642,15 @@ static int header_check_fasttxt(const unsigned char *buffer, const unsigned int
file_recovery_new->extension="stp";
return 1;
}
+ if(memcmp(buffer, header_url, sizeof(header_url))==0)
+ {
+ /* URL / Internet Shortcut */
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->data_check=&data_check_txt;
+ file_recovery_new->file_check=&file_check_size;
+ file_recovery_new->extension="url";
+ return 1;
+ }
if(memcmp(buffer,header_wpl,sizeof(header_wpl))==0)
{
/* Windows Play List*/
@@ -1113,7 +1122,7 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
ext="java";
#endif
}
- else if(nbrf>10 && ind<0.9)
+ else if(nbrf>10 && ind<0.9 && strstr(buffer, "integer")!=NULL)
ext="f";
else if(is_csv>0)
ext="csv";