xref: /freebsd/contrib/file/magic/Magdir/magic (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1
2#------------------------------------------------------------------------------
3# $File: magic,v 1.11 2023/06/27 13:42:49 christos Exp $
4# magic:  file(1) magic for magic files
5#
6# Update:	Joerg Jenderek
7# skip Magicsee_R1.cfg found on retropie starting with # Magicsee R1 one-handed controller
80	string/t		#\ Magic\ 	magic text file for file(1) cmd
9#!:mime	text/plain
10!:mime	text/x-file
11# no suffix in ../Header
12!:ext	/
13#
14# some samples start with a comment line
150	ubyte		=0x23
16# many samples start with separator line
17>4	string		--------
18>>0	use		magic-fragment
19# few samples with 1st comment line and without seperator comment line
20>4	default		x
21# few sample with 1st comment line and without seperator comment line and regular expression like: sisu
22>>1	search/112	regex\x09
23>>>0	use		magic-fragment
24>>1	default		x
25# few samples with 1st comment line and without seperator comment line and string value like:
26# blcr bsi selinux ssh (file 3.34) digital gnu wordperfect
27>>>1	search/471	string\x09
28>>>>0	use		magic-fragment
29>>>1	default		x
30# few samples with 1st comment line and without seperator comment line and short value like:
31# (file 3.34) os9 osf1
32>>>>1	search/1716	short\x09
33>>>>>0	use		magic-fragment
34# but many samples start with an empty first line
350	ubyte		=0x0A
36# many samples sttart with separator comment line
37>4	string		--------
38>>0	use		magic-fragment
39# few samples with 1st empty line and without seperator comment line like: biosig espressif
40>4	default		x
41>>1	search/581	\041:mime
42>>>0	use		magic-fragment
43#	display information (lines) about magic text fragment
440	name		magic-fragment
45>0	string		x		magic text fragment for file(1) cmd
46!:mime	text/x-file
47# most without suffix but mail.news varied.out varied.script
48!:ext	/news/out/script
49# next lines are mainly for control reasons
50# some (34/339) samples start comment line
51>0	ubyte		!0x0A
52>>0	string		x		\b, 1st line "%s"
53>>>&1	string		x		\b, 2nd line "%s"
54# but most (305/339) samples start with an empty first line
55>0	ubyte		=0x0A
56>>1	string		x		\b, 2nd line "%s"
57>>>&1	string		x		\b, 3rd line "%s"
58#
59# URL:		http://en.wikipedia.org/wiki/File_(command)
60# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/m/mgc.trid.xml
61# Note:		called "magic compiled data (LE)" by TrID
620	lelong		0xF11E041C	magic binary file for file(1) cmd
63#!:mime	application/octet-stream
64!:mime application/x-file
65!:ext	mgc
66>4	lelong		x		(version %d) (little endian)
670	belong		0xF11E041C	magic binary file for file(1) cmd
68#!:mime	application/octet-stream
69!:mime application/x-file
70!:ext	mgc
71>4	belong		x		(version %d) (big endian)
72