fidentify 7.1 not working if .photorec.sig has offsets other than zero
Posted: 03 Dec 2021, 18:01
Hello all,
I'm trying to define custom signatures for Photorec and they work fine as long as the offset is set to 0. However to make the signatures more specific, for one of the file types I need to look for strings that appear further down in the file. When I specify an offset other than zero, fidentify doesn't recognize the file types anymore and reverts to the built-in signature.
This .photorec.sig works and fidentity shows the correct file type if tested with appropriate files:
If now I specify for all file types an offset of 1 and drop the first character from each signature, fidentify reverts to built-in signatures, i.e. the signatures are not recognized in the test files:
I've tried the following, without success:
I'm using testdisk 7.1 on macOS High Sierra 10.13.6.
I would be grateful for any suggestions on how to make this work, thanks!
Cheers, Claudio
I'm trying to define custom signatures for Photorec and they work fine as long as the offset is set to 0. However to make the signatures more specific, for one of the file types I need to look for strings that appear further down in the file. When I specify an offset other than zero, fidentify doesn't recognize the file types anymore and reverts to the built-in signature.
This .photorec.sig works and fidentity shows the correct file type if tested with appropriate files:
Code: Select all
foamfile 0 "*/--"
obj 0 "# Wavefront OBJ file
pvsm 0 "<ParaView>"
Code: Select all
foamfile 1 "/--" # Recognized as java
obj 1 " Wavefront OBJ file # Recognized as txt
pvsm 1 "ParaView>" # Recognized as txt
- different values of obvious offsets, none of which works
- writing the offset in hex form, e.g. 0x1, not working
- searching this forum for similar issues, nothing helpful found
- studying the source code in file_sig.c but can't quite figure out how this works and how it is used by fidentify.c
I'm using testdisk 7.1 on macOS High Sierra 10.13.6.
I would be grateful for any suggestions on how to make this work, thanks!
Cheers, Claudio