summaryrefslogtreecommitdiffstats
path: root/src/file_txt.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-07-18 14:39:58 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2015-07-18 14:39:58 +0200
commitea6c6650bcc0a2b7a8ef96354cd7e283d762cca7 (patch)
tree8e3f26aaa5c4444e2c09fb08d85e0fcdb267af3c /src/file_txt.c
parente5402e6acb2837dcfa815df1d77c8fe4fddd06ad (diff)
PhotoRec: recover .ldif files
Diffstat (limited to 'src/file_txt.c')
-rw-r--r--src/file_txt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/file_txt.c b/src/file_txt.c
index f9d26ca..3792285 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -1014,6 +1014,14 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
file_recovery_new->extension="bat";
return 1;
}
+ if(strncasecmp((const char *)buffer, "dn: ", 4)==0)
+ {
+ 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="ldif";
+ return 1;
+ }
{
const char *ext=NULL;
/* ind=~0: random