css support
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
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
css support
i looked some recovered txt files and saw they are css files. could you add ability to detect css files? maybe by just some keywords, maybe by whole validity check?
-
- Posts: 2767
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: css support
There are lots of files types that contain readable text that are classified as txt-files because they are missing distinct fingerprints.
"just some keywords" does not meet any acceptable quality standard.
As for programming a "validity check" you can contribute your code (something the author of Photorec would really appreciate!) or hire a programmer. To give you an idea of the extent of programming this read the CSS documentation, p.e. here:
https://www.w3schools.com/css/css_howto.asp
I guess nobody is interested in CSS files anyway. You just want them to be recognized to simplify your life.
Try to use the search capabilities of your operating system to filter the files you don't want to see.
Re: css support
Hi! Just for info in the case of a hypotetical future improving of text/code recognition:
Christian Weiske (cweiske) on GitHub made an extension for the MIME magic file: https://github.com/cweiske/MIME_Type_PlainDetect
Christian Weiske (cweiske) on GitHub made an extension for the MIME magic file: https://github.com/cweiske/MIME_Type_PlainDetect
-
- Posts: 2767
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: css support
There is no real usable recognition in his example.
I do not understand the php-language but I see that
his code relies on the autoDetect-function of a new mime-type.
There is no mime-type "class" in C and no autoDetect-function.
To make this example usable the source coude of the autoDetect-function needs to be translated to C.
I do not understand the php-language but I see that
Code: Select all
$type = $mt->autoDetect($file)
There is no mime-type "class" in C and no autoDetect-function.
To make this example usable the source coude of the autoDetect-function needs to be translated to C.
Re: css support
Ok, just to tak about it.
I made the assumption that Photorec works similar to the GNU/Linux 'file' command in recognize file's content, but it's probably wrong.
Indeed, the "MIME magic file extension" from C.Weiske can be used with the 'file' command, other than only PHP:
and the 'file' command is written in C (https://darwinsys.com/file).
The problem I see is that 'file' command recognize file content but it doesn't care about uniquely associating a file name extension.
I made the assumption that Photorec works similar to the GNU/Linux 'file' command in recognize file's content, but it's probably wrong.
Indeed, the "MIME magic file extension" from C.Weiske can be used with the 'file' command, other than only PHP:
Code: Select all
file -m programming.magic /path/to/file.css
The problem I see is that 'file' command recognize file content but it doesn't care about uniquely associating a file name extension.
-
- Posts: 2767
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: css support
TestDisk is working on different platforms:
https://www.cgsecurity.org/wiki/TestDisk_Download
Issuing a shell command that only works on a linux system will not help on the other platforms.
What's needed is C code or a C-library that can be used without license problems.
https://www.cgsecurity.org/wiki/TestDisk_Download
Issuing a shell command that only works on a linux system will not help on the other platforms.
What's needed is C code or a C-library that can be used without license problems.