2 #------------------------------------------------------------------------------
3 # $File: database,v 1.28 2011/09/16 19:40:40 christos Exp $
4 # database: file(1) magic for various databases
6 # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
10 # Will be maintained as part of the GDBM distribution in the future.
12 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
13 !:mime application/x-gdbm
14 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
15 !:mime application/x-gdbm
16 0 string GDBM GNU dbm 2.x database
17 !:mime application/x-gdbm
21 # Ian Darwin's file /etc/magic files: big/little-endian version.
23 # Hash 1.85/1.86 databases store metadata in network byte order.
24 # Btree 1.85/1.86 databases store the metadata in host byte order.
25 # Hash and Btree 2.X and later databases store the metadata in host byte order.
27 0 long 0x00061561 Berkeley DB
28 !:mime application/x-dbm
32 >>4 belong >0 (Hash, version %d, native byte-order)
36 >>4 belong >0 (Hash, version %d, little-endian)
38 0 belong 0x00061561 Berkeley DB
42 >>4 belong >0 (Hash, version %d, big-endian)
46 >>4 belong >0 (Hash, version %d, native byte-order)
48 0 long 0x00053162 Berkeley DB 1.85/1.86
49 >4 long >0 (Btree, version %d, native byte-order)
50 0 belong 0x00053162 Berkeley DB 1.85/1.86
51 >4 belong >0 (Btree, version %d, big-endian)
52 0 lelong 0x00053162 Berkeley DB 1.85/1.86
53 >4 lelong >0 (Btree, version %d, little-endian)
55 12 long 0x00061561 Berkeley DB
56 >16 long >0 (Hash, version %d, native byte-order)
57 12 belong 0x00061561 Berkeley DB
58 >16 belong >0 (Hash, version %d, big-endian)
59 12 lelong 0x00061561 Berkeley DB
60 >16 lelong >0 (Hash, version %d, little-endian)
62 12 long 0x00053162 Berkeley DB
63 >16 long >0 (Btree, version %d, native byte-order)
64 12 belong 0x00053162 Berkeley DB
65 >16 belong >0 (Btree, version %d, big-endian)
66 12 lelong 0x00053162 Berkeley DB
67 >16 lelong >0 (Btree, version %d, little-endian)
69 12 long 0x00042253 Berkeley DB
70 >16 long >0 (Queue, version %d, native byte-order)
71 12 belong 0x00042253 Berkeley DB
72 >16 belong >0 (Queue, version %d, big-endian)
73 12 lelong 0x00042253 Berkeley DB
74 >16 lelong >0 (Queue, version %d, little-endian)
77 12 long 0x00040988 Berkeley DB
78 >16 long >0 (Log, version %d, native byte-order)
79 12 belong 0x00040988 Berkeley DB
80 >16 belong >0 (Log, version %d, big-endian)
81 12 lelong 0x00040988 Berkeley DB
82 >16 lelong >0 (Log, version %d, little-endian)
86 # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
87 0 string RRD RRDTool DB
88 >4 string x version %s
89 #----------------------------------------------------------------------
90 # ROOT: file(1) magic for ROOT databases
92 0 string root\0 ROOT file
93 >4 belong x Version %d
94 >33 belong x (Compression: %d)
97 # Alex Ott <ott@jet.msk.su>
98 ## Paradox file formats
99 #2 leshort 0x0800 Paradox
103 #>0x39 byte 10 v. 5.x
104 #>0x39 byte 11 v. 5.x
105 #>0x39 byte 12 v. 7.x
106 #>>0x04 byte 0 indexed .DB data file
107 #>>0x04 byte 1 primary index .PX file
108 #>>0x04 byte 2 non-indexed .DB data file
109 #>>0x04 byte 3 non-incrementing secondary index .Xnn file
110 #>>0x04 byte 4 secondary index .Ynn file
111 #>>0x04 byte 5 incrementing secondary index .Xnn file
112 #>>0x04 byte 6 non-incrementing secondary index .XGn file
113 #>>0x04 byte 7 secondary index .YGn file
114 #>>>0x04 byte 8 incrementing secondary index .XGn file
116 ## XBase database files
119 #>>12 leshort 0 FoxBase
120 #!:mime application/x-dbf
121 #>>>0x04 lelong 0 (no records)
122 #>>>0x04 lelong >0 (%ld records)
125 #!:mime application/x-dbf
127 #>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo
128 #>>>0x04 lelong 0 (no records)
129 #>>>0x04 lelong >0 (%ld records)
132 #!:mime application/x-dbf
134 #>>12 leshort 0 dBASE IV no memo file
135 #>>>0x04 lelong 0 (no records)
136 #>>>0x04 lelong >0 (%ld records)
139 #!:mime application/x-dbf
141 #>>12 leshort 0 dBASE V no memo file
142 #>>>0x04 lelong 0 (no records)
143 #>>>0x04 lelong >0 (%ld records)
146 #!:mime application/x-dbf
148 #>>12 leshort 0 Visual FoxPro
149 #>>>0x04 lelong 0 (no records)
150 #>>>0x04 lelong >0 (%ld records)
153 #!:mime application/x-dbf
155 #>>12 leshort 0 FlagShip with memo var size
156 #>>>0x04 lelong 0 (no records)
157 #>>>0x04 lelong >0 (%ld records)
160 #!:mime application/x-dbf
162 #>>12 leshort 0 dBASEIV with memo
163 #>>>0x04 lelong 0 (no records)
164 #>>>0x04 lelong >0 (%ld records)
167 #!:mime application/x-dbf
169 #>>12 leshort 0 FoxBase+, dBaseIII+ with memo
170 #>>>0x04 lelong 0 (no records)
171 #>>>0x04 lelong >0 (%ld records)
174 #!:mime application/x-dbf
176 #>>12 leshort 0 dBaseIV with memo
177 #>>>0x04 lelong 0 (no records)
178 #>>>0x04 lelong >0 (%ld records)
181 #!:mime application/x-dbf
183 #>>12 leshort 0 dBaseIV with SQL Table
184 #>>>0x04 lelong 0 (no records)
185 #>>>0x04 lelong >0 (%ld records)
188 #!:mime application/x-dbf
190 #>>12 leshort 0 FlagShip with .dbt memo
191 #>>>0x04 lelong 0 (no records)
192 #>>>0x04 lelong >0 (%ld records)
195 #!:mime application/x-dbf
197 #>>12 leshort 0 FoxPro with memo
198 #>>>0x04 lelong 0 (no records)
199 #>>>0x04 lelong >0 (%ld records)
201 #0 leshort 0x0006 DBase 3 index file
204 4 string Standard\ Jet\ DB Microsoft Access Database
205 !:mime application/x-msaccess
207 # TDB database from Samba et al - Martin Pool <mbp@samba.org>
208 0 string TDB\ file TDB database
209 >32 lelong 0x2601196D version 6, little-endian
210 >>36 lelong x hash size %d bytes
212 # SE Linux policy database
213 0 lelong 0xf97cff8c SE Linux policy
216 >24 lelong x %d symbols
217 >28 lelong x %d ocons
219 # ICE authority file data (Wolfram Kleff)
220 2 string ICE ICE authority data
222 # X11 Xauthority file (Wolfram Kleff)
223 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
224 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
225 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
226 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
227 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
228 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
229 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
230 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
231 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
233 # From: Maxime Henrion <mux@FreeBSD.org>
234 # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
235 0 string PGDMP PostgreSQL custom database dump
238 >5 beshort <0x101 \b-0
242 # Type: Advanced Data Format (ADF) database
243 # URL: http://www.grc.nasa.gov/WWW/cgns/adf/
244 # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
245 0 string @(#)ADF\ Database CGNS Advanced Data Format
247 # Tokyo Cabinet magic data
248 # http://tokyocabinet.sourceforge.net/index.html
249 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
252 !:mime application/x-tokyocabinet-hash
253 >32 byte 1 \b, B+ tree
254 !:mime application/x-tokyocabinet-btree
255 >32 byte 2 \b, Fixed-length
256 !:mime application/x-tokyocabinet-fixed
258 !:mime application/x-tokyocabinet-table
259 >33 byte &1 \b, [open]
260 >33 byte &2 \b, [fatal]
261 >34 byte x \b, apow=%d
262 >35 byte x \b, fpow=%d
263 >36 byte &0x01 \b, [large]
264 >36 byte &0x02 \b, [deflate]
265 >36 byte &0x04 \b, [bzip]
266 >36 byte &0x08 \b, [tcbs]
267 >36 byte &0x10 \b, [excodec]
268 >40 lequad x \b, bnum=%lld
269 >48 lequad x \b, rnum=%lld
270 >56 lequad x \b, fsiz=%lld
272 # G-IR database made by gobject-introspect toolset,
273 # http://live.gnome.org/GObjectIntrospection
274 0 string GOBJ\nMETADATA\r\n\032 G-IR binary database
277 >20 leshort x \b, %d entries
278 >22 leshort x \b/%d local
280 # Type: QDBM Quick Database Manager
281 # From: Benoit Sibaud <bsibaud@april.org>
282 0 string \\[depot\\]\n\f Quick Database Manager, little endian
283 0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
285 # Type: TokyoCabinet database
286 # URL: http://tokyocabinet.sourceforge.net/
287 # From: Benoit Sibaud <bsibaud@april.org>
288 0 string ToKyO\ CaBiNeT\n TokyoCabinet database
289 >14 string x (version %s)
291 # From: Stéphane Blondon http://www.yaal.fr
292 # Database file for Zope (done by FileStorage)
293 0 string FS21 Zope Object Database File Storage (data)
294 # Cache file for the database of Zope (done by ClientStorage)
295 0 string ZEC3 Zope Object Database Client Cache File (data)