xref: /dragonfly/contrib/file/magic/Magdir/database (revision b71f52a9)
1
2#------------------------------------------------------------------------------
3# database:  file(1) magic for various databases
4#
5# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
6#
7#
8# GDBM magic numbers
9#  Will be maintained as part of the GDBM distribution in the future.
10#  <downsj@teeny.org>
110	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian
12!:mime	application/x-gdbm
130	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian
14!:mime	application/x-gdbm
150	string	GDBM		GNU dbm 2.x database
16!:mime	application/x-gdbm
17#
18# Berkeley DB
19#
20# Ian Darwin's file /etc/magic files: big/little-endian version.
21#
22# Hash 1.85/1.86 databases store metadata in network byte order.
23# Btree 1.85/1.86 databases store the metadata in host byte order.
24# Hash and Btree 2.X and later databases store the metadata in host byte order.
25
260	long	0x00061561	Berkeley DB
27!:mime	application/x-dbm
28>8	belong	4321
29>>4	belong	>2		1.86
30>>4	belong	<3		1.85
31>>4	belong	>0		(Hash, version %d, native byte-order)
32>8	belong	1234
33>>4	belong	>2		1.86
34>>4	belong	<3		1.85
35>>4	belong	>0		(Hash, version %d, little-endian)
36
370	belong	0x00061561	Berkeley DB
38>8	belong	4321
39>>4	belong	>2		1.86
40>>4	belong	<3		1.85
41>>4	belong	>0		(Hash, version %d, big-endian)
42>8	belong	1234
43>>4	belong	>2		1.86
44>>4	belong	<3		1.85
45>>4	belong	>0		(Hash, version %d, native byte-order)
46
470	long	0x00053162	Berkeley DB 1.85/1.86
48>4	long	>0		(Btree, version %d, native byte-order)
490	belong	0x00053162	Berkeley DB 1.85/1.86
50>4	belong	>0		(Btree, version %d, big-endian)
510	lelong	0x00053162	Berkeley DB 1.85/1.86
52>4	lelong	>0		(Btree, version %d, little-endian)
53
5412	long	0x00061561	Berkeley DB
55>16	long	>0		(Hash, version %d, native byte-order)
5612	belong	0x00061561	Berkeley DB
57>16	belong	>0		(Hash, version %d, big-endian)
5812	lelong	0x00061561	Berkeley DB
59>16	lelong	>0		(Hash, version %d, little-endian)
60
6112	long	0x00053162	Berkeley DB
62>16	long	>0		(Btree, version %d, native byte-order)
6312	belong	0x00053162	Berkeley DB
64>16	belong	>0		(Btree, version %d, big-endian)
6512	lelong	0x00053162	Berkeley DB
66>16	lelong	>0		(Btree, version %d, little-endian)
67
6812	long	0x00042253	Berkeley DB
69>16	long	>0		(Queue, version %d, native byte-order)
7012	belong	0x00042253	Berkeley DB
71>16	belong	>0		(Queue, version %d, big-endian)
7212	lelong	0x00042253	Berkeley DB
73>16	lelong	>0		(Queue, version %d, little-endian)
74
75# From Max Bowsher.
7612	long	0x00040988	Berkeley DB
77>16	long	>0		(Log, version %d, native byte-order)
7812	belong	0x00040988	Berkeley DB
79>16	belong	>0		(Log, version %d, big-endian)
8012	lelong	0x00040988	Berkeley DB
81>16	lelong	>0		(Log, version %d, little-endian)
82
83#
84#
85# Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
860	string	RRD		RRDTool DB
87>4	string	x		version %s
88#----------------------------------------------------------------------
89# ROOT: file(1) magic for ROOT databases
90#
910       string  root\0  ROOT file
92>4      belong  x       Version %d
93>33     belong  x       (Compression: %d)
94
95# XXX: Weak magic.
96# Alex Ott <ott@jet.msk.su>
97## Paradox file formats
98#2	  leshort	0x0800	Paradox
99#>0x39	  byte		3	v. 3.0
100#>0x39	  byte		4	v. 3.5
101#>0x39	  byte		9	v. 4.x
102#>0x39	  byte		10	v. 5.x
103#>0x39	  byte		11	v. 5.x
104#>0x39	  byte		12	v. 7.x
105#>>0x04	  byte		0	indexed .DB data file
106#>>0x04	  byte		1	primary index .PX file
107#>>0x04	  byte		2	non-indexed .DB data file
108#>>0x04	  byte		3	non-incrementing secondary index .Xnn file
109#>>0x04	  byte		4	secondary index .Ynn file
110#>>0x04	  byte		5	incrementing secondary index .Xnn file
111#>>0x04	  byte		6	non-incrementing secondary index .XGn file
112#>>0x04	  byte		7	secondary index .YGn file
113#>>>0x04	  byte		8	incrementing secondary index .XGn file
114
115## XBase database files
116#0      byte       0x02
117#>8     leshort	  >0
118#>>12   leshort    0	FoxBase
119#!:mime	application/x-dbf
120#>>>0x04	lelong		0		(no records)
121#>>>0x04	lelong		>0		(%ld records)
122#
123#0      byte       0x03
124#!:mime	application/x-dbf
125#>8     leshort	  >0
126#>>12   leshort    0	FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo
127#>>>0x04	lelong		0		(no records)
128#>>>0x04	lelong		>0		(%ld records)
129#
130#0      byte       0x04
131#!:mime	application/x-dbf
132#>8     leshort	  >0
133#>>12   leshort    0	dBASE IV no memo file
134#>>>0x04	lelong		0		(no records)
135#>>>0x04	lelong		>0		(%ld records)
136#
137#0      byte       0x05
138#!:mime	application/x-dbf
139#>8     leshort	  >0
140#>>12   leshort    0	dBASE V no memo file
141#>>>0x04	lelong		0		(no records)
142#>>>0x04	lelong		>0		(%ld records)
143#
144#0      byte       0x30
145#!:mime	application/x-dbf
146#>8     leshort	  >0
147#>>12   leshort    0	Visual FoxPro
148#>>>0x04	lelong		0		(no records)
149#>>>0x04	lelong		>0		(%ld records)
150#
151#0      byte       0x43
152#!:mime	application/x-dbf
153#>8     leshort	  >0
154#>>12   leshort    0	FlagShip with memo var size
155#>>>0x04	lelong		0		(no records)
156#>>>0x04	lelong		>0		(%ld records)
157#
158#0      byte       0x7b
159#!:mime	application/x-dbf
160#>8     leshort	  >0
161#>>12   leshort    0	dBASEIV with memo
162#>>>0x04	lelong		0		(no records)
163#>>>0x04	lelong		>0		(%ld records)
164#
165#0      byte       0x83
166#!:mime	application/x-dbf
167#>8     leshort	  >0
168#>>12   leshort    0	FoxBase+, dBaseIII+ with memo
169#>>>0x04	lelong		0		(no records)
170#>>>0x04	lelong		>0		(%ld records)
171#
172#0      byte       0x8b
173#!:mime	application/x-dbf
174#>8     leshort	  >0
175#>>12   leshort    0	dBaseIV with memo
176#>>>0x04	lelong		0		(no records)
177#>>>0x04	lelong		>0		(%ld records)
178#
179#0      byte       0x8e
180#!:mime	application/x-dbf
181#>8     leshort	  >0
182#>>12   leshort    0	dBaseIV with SQL Table
183#>>>0x04	lelong		0		(no records)
184#>>>0x04	lelong		>0		(%ld records)
185#
186#0      byte       0xb3
187#!:mime	application/x-dbf
188#>8     leshort	  >0
189#>>12   leshort    0	FlagShip with .dbt memo
190#>>>0x04	lelong		0		(no records)
191#>>>0x04	lelong		>0		(%ld records)
192#
193#0      byte       0xf5
194#!:mime	application/x-dbf
195#>8     leshort	  >0
196#>>12   leshort    0	FoxPro with memo
197#>>>0x04	lelong		0		(no records)
198#>>>0x04	lelong		>0		(%ld records)
199#
200#0	leshort		0x0006		DBase 3 index file
201
202# MS Access database
2034	string	Standard\ Jet\ DB	Microsoft Access Database
204!:mime	application/x-msaccess
205
206# TDB database from Samba et al - Martin Pool <mbp@samba.org>
2070	string	TDB\ file		TDB database
208>32	lelong	0x2601196D		version 6, little-endian
209>>36	lelong	x			hash size %d bytes
210
211# SE Linux policy database
2120       lelong  0xf97cff8c      SE Linux policy
213>16     lelong  x               v%d
214>20     lelong  1      MLS
215>24     lelong  x       %d symbols
216>28     lelong  x       %d ocons
217
218# ICE authority file data (Wolfram Kleff)
2192	string		ICE		ICE authority data
220
221# X11 Xauthority file (Wolfram Kleff)
22210	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22311	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22412	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22513	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22614	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22715	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22816	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
22917	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
23018	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
231
232# From: Maxime Henrion <mux@FreeBSD.org>
233# PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
2340	string		PGDMP		PostgreSQL custom database dump
235>5	byte		x		- v%d
236>6	byte		x		\b.%d
237>5	beshort		<0x101		\b-0
238>5	beshort		>0x100
239>>7	byte		x		\b-%d
240
241# Type: Advanced Data Format (ADF) database
242# URL:  http://www.grc.nasa.gov/WWW/cgns/adf/
243# From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
2440	string	@(#)ADF\ Database	CGNS Advanced Data Format
245
246# Tokyo Cabinet magic data
247# http://tokyocabinet.sourceforge.net/index.html
2480	string		ToKyO\ CaBiNeT\n	Tokyo Cabinet
249>14	string		x			\b (%s)
250>32	byte		0			\b, Hash
251!:mime	application/x-tokyocabinet-hash
252>32	byte		1			\b, B+ tree
253!:mime	application/x-tokyocabinet-btree
254>32	byte		2			\b, Fixed-length
255!:mime	application/x-tokyocabinet-fixed
256>32	byte		3			\b, Table
257!:mime	application/x-tokyocabinet-table
258>33	byte		&1			\b, [open]
259>33	byte		&2			\b, [fatal]
260>34	byte		x			\b, apow=%d
261>35	byte		x			\b, fpow=%d
262>36	byte		&0x01			\b, [large]
263>36	byte		&0x02			\b, [deflate]
264>36	byte		&0x04			\b, [bzip]
265>36	byte		&0x08			\b, [tcbs]
266>36	byte		&0x10			\b, [excodec]
267>40	lequad		x			\b, bnum=%lld
268>48	lequad		x			\b, rnum=%lld
269>56	lequad		x			\b, fsiz=%lld
270