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