[ 
https://issues.apache.org/jira/browse/TIKA-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14102389#comment-14102389
 ] 

Nick Burch commented on TIKA-1399:
----------------------------------

Having read a few likely looking bits of the source, and created a test file, I 
think that this magic will normally but not always be correct. I've added a 
slightly tweaked magic in r1618890, which skips the length field but still 
checks for the first header block (type=2), along with a unit test

> [Patch] add support for AxCrypt file type detection
> ---------------------------------------------------
>
>                 Key: TIKA-1399
>                 URL: https://issues.apache.org/jira/browse/TIKA-1399
>             Project: Tika
>          Issue Type: Improvement
>          Components: detector, mime
>    Affects Versions: 1.3, 1.4, 1.5
>            Reporter: Florent Angebault
>              Labels: patch
>             Fix For: 1.7
>
>
> Please include the following mime declaration in 
> {{tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml}}.
> It makes possible to detect AxCrypt file type with extension {{*.axx}}.
> {code}
> <mime-info>
>       <mime-type type="application/x-axcrypt">
>               <glob pattern="*.axx" />
>               <magic priority="50">
>                       <match 
> value="\xc0\xb9\x07\x2e\x4f\x93\xf1\x46\xa0\x15\x79\x2c\xa1\xd9\xe8\x21\x15\x00\x00\x00\x02"
>  type="string" offset="0" />
>               </magic>
>       </mime-type>
> </mime-info>
> {code}
> The magic value is taken from the Aperture project:
> http://sourceforge.net/p/aperture/code/2493/tree/aperture/trunk/core/src/main/resources/org/semanticdesktop/aperture/mime/identifier/magic/mimetypes.xml#l1225



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to