mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

- It's derived from the magic database of libmagic 5.14, but with most everything not related to mime types removed. - The custom database is always used by default for mime detection, but the more verbose file type detection will fall back on the default libmagic installation's database. The result is: mime type strings are now guaranteed to be consistent across platforms, but the verbose file type descriptions are not. - The custom database gets installed in $prefix/share/bro/magic, and should even be extensible if files with new patterns are added inside the directory. - The search path for the mime magic database can be controlled via BROMAGIC environment variable. - Remove mime_desc field from ftp.log. - Stop using the mime/file type canonifier with unit tests. - libmagic >= 5.04 is now a requirement.
208 lines
7.2 KiB
Text
208 lines
7.2 KiB
Text
# See COPYING file in this directory for original libmagic copyright.
|
|
#------------------------------------------------------------------------------
|
|
# $File: animation,v 1.47 2013/02/06 14:18:52 christos Exp $
|
|
# animation: file(1) magic for animation/movie formats
|
|
#
|
|
# animation formats
|
|
# MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
|
|
# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
|
|
|
|
# SGI and Apple formats
|
|
0 string MOVI Silicon Graphics movie file
|
|
!:mime video/x-sgi-movie
|
|
4 string moov Apple QuickTime
|
|
!:mime video/quicktime
|
|
4 string mdat Apple QuickTime movie (unoptimized)
|
|
!:mime video/quicktime
|
|
#4 string wide Apple QuickTime movie (unoptimized)
|
|
#!:mime video/quicktime
|
|
#4 string skip Apple QuickTime movie (modified)
|
|
#!:mime video/quicktime
|
|
#4 string free Apple QuickTime movie (modified)
|
|
#!:mime video/quicktime
|
|
4 string idsc Apple QuickTime image (fast start)
|
|
!:mime image/x-quicktime
|
|
#4 string idat Apple QuickTime image (unoptimized)
|
|
#!:mime image/x-quicktime
|
|
4 string pckg Apple QuickTime compressed archive
|
|
!:mime application/x-quicktime-player
|
|
4 string/W jP JPEG 2000 image
|
|
!:mime image/jp2
|
|
4 string ftyp ISO Media
|
|
>8 string isom \b, MPEG v4 system, version 1
|
|
!:mime video/mp4
|
|
>8 string mp41 \b, MPEG v4 system, version 1
|
|
!:mime video/mp4
|
|
>8 string mp42 \b, MPEG v4 system, version 2
|
|
!:mime video/mp4
|
|
>8 string/W jp2 \b, JPEG 2000
|
|
!:mime image/jp2
|
|
>8 string 3ge \b, MPEG v4 system, 3GPP
|
|
!:mime video/3gpp
|
|
>8 string 3gg \b, MPEG v4 system, 3GPP
|
|
!:mime video/3gpp
|
|
>8 string 3gp \b, MPEG v4 system, 3GPP
|
|
!:mime video/3gpp
|
|
>8 string 3gs \b, MPEG v4 system, 3GPP
|
|
!:mime video/3gpp
|
|
>8 string 3g2 \b, MPEG v4 system, 3GPP2
|
|
!:mime video/3gpp2
|
|
>8 string mmp4 \b, MPEG v4 system, 3GPP Mobile
|
|
!:mime video/mp4
|
|
>8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC
|
|
!:mime video/3gpp
|
|
>8 string/W M4A \b, MPEG v4 system, iTunes AAC-LC
|
|
!:mime audio/mp4
|
|
>8 string/W M4V \b, MPEG v4 system, iTunes AVC-LC
|
|
!:mime video/mp4
|
|
>8 string/W qt \b, Apple QuickTime movie
|
|
!:mime video/quicktime
|
|
|
|
# MPEG sequences
|
|
# Scans for all common MPEG header start codes
|
|
0 belong&0xFFFFFF00 0x00000100
|
|
>3 byte 0xBA MPEG sequence
|
|
!:mime video/mpeg
|
|
# GRR too general as it catches also FoxPro Memo example NG.FPT
|
|
>3 byte 0xB0 MPEG sequence, v4
|
|
!:mime video/mpeg4-generic
|
|
>3 byte 0xB5 MPEG sequence, v4
|
|
!:mime video/mpeg4-generic
|
|
>3 byte 0xB3 MPEG sequence
|
|
!:mime video/mpeg
|
|
|
|
# MPEG ADTS Audio (*.mpx/mxa/aac)
|
|
# from dreesen@math.fu-berlin.de
|
|
# modified to fully support MPEG ADTS
|
|
|
|
# MP3, M1A
|
|
# modified by Joerg Jenderek
|
|
# GRR the original test are too common for many DOS files
|
|
# so don't accept as MP3 until we've tested the rate
|
|
0 beshort&0xFFFE 0xFFFA
|
|
# rates
|
|
>2 byte&0xF0 0x10 MPEG ADTS, layer III, v1, 32 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x20 MPEG ADTS, layer III, v1, 40 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x30 MPEG ADTS, layer III, v1, 48 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x40 MPEG ADTS, layer III, v1, 56 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x50 MPEG ADTS, layer III, v1, 64 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x60 MPEG ADTS, layer III, v1, 80 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x70 MPEG ADTS, layer III, v1, 96 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x80 MPEG ADTS, layer III, v1, 112 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0x90 MPEG ADTS, layer III, v1, 128 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0xA0 MPEG ADTS, layer III, v1, 160 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0xB0 MPEG ADTS, layer III, v1, 192 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0xC0 MPEG ADTS, layer III, v1, 224 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0xD0 MPEG ADTS, layer III, v1, 256 kbps
|
|
!:mime audio/mpeg
|
|
>2 byte&0xF0 0xE0 MPEG ADTS, layer III, v1, 320 kbps
|
|
!:mime audio/mpeg
|
|
|
|
# MP2, M1A
|
|
0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1
|
|
!:mime audio/mpeg
|
|
|
|
# MP3, M2A
|
|
0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2
|
|
!:mime audio/mpeg
|
|
|
|
# MPA, M2A
|
|
0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2
|
|
!:mime audio/mpeg
|
|
|
|
# MP3, M25A
|
|
0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5
|
|
!:mime audio/mpeg
|
|
|
|
# Stored AAC streams (instead of the MP4 format)
|
|
0 string ADIF MPEG ADIF, AAC
|
|
!:mime audio/x-hx-aac-adif
|
|
|
|
# Live or stored single AAC stream (used with MPEG-2 systems)
|
|
0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC
|
|
!:mime audio/x-hx-aac-adts
|
|
|
|
# Live MPEG-4 audio streams (instead of RTP FlexMux)
|
|
0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS
|
|
!:mime audio/x-mp4a-latm
|
|
|
|
# This magic isn't strong enough (matches plausible ISO-8859-1 text)
|
|
#0 beshort 0x4DE1 MPEG-4 LO-EP audio stream
|
|
#!:mime audio/x-mp4a-latm
|
|
|
|
# Summary: FLI animation format
|
|
# Created by: Daniel Quinlan <quinlan@yggdrasil.com>
|
|
# Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
|
|
4 leshort 0xAF11
|
|
# standard FLI always has 320x200 resolution and 8 bit color
|
|
>8 leshort 320
|
|
>>10 leshort 200
|
|
>>>12 leshort 8 FLI animation, 320x200x8
|
|
!:mime video/x-fli
|
|
|
|
# Summary: FLC animation format
|
|
# Created by: Daniel Quinlan <quinlan@yggdrasil.com>
|
|
# Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
|
|
4 leshort 0xAF12
|
|
# standard FLC always use 8 bit color
|
|
>12 leshort 8 FLC animation
|
|
!:mime video/x-flc
|
|
|
|
# Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
|
|
0 belong 0x3026b275 Microsoft ASF
|
|
!:mime video/x-ms-asf
|
|
|
|
# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
|
|
0 string \x8aMNG MNG video data,
|
|
!:mime video/x-mng
|
|
|
|
# JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
|
|
0 string \x8bJNG JNG video data,
|
|
!:mime video/x-jng
|
|
|
|
# VRML (Virtual Reality Modelling Language)
|
|
0 string/w #VRML\ V1.0\ ascii VRML 1 file
|
|
!:mime model/vrml
|
|
0 string/w #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file
|
|
!:mime model/vrml
|
|
|
|
# X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
|
|
# From Michel Briand <michelbriand@free.fr>
|
|
0 string/t \<?xml\ version="
|
|
!:strength +1
|
|
>20 search/1000/cw \<!DOCTYPE\ X3D X3D (Extensible 3D) model xml text
|
|
!:mime model/x3d
|
|
|
|
# MPEG file
|
|
# MPEG sequences
|
|
# FIXME: This section is from the old magic.mime file and needs integrating with the rest
|
|
0 belong 0x000001BA
|
|
>4 byte &0x40
|
|
!:mime video/mp2p
|
|
>4 byte ^0x40
|
|
!:mime video/mpeg
|
|
0 belong 0x000001BB
|
|
!:mime video/mpeg
|
|
0 belong 0x000001B0
|
|
!:mime video/mp4v-es
|
|
0 belong 0x000001B5
|
|
!:mime video/mp4v-es
|
|
0 belong 0x000001B3
|
|
!:mime video/mpv
|
|
0 belong&0xFF5FFF1F 0x47400010
|
|
!:mime video/mp2t
|
|
0 belong 0x00000001
|
|
>4 byte&0x1F 0x07
|
|
!:mime video/h264
|