Setup a signature for a *.cs file

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
Locked
Message
Author
jchannon
Posts: 4
Joined: 15 May 2012, 13:59

Setup a signature for a *.cs file

#1 Post by jchannon »

A *.cs file is a code file for C# a Microsoft development language.

I followed the instructions on the Wiki http://www.cgsecurity.org/wiki/Add_your ... o_PhotoRec but I could not get fidentity to work.

Can someone help?

I created a file called photorec.cs and the contents are cs 0 "Visual C# Source file (.cs)"

jchannon
Posts: 4
Joined: 15 May 2012, 13:59

Re: Setup a signature for a *.cs file

#2 Post by jchannon »

*BUMP*

Anybody? I'm really struggling

jchannon
Posts: 4
Joined: 15 May 2012, 13:59

Re: Setup a signature for a *.cs file

#3 Post by jchannon »

OK I think I have it working.

My sig file looks like this

Code: Select all

cs 0 0xEF 0xBB 0xBF
However when I check with fidentity it returns ?cs instead of cs

I ran PhotoRec but its so far returned 3500 files.

Is there any way I can narrow it down any more?

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Setup a signature for a *.cs file

#4 Post by Fiona »

If you still exerience any problems send a file pattern to Christophe Grenier;
http://www.cgsecurity.org/wiki/PhotoRec#Problems_.3F

Fiona

jchannon
Posts: 4
Joined: 15 May 2012, 13:59

Re: Setup a signature for a *.cs file

#5 Post by jchannon »

I'll ask him about the question mark but I was hoping of a way to restrict the searching more as it takes 1hr 30mins to do the search and returns over 4500 files. I only need about 50 files that were deleted.

SailorCM
Posts: 1
Joined: 16 Jun 2012, 09:51

Re: Setup a signature for a *.cs file

#6 Post by SailorCM »

forget 0xEF 0xBB 0xBF .. it's just the signature for UTF-8 encoded files...

what you need is:

Code: Select all

cs 0 0xefbbbf6e616d657370616365
cs 0 0x6e616d65737061636520
cs 0 0x7573696e6720
cs 0 0xefbbbf7573696e6720
sln 0 0xefbbbf0d0a4d6963726f736f66742056
userprefs 0 0xefbbbf3c50726f706572746965733e0a
and human readable:

Code: Select all

cs 0 ...namespace
cs 0 namespace 
cs 0 using
cs 0 ...using
sln 0 .....Microsoft V
userprefs 0 ...<Properties>.
... are unprintable chars - mostly UTF8-BOM - that's so far.. maybe we could collect some signatures for source-files here to restore more visual-studio related files

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

Re: Setup a signature for a *.cs file

#7 Post by cgrenier »

When you create your signature file, be carefull that it doesn't itself begin by an UTF-8 or UTF-16 BOM. I have added this warning on the wiki.

Locked