recovering JSON files

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
pollat
Posts: 1
Joined: 28 Mar 2018, 18:38

recovering JSON files

#1 Post by pollat » 28 Mar 2018, 19:07

Photorec ignores JSON files. I tried to understand why, while testing on a 128mb sd card and finally solved it:

If I place two files - TXT and JSON on sd card, Photorec recovers only one of them. I tried different ways, copied contents of JSON to TXT and vice versa, saving as different encodings, it does not matter.
But -if I add a new line somewhere in JSON file , then Photorec will recover it, at least starting with separating line (or /newline, or whatever)

So, it looks like Photorec ignores JSON files because they are formatted as a single string of text

Image


Last time when I was backing up my firefox and thunderbird profiles at work, parts of the appData folders did not back up, and now I am royally screwed because it contained important tax documents and login info. I can find all sorts of stuff except JSON files.
I wonder if partition can be searched for raw text data, and how many light years would it take to find a string on a 300GB partition...

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4392
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: recovering JSON files

#2 Post by cgrenier » 30 Mar 2018, 08:47

Currently PhotoRec discards text files where there is no new line in the first 512 bytes.
https://github.com/cgsecurity/testdisk/ ... file_txt.c line 1204

It need better heuristics to handle json files...

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests