2 #------------------------------------------------------------------------------
3 # database: file(1) magic for various databases
5 # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
9 # Will be maintained as part of the GDBM distribution in the future.
11 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
12 !:mime application/x-gdbm
13 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
14 !:mime application/x-gdbm
15 0 string GDBM GNU dbm 2.x database
16 !:mime application/x-gdbm
20 # Ian Darwin's file /etc/magic files: big/little-endian version.
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.
26 0 long 0x00061561 Berkeley DB
27 !:mime application/x-dbm
31 >>4 belong >0 (Hash, version %d, native byte-order)
35 >>4 belong >0 (Hash, version %d, little-endian)
37 0 belong 0x00061561 Berkeley DB
41 >>4 belong >0 (Hash, version %d, big-endian)
45 >>4 belong >0 (Hash, version %d, native byte-order)
47 0 long 0x00053162 Berkeley DB 1.85/1.86
48 >4 long >0 (Btree, version %d, native byte-order)
49 0 belong 0x00053162 Berkeley DB 1.85/1.86
50 >4 belong >0 (Btree, version %d, big-endian)
51 0 lelong 0x00053162 Berkeley DB 1.85/1.86
52 >4 lelong >0 (Btree, version %d, little-endian)
54 12 long 0x00061561 Berkeley DB
55 >16 long >0 (Hash, version %d, native byte-order)
56 12 belong 0x00061561 Berkeley DB
57 >16 belong >0 (Hash, version %d, big-endian)
58 12 lelong 0x00061561 Berkeley DB
59 >16 lelong >0 (Hash, version %d, little-endian)
61 12 long 0x00053162 Berkeley DB
62 >16 long >0 (Btree, version %d, native byte-order)
63 12 belong 0x00053162 Berkeley DB
64 >16 belong >0 (Btree, version %d, big-endian)
65 12 lelong 0x00053162 Berkeley DB
66 >16 lelong >0 (Btree, version %d, little-endian)
68 12 long 0x00042253 Berkeley DB
69 >16 long >0 (Queue, version %d, native byte-order)
70 12 belong 0x00042253 Berkeley DB
71 >16 belong >0 (Queue, version %d, big-endian)
72 12 lelong 0x00042253 Berkeley DB
73 >16 lelong >0 (Queue, version %d, little-endian)
76 12 long 0x00040988 Berkeley DB
77 >16 long >0 (Log, version %d, native byte-order)
78 12 belong 0x00040988 Berkeley DB
79 >16 belong >0 (Log, version %d, big-endian)
80 12 lelong 0x00040988 Berkeley DB
81 >16 lelong >0 (Log, version %d, little-endian)
85 # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
86 0 string RRD RRDTool DB
87 >4 string x version %s
88 #----------------------------------------------------------------------
89 # ROOT: file(1) magic for ROOT databases
91 0 string root\0 ROOT file
92 >4 belong x Version %d
93 >33 belong x (Compression: %d)
96 # Alex Ott <ott@jet.msk.su>
97 ## Paradox file formats
98 #2 leshort 0x0800 Paradox
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
115 ## XBase database files
118 #>>12 leshort 0 FoxBase
119 #!:mime application/x-dbf
120 #>>>0x04 lelong 0 (no records)
121 #>>>0x04 lelong >0 (%ld records)
124 #!:mime application/x-dbf
126 #>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo
127 #>>>0x04 lelong 0 (no records)
128 #>>>0x04 lelong >0 (%ld records)
131 #!:mime application/x-dbf
133 #>>12 leshort 0 dBASE IV no memo file
134 #>>>0x04 lelong 0 (no records)
135 #>>>0x04 lelong >0 (%ld records)
138 #!:mime application/x-dbf
140 #>>12 leshort 0 dBASE V no memo file
141 #>>>0x04 lelong 0 (no records)
142 #>>>0x04 lelong >0 (%ld records)
145 #!:mime application/x-dbf
147 #>>12 leshort 0 Visual FoxPro
148 #>>>0x04 lelong 0 (no records)
149 #>>>0x04 lelong >0 (%ld records)
152 #!:mime application/x-dbf
154 #>>12 leshort 0 FlagShip with memo var size
155 #>>>0x04 lelong 0 (no records)
156 #>>>0x04 lelong >0 (%ld records)
159 #!:mime application/x-dbf
161 #>>12 leshort 0 dBASEIV with memo
162 #>>>0x04 lelong 0 (no records)
163 #>>>0x04 lelong >0 (%ld records)
166 #!:mime application/x-dbf
168 #>>12 leshort 0 FoxBase+, dBaseIII+ with memo
169 #>>>0x04 lelong 0 (no records)
170 #>>>0x04 lelong >0 (%ld records)
173 #!:mime application/x-dbf
175 #>>12 leshort 0 dBaseIV with memo
176 #>>>0x04 lelong 0 (no records)
177 #>>>0x04 lelong >0 (%ld records)
180 #!:mime application/x-dbf
182 #>>12 leshort 0 dBaseIV with SQL Table
183 #>>>0x04 lelong 0 (no records)
184 #>>>0x04 lelong >0 (%ld records)
187 #!:mime application/x-dbf
189 #>>12 leshort 0 FlagShip with .dbt memo
190 #>>>0x04 lelong 0 (no records)
191 #>>>0x04 lelong >0 (%ld records)
194 #!:mime application/x-dbf
196 #>>12 leshort 0 FoxPro with memo
197 #>>>0x04 lelong 0 (no records)
198 #>>>0x04 lelong >0 (%ld records)
200 #0 leshort 0x0006 DBase 3 index file
203 4 string Standard\ Jet\ DB Microsoft Access Database
204 !:mime application/x-msaccess
206 # TDB database from Samba et al - Martin Pool <mbp@samba.org>
207 0 string TDB\ file TDB database
208 >32 lelong 0x2601196D version 6, little-endian
209 >>36 lelong x hash size %d bytes
211 # SE Linux policy database
212 0 lelong 0xf97cff8c SE Linux policy
215 >24 lelong x %d symbols
216 >28 lelong x %d ocons
218 # ICE authority file data (Wolfram Kleff)
219 2 string ICE ICE authority data
221 # X11 Xauthority file (Wolfram Kleff)
222 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
223 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
224 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
225 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
226 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
227 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
228 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
229 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
230 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
232 # From: Maxime Henrion <mux@FreeBSD.org>
233 # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
234 0 string PGDMP PostgreSQL custom database dump
237 >5 beshort <0x101 \b-0
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>
244 0 string @(#)ADF\ Database CGNS Advanced Data Format
246 # Tokyo Cabinet magic data
247 # http://tokyocabinet.sourceforge.net/index.html
248 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
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
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