cgsecurity / testdisk

TestDisk & PhotoRec
https://www.cgsecurity.org/
GNU General Public License v2.0
1.55k stars 190 forks source link

Recover Git objects #92

Open opensourcer2 opened 3 years ago

opensourcer2 commented 3 years ago

I need help recovering Git objects. From google I learned that these files are deflated with zlib. I was able to track down the header of zlib. They are (in hex)

0x7801
0x785E
0x789C
0x78DA

So I tried to use custom signature in a .photorec.sig file with

gitblob1 0 0x7801
gitblob2 0 0x785E
gitblob3 0 0x789C
gitblob4 0 0x78DA

I successfully run a test using fidentify and a git blob was recognized. However, when running photorec with these signature returns nothing. So no git objects was found.