xref: /dragonfly/contrib/file/magic/Magdir/database (revision 8af44722)
1
2#------------------------------------------------------------------------------
3# $File: database,v 1.56 2019/06/14 20:12:00 christos Exp $
4# database:  file(1) magic for various databases
5#
6# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
7#
8#
9# GDBM magic numbers
10#  Will be maintained as part of the GDBM distribution in the future.
11#  <downsj@teeny.org>
120	belong	0x13579acd	GNU dbm 1.x or ndbm database, big endian, 32-bit
13!:mime	application/x-gdbm
140	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian, old
15!:mime	application/x-gdbm
160	belong	0x13579acf	GNU dbm 1.x or ndbm database, big endian, 64-bit
17!:mime	application/x-gdbm
180	lelong	0x13579acd	GNU dbm 1.x or ndbm database, little endian, 32-bit
19!:mime	application/x-gdbm
200	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian, old
21!:mime	application/x-gdbm
220	lelong	0x13579acf	GNU dbm 1.x or ndbm database, little endian, 64-bit
23!:mime	application/x-gdbm
240	string	GDBM		GNU dbm 2.x database
25!:mime	application/x-gdbm
26#
27# Berkeley DB
28#
29# Ian Darwin's file /etc/magic files: big/little-endian version.
30#
31# Hash 1.85/1.86 databases store metadata in network byte order.
32# Btree 1.85/1.86 databases store the metadata in host byte order.
33# Hash and Btree 2.X and later databases store the metadata in host byte order.
34
350	long	0x00061561	Berkeley DB
36!:mime	application/x-dbm
37>8	belong	4321
38>>4	belong	>2		1.86
39>>4	belong	<3		1.85
40>>4	belong	>0		(Hash, version %d, native byte-order)
41>8	belong	1234
42>>4	belong	>2		1.86
43>>4	belong	<3		1.85
44>>4	belong	>0		(Hash, version %d, little-endian)
45
460	belong	0x00061561	Berkeley DB
47>8	belong	4321
48>>4	belong	>2		1.86
49>>4	belong	<3		1.85
50>>4	belong	>0		(Hash, version %d, big-endian)
51>8	belong	1234
52>>4	belong	>2		1.86
53>>4	belong	<3		1.85
54>>4	belong	>0		(Hash, version %d, native byte-order)
55
560	long	0x00053162	Berkeley DB 1.85/1.86
57>4	long	>0		(Btree, version %d, native byte-order)
580	belong	0x00053162	Berkeley DB 1.85/1.86
59>4	belong	>0		(Btree, version %d, big-endian)
600	lelong	0x00053162	Berkeley DB 1.85/1.86
61>4	lelong	>0		(Btree, version %d, little-endian)
62
6312	long	0x00061561	Berkeley DB
64>16	long	>0		(Hash, version %d, native byte-order)
6512	belong	0x00061561	Berkeley DB
66>16	belong	>0		(Hash, version %d, big-endian)
6712	lelong	0x00061561	Berkeley DB
68>16	lelong	>0		(Hash, version %d, little-endian)
69
7012	long	0x00053162	Berkeley DB
71>16	long	>0		(Btree, version %d, native byte-order)
7212	belong	0x00053162	Berkeley DB
73>16	belong	>0		(Btree, version %d, big-endian)
7412	lelong	0x00053162	Berkeley DB
75>16	lelong	>0		(Btree, version %d, little-endian)
76
7712	long	0x00042253	Berkeley DB
78>16	long	>0		(Queue, version %d, native byte-order)
7912	belong	0x00042253	Berkeley DB
80>16	belong	>0		(Queue, version %d, big-endian)
8112	lelong	0x00042253	Berkeley DB
82>16	lelong	>0		(Queue, version %d, little-endian)
83
84# From Max Bowsher.
8512	long	0x00040988	Berkeley DB
86>16	long	>0		(Log, version %d, native byte-order)
8712	belong	0x00040988	Berkeley DB
88>16	belong	>0		(Log, version %d, big-endian)
8912	lelong	0x00040988	Berkeley DB
90>16	lelong	>0		(Log, version %d, little-endian)
91
92#
93#
94# Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
950	string/b	RRD\0		RRDTool DB
96>4	string/b	x		version %s
97
98>>10	short		!0		16bit aligned
99>>>10	bedouble	8.642135e+130	big-endian
100>>>>18	short		x		32bit long (m68k)
101
102>>10	short		0
103>>>12	long		!0		32bit aligned
104>>>>12	bedouble	8.642135e+130	big-endian
105>>>>>20 long		0		64bit long
106>>>>>20 long		!0		32bit long
107>>>>12	ledouble	8.642135e+130	little-endian
108>>>>>24 long		0		64bit long
109>>>>>24 long		!0		32bit long (i386)
110>>>>12	string		\x43\x2b\x1f\x5b\x2f\x25\xc0\xc7	middle-endian
111>>>>>24 short		!0		32bit long (arm)
112
113>>8	quad		0		64bit aligned
114>>>16	bedouble	8.642135e+130	big-endian
115>>>>24	long		0		64bit long (s390x)
116>>>>24	long		!0		32bit long (hppa/mips/ppc/s390/SPARC)
117>>>16	ledouble	8.642135e+130	little-endian
118>>>>28	long		0		64bit long (alpha/amd64/ia64)
119>>>>28	long		!0		32bit long (armel/mipsel)
120
121#----------------------------------------------------------------------
122# ROOT: file(1) magic for ROOT databases
123#
1240       string  root\0  ROOT file
125>4      belong  x       Version %d
126>33     belong  x       (Compression: %d)
127
128# XXX: Weak magic.
129# Alex Ott <ott@jet.msk.su>
130## Paradox file formats
131#2	  leshort	0x0800	Paradox
132#>0x39	  byte		3	v. 3.0
133#>0x39	  byte		4	v. 3.5
134#>0x39	  byte		9	v. 4.x
135#>0x39	  byte		10	v. 5.x
136#>0x39	  byte		11	v. 5.x
137#>0x39	  byte		12	v. 7.x
138#>>0x04	  byte		0	indexed .DB data file
139#>>0x04	  byte		1	primary index .PX file
140#>>0x04	  byte		2	non-indexed .DB data file
141#>>0x04	  byte		3	non-incrementing secondary index .Xnn file
142#>>0x04	  byte		4	secondary index .Ynn file
143#>>0x04	  byte		5	incrementing secondary index .Xnn file
144#>>0x04	  byte		6	non-incrementing secondary index .XGn file
145#>>0x04	  byte		7	secondary index .YGn file
146#>>>0x04	  byte		8	incrementing secondary index .XGn file
147
148## XBase database files
149# updated by Joerg Jenderek at Feb 2013
150# https://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
151# https://www.clicketyclick.dk/databases/xbase/format/dbf.html
152# inspect VVYYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
1530	ubelong&0x0000FFFF		<0x00000C20
154# skip Infocom game Z-machine
155>2		ubyte			>0
156# skip Androids *.xml
157>>3		ubyte			>0
158>>>3		ubyte			<32
159# 1 < version VV
160>>>>0		ubyte			>1
161# skip HELP.CA3 by test for reserved byte ( NULL )
162>>>>>27		ubyte			0
163# reserved bytes not always 0 ; also found 0x3901 (T4.DBF) ,0x7101 (T5.DBF,T6.DBF)
164#>>>>>30		ubeshort     		x		30NULL?%x
165# possible production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
166>>>>>>24	ubelong&0xffFFFFff	>0x01302000
167# .DBF or .MDX
168>>>>>>24	ubelong&0xffFFFFff	<0x01302001
169# for Xbase Database file (*.DBF) reserved (NULL) for multi-user
170>>>>>>>24	ubelong&0xffFFFFff	=0
171# test for 2 reserved NULL bytes,transaction and encryption byte flag
172>>>>>>>>12	ubelong&0xFFFFfEfE	0
173# test for MDX flag
174>>>>>>>>>28	ubyte			x
175>>>>>>>>>28	ubyte&0xf8		0
176# header size >= 32
177>>>>>>>>>>8	uleshort		>31
178# skip PIC15736.PCX by test for language driver name or field name
179>>>>>>>>>>>32	ubyte			>0
180#!:mime	application/x-dbf; charset=unknown-8bit ??
181#!:mime	application/x-dbase
182>>>>>>>>>>>>0	use			xbase-type
183# database file
184>>>>>>>>>>>>0	ubyte			x		\b DBF
185>>>>>>>>>>>>4	lelong			0		\b, no records
186>>>>>>>>>>>>4	lelong			>0		\b, %d record
187# plural s appended
188>>>>>>>>>>>>>4	lelong			>1		\bs
189# https://www.clicketyclick.dk/databases/xbase/format/dbf_check.html#CHECK_DBF
190# 1 <= record size <= 4000 (dBase 3,4) or 32 * KB (=0x8000)
191>>>>>>>>>>>>10	uleshort		x		* %d
192# file size = records * record size + header size
193>>>>>>>>>>>>1	ubyte			x		\b, update-date
194>>>>>>>>>>>>1	use			xbase-date
195# https://msdn.microsoft.com/de-de/library/cc483186(v=vs.71).aspx
196#>>>>>>>>>>>>29	ubyte			=0		\b, codepage ID=0x%x
197# 2~cp850 , 3~cp1252 , 0x1b~?? ; what code page is 0x1b ?
198>>>>>>>>>>>>29	ubyte			>0		\b, codepage ID=0x%x
199#>>>>>>>>>>>>28	ubyte&0x01		0		\b, no index file
200>>>>>>>>>>>>28	ubyte&0x01		1		\b, with index file .MDX
201>>>>>>>>>>>>28	ubyte&0x02		2		\b, with memo .FPT
202>>>>>>>>>>>>28	ubyte&0x04		4		\b, DataBaseContainer
203# 1st record offset + 1 = header size
204>>>>>>>>>>>>8	uleshort		>0
205>>>>>>>>>>>>(8.s+1)	ubyte		>0
206>>>>>>>>>>>>>8		uleshort	>0		\b, at offset %d
207>>>>>>>>>>>>>(8.s+1)	ubyte		>0
208>>>>>>>>>>>>>>&-1	string		>\0		1st record "%s"
209# for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
210>>>>>>>24	ubelong&0x0133f7ff	>0
211# test for reserved NULL byte
212>>>>>>>>47	ubyte			0
213# test for valid TAG key format (0x10 or 0)
214>>>>>>>>>559	ubyte&0xeF		0
215# test MM <= 12
216>>>>>>>>>>45	ubeshort		<0x0C20
217>>>>>>>>>>>45	ubyte			>0
218>>>>>>>>>>>>46	ubyte			<32
219>>>>>>>>>>>>>46	ubyte			>0
220#!:mime	application/x-mdx
221>>>>>>>>>>>>>>0		use		xbase-type
222>>>>>>>>>>>>>>0		ubyte		x		\b MDX
223>>>>>>>>>>>>>>1		ubyte		x		\b, creation-date
224>>>>>>>>>>>>>>1		use		xbase-date
225>>>>>>>>>>>>>>44	ubyte		x		\b, update-date
226>>>>>>>>>>>>>>44	use		xbase-date
227# No.of tags in use (1,2,5,12)
228>>>>>>>>>>>>>>28	uleshort	x		\b, %d
229# No. of entries in tag (0x30)
230>>>>>>>>>>>>>>25	ubyte		x		\b/%d tags
231#  Length of tag
232>>>>>>>>>>>>>>26	ubyte		x		* %d
233# 1st tag name_
234>>>>>>>>>>>>>548	string		x		\b, 1st tag "%.11s"
235# 2nd tag name
236#>>>>>>>>>>>>(26.b+548)	string		x		\b, 2nd tag "%.11s"
237#
238#		Print the xBase names of different version variants
2390	name				xbase-type
240>0	ubyte		<2
241# 1 < version
242>0	ubyte		>1
243>>0	ubyte		0x02		FoxBase
244# FoxBase+/dBaseIII+, no memo
245>>0	ubyte		0x03		FoxBase+/dBase III
246!:mime	application/x-dbf
247# dBASE IV no memo file
248>>0	ubyte		0x04		dBase IV
249!:mime	application/x-dbf
250# dBASE V no memo file
251>>0	ubyte		0x05		dBase V
252!:mime	application/x-dbf
253>>0	ubyte		0x30		Visual FoxPro
254!:mime	application/x-dbf
255>>0	ubyte		0x31		Visual FoxPro, autoincrement
256!:mime	application/x-dbf
257# Visual FoxPro, with field type Varchar or Varbinary
258>>0	ubyte		0x32		Visual FoxPro, with field type Varchar
259!:mime	application/x-dbf
260# dBASE IV SQL, no memo;dbv memo var size (Flagship)
261>>0	ubyte		0x43		dBase IV, with SQL table
262!:mime	application/x-dbf
263# https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
264#>>0	ubyte		0x62		dBase IV, with SQL table
265#!:mime	application/x-dbf
266# dBASE IV, with memo!!
267>>0	ubyte		0x7b		dBase IV, with memo
268!:mime	application/x-dbf
269# https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
270#>>0	ubyte		0x82		dBase IV, with SQL system
271#!:mime	application/x-dbf
272# FoxBase+/dBaseIII+ with memo .DBT!
273>>0	ubyte		0x83		FoxBase+/dBase III, with memo .DBT
274!:mime	application/x-dbf
275# VISUAL OBJECTS (first 1.0 versions) for the Dbase III files (NTX clipper driver); memo file
276>>0	ubyte		0x87		VISUAL OBJECTS, with memo file
277!:mime	application/x-dbf
278# https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
279#>>0	ubyte		0x8A		FoxBase+/dBase III, with memo .DBT
280#!:mime	application/x-dbf
281# dBASE IV with memo!
282>>0	ubyte		0x8B		dBase IV, with memo .DBT
283!:mime	application/x-dbf
284# dBase IV with SQL Table,no memo?
285>>0	ubyte		0x8E		dBase IV, with SQL table
286!:mime	application/x-dbf
287# .dbv and .dbt memo (Flagship)?
288>>0	ubyte		0xB3		Flagship
289# https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
290#>>0	ubyte		0xCA		dBase IV with memo .DBT
291#!:mime	application/x-dbf
292# dBASE IV with SQL table, with memo .DBT
293>>0	ubyte		0xCB		dBase IV with SQL table, with memo .DBT
294!:mime	application/x-dbf
295# HiPer-Six format;Clipper SIX, with SMT memo file
296>>0	ubyte		0xE5		Clipper SIX with memo
297!:mime	application/x-dbf
298# https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
299#>>0	ubyte		0xF4		dBase IV, with SQL table, with memo
300#!:mime	application/x-dbf
301>>0	ubyte		0xF5		FoxPro with memo
302!:mime	application/x-dbf
303# https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
304#>>0	ubyte		0xFA		FoxPro 2.x, with memo
305#!:mime	application/x-dbf
306# unknown version (should not happen)
307>>0	default		x		xBase
308!:mime	application/x-dbf
309>>>0	ubyte		x		(0x%x)
310# flags in version byte
311# DBT flag (with dBASE III memo .DBT)!!
312# >>0	ubyte&0x80	>0		DBT_FLAG=%x
313# memo flag ??
314# >>0	ubyte&0x08	>0		MEMO_FLAG=%x
315# SQL flag ??
316# >>0	ubyte&0x70	>0		SQL_FLAG=%x
317#		test and print the date of xBase .DBF .MDX
3180	name				xbase-date
319# inspect YYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
320>0	ubelong		x
321>1	ubyte		<13
322>>1	ubyte		>0
323>>>2	ubyte		>0
324>>>>2	ubyte		<32
325>>>>>0	ubyte		x
326# YY is interpreted as 20YY or 19YY
327>>>>>>0	ubyte		<100		\b %.2d
328# YY is interpreted 1900+YY; TODO: display yy or 20yy instead 1YY
329>>>>>>0	ubyte		>99		\b %d
330>>>>>1	ubyte		x		\b-%d
331>>>>>2	ubyte		x		\b-%d
332
333#	dBase memo files .DBT or .FPT
334# https://msdn.microsoft.com/en-us/library/8599s21w(v=vs.80).aspx
33516		ubyte		<4
336>16		ubyte		!2
337>>16		ubyte		!1
338# next free block index is positive
339>>>0		ulelong		>0
340# skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size
341>>>>17		ubelong&0xFFfdFEff	0x00000000
342# skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h
343>>>>>20		ubelong&0xFF01209B	0x00000000
344# dBASE III
345>>>>>>16	ubyte		3
346# dBASE III DBT
347>>>>>>>0	use		dbase3-memo-print
348# dBASE III DBT without version, dBASE IV DBT , FoxPro FPT , or many ZIP , DBF garbage
349>>>>>>16	ubyte		0
350# unusual dBASE III DBT like angest.dbt, dBASE IV DBT with block size 0 , FoxPro FPT ,  or garbage PCX DBF
351>>>>>>>20	uleshort	0
352# FoxPro FPT , unusual dBASE III DBT like biblio.dbt or garbage
353>>>>>>>>8	ulong		=0
354>>>>>>>>>6	ubeshort	>0
355# skip emacs.PIF
356>>>>>>>>>>4	ushort		0
357# check for valid FoxPro field type
358>>>>>>>>>>>512	ubelong		<3
359>>>>>>>>>>>>0	use		foxpro-memo-print
360# dBASE III DBT , garbage
361# skip WORD1XW.DOC with improbably high free block index
362>>>>>>>>>0	lelong		<2205083
363# unusual dBASE III DBT like adressen.dbt
364>>>>>>>>>>0	use		dbase3-memo-print
365# dBASE III DBT like angest.dbt, or garbage PCX DBF
366>>>>>>>>8	ubelong		!0
367# skip PCX and some DBF by test for for reserved NULL bytes
368>>>>>>>>>510	ubeshort	0
369# skip AI070GEP.EPS with improbably high free block index
370>>>>>>>>>>0	lelong		<458766
371>>>>>>>>>>>0	use		dbase3-memo-print
372# dBASE IV DBT with positive block size
373>>>>>>>20	uleshort	>0
374# dBASE IV DBT with valid block length like 512, 1024
375# multiple of 2 in between 16 and 16 K ,implies upper and lower bits are zero
376# skip also 3600h 3E00h size
377>>>>>>>>20	uleshort&0xE00f	0
378>>>>>>>>>0	use		dbase4-memo-print
379
380#		Print the information of dBase III DBT memo file
3810	name				dbase3-memo-print
382>0	ubyte			x		dBase III DBT
383!:mime	application/x-dbt
384!:ext	dbt
385# instead 3 as version number 0 for unusual examples like biblio.dbt
386>16	ubyte			!3		\b, version number %u
387# Number of next available block for appending data
388#>0	lelong			=0		\b, next free block index %u
389>0	lelong			!0		\b, next free block index %u
390# no positiv block length
391#>20	uleshort		=0		\b, block length %u
392>20	uleshort		!0		\b, block length %u
393# dBase III memo field terminated by \032\032
394>512	string			>\0		\b, 1st item "%s"
395# https://www.clicketyclick.dk/databases/xbase/format/dbt.html
396#		Print the information of dBase IV DBT memo file
3970	name				dbase4-memo-print
398>0		lelong		x		dBase IV DBT
399!:mime	application/x-dbt
400!:ext dbt
401# 8 character shorted main name of coresponding dBASE IV DBF file
402>8		ubelong		>0x20000000
403# skip unusual like for angest.dbt
404>>20		uleshort	>0
405>>>8		string		>\0		\b of %-.8s.DBF
406# value 0 implies 512 as size
407#>4		ulelong		=0		\b, blocks size %u
408# size of blocks not reliable like 0x2020204C in angest.dbt
409>4		ulelong		!0
410>>4		ulelong&0x0000003f	0	\b, blocks size %u
411# dBase IV DBT with positive block length (found 512 , 1024)
412>20		uleshort	>0		\b, block length %u
413# next available block
414#>0		lelong		=0		\b, next free block index %u
415>0		lelong		!0		\b, next free block index %u
416>20		uleshort	>0
417>>(20.s)	ubelong		x
418>>>&-4		use		dbase4-memofield-print
419# unusual dBase IV DBT without block length (implies 512 as length)
420>20		uleshort	=0
421>>512		ubelong		x
422>>>&-4		use				dbase4-memofield-print
423#		Print the information of dBase IV memo field
4240	name			dbase4-memofield-print
425# free dBase IV memo field
426>0		ubelong		!0xFFFF0800
427>>0		lelong		x		\b, next free block %u
428>>4		lelong		x		\b, next used block %u
429# used dBase IV memo field
430>0		ubelong		=0xFFFF0800
431# length of memo field
432>>4		lelong		x		\b, field length %d
433>>>8		string		>\0		\b, 1st used item "%s"
434# http://www.dbfree.org/webdocs/1-documentation/0018-developers_stuff_(advanced)/os_related_stuff/xbase_file_format.htm
435#		Print the information of FoxPro FPT memo file
4360	name				foxpro-memo-print
437>0		belong		x		FoxPro FPT
438!:mime	application/x-fpt
439!:ext	fpt
440# Size of blocks for FoxPro ( 64,256 )
441>6		ubeshort	x		\b, blocks size %u
442# next available block
443#>0		belong		=0		\b, next free block index %u
444>0		belong		!0		\b, next free block index %u
445# field type ( 0~picture, 1~memo, 2~object )
446>512		ubelong		<3		\b, field type %u
447# length of memo field
448>512		ubelong		1
449>>516		belong		>0		\b, field length %d
450>>>520		string		>\0		\b, 1st item "%s"
451
452# TODO:
453# DBASE index file *.NDX
454# DBASE Compound Index file *.CDX
455# dBASE IV Printer Driver *.PRF
456## End of XBase database stuff
457
458# MS Access database
4594	string	Standard\ Jet\ DB	Microsoft Access Database
460!:mime	application/x-msaccess
4614	string	Standard\ ACE\ DB	Microsoft Access Database
462!:mime	application/x-msaccess
463
464# From: Joerg Jenderek
465# URL: http://fileformats.archiveteam.org/wiki/Extensible_Storage_Engine
466# Reference: https://github.com/libyal/libesedb/archive/master.zip
467#	libesedb-master/documentation/
468#	Extensible Storage Engine (ESE) Database File (EDB) format.asciidoc
469# Note: also known as "JET Blue". Used by numerous Windows components such as
470# Windows Search, Mail, Exchange and Active Directory.
4714	ubelong		0xefcdab89
472# unknown1
473>132	ubelong		0		Extensible storage engine
474!:mime	application/x-ms-ese
475# file_type 0~database 1~stream
476>>12	ulelong		0		DataBase
477# Security DataBase (sdb)
478!:ext	edb/sdb
479>>12	ulelong		1		STreaMing
480!:ext	stm
481# format_version 620h
482>>8	uleshort	x		\b, version 0x%x
483>>10	uleshort	>0		revision 0x%4.4x
484>>0	ubelong		x	 	\b, checksum 0x%8.8x
485# Page size 4096 8192 32768
486>>236	ulequad		x		\b, page size %lld
487# database_state
488>>52	ulelong		1		\b, JustCreated
489>>52	ulelong		2		\b, DirtyShutdown
490#>>52	ulelong		3		\b, CleanShutdown
491>>52	ulelong		4		\b, BeingConverted
492>>52	ulelong		5		\b, ForceDetach
493# Windows�NT major version when the databases indexes were updated.
494>>216	ulelong		x		\b, Windows version %d
495# Windows�NT minor version
496>>220	ulelong		x		\b.%d
497
498# From: Joerg Jenderek
499# URL: https://forensicswiki.org/wiki/Windows_Application_Compatibility
500# Note: files contain application compatibility fixes, application compatibility modes and application help messages.
5018	string		sdbf
502>7	ubyte		0
503# TAG_TYPE_LIST+TAG_INDEXES
504>>12	uleshort	0x7802		Windows application compatibility Shim DataBase
505# version? 2 3
506#>>>0	ulelong		x		\b, version %d
507!:mime	application/x-ms-sdb
508!:ext	sdb
509
510# TDB database from Samba et al - Martin Pool <mbp@samba.org>
5110	string	TDB\ file		TDB database
512>32	lelong	0x2601196D		version 6, little-endian
513>>36	lelong	x			hash size %d bytes
514
515# SE Linux policy database
5160       lelong  0xf97cff8c      SE Linux policy
517>16     lelong  x               v%d
518>20     lelong  1      MLS
519>24     lelong  x       %d symbols
520>28     lelong  x       %d ocons
521
522# ICE authority file data (Wolfram Kleff)
5232	string		ICE		ICE authority data
524
525# X11 Xauthority file (Wolfram Kleff)
52610	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
52711	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
52812	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
52913	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
53014	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
53115	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
53216	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
53317	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
53418	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
535
536# From: Maxime Henrion <mux@FreeBSD.org>
537# PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
5380	string		PGDMP		PostgreSQL custom database dump
539>5	byte		x		- v%d
540>6	byte		x		\b.%d
541>5	beshort		<0x101		\b-0
542>5	beshort		>0x100
543>>7	byte		x		\b-%d
544
545# Type: Advanced Data Format (ADF) database
546# URL:  https://www.grc.nasa.gov/WWW/cgns/adf/
547# From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
5480	string	@(#)ADF\ Database	CGNS Advanced Data Format
549
550# Tokyo Cabinet magic data
551# http://tokyocabinet.sourceforge.net/index.html
5520	string		ToKyO\ CaBiNeT\n	Tokyo Cabinet
553>14	string		x			\b (%s)
554>32	byte		0			\b, Hash
555!:mime	application/x-tokyocabinet-hash
556>32	byte		1			\b, B+ tree
557!:mime	application/x-tokyocabinet-btree
558>32	byte		2			\b, Fixed-length
559!:mime	application/x-tokyocabinet-fixed
560>32	byte		3			\b, Table
561!:mime	application/x-tokyocabinet-table
562>33	byte		&1			\b, [open]
563>33	byte		&2			\b, [fatal]
564>34	byte		x			\b, apow=%d
565>35	byte		x			\b, fpow=%d
566>36	byte		&0x01			\b, [large]
567>36	byte		&0x02			\b, [deflate]
568>36	byte		&0x04			\b, [bzip]
569>36	byte		&0x08			\b, [tcbs]
570>36	byte		&0x10			\b, [excodec]
571>40	lequad		x			\b, bnum=%lld
572>48	lequad		x			\b, rnum=%lld
573>56	lequad		x			\b, fsiz=%lld
574
575# Type:	QDBM Quick Database Manager
576# From:	Benoit Sibaud <bsibaud@april.org>
5770	string		\\[depot\\]\n\f		Quick Database Manager, little endian
5780	string		\\[DEPOT\\]\n\f		Quick Database Manager, big endian
579
580# Type:	TokyoCabinet database
581# URL:	http://tokyocabinet.sourceforge.net/
582# From:	Benoit Sibaud <bsibaud@april.org>
5830	string		ToKyO\ CaBiNeT\n	TokyoCabinet database
584>14	string		x			(version %s)
585
586# From:  Stephane Blondon https://www.yaal.fr
587# Database file for Zope (done by FileStorage)
5880	string	FS21	Zope Object Database File Storage v3 (data)
5890	string	FS30	Zope Object Database File Storage v4 (data)
590
591# Cache file for the database of Zope (done by ClientStorage)
5920	string		ZEC3	Zope Object Database Client Cache File (data)
593
594# IDA (Interactive Disassembler) database
5950	string		IDA1	IDA (Interactive Disassembler) database
596
597# Hopper (reverse engineering tool) https://www.hopperapp.com/
5980	string		hopperdb	Hopper database
599
600# URL: https://en.wikipedia.org/wiki/Panorama_(database_engine)
601# Reference: http://www.provue.com/Panorama/
602# From: Joerg Jenderek
603# NOTE: test only versions 4 and 6.0 with Windows
604# length of Panorama database name
6055	ubyte				>0
606# look after database name for "some" null bits
607>(5.B+7)	ubelong&0xF3ffF000	0
608# look for first keyword
609>>&1		search/2		DESIGN		Panorama database
610#!:mime	application/x-panorama-database
611!:apple	KASXZEPD
612!:ext	pan
613# database name
614>>>5	pstring				x		\b, "%s"
615
616#
617#
618# askSam Database by Stefan A. Haubenthal <polluks@web.de>
6190	string	askw40\0	askSam DB
620
621#
622#
623# MUIbase Database Tool by Stefan A. Haubenthal <polluks@web.de>
6240	string	MBSTV\040	MUIbase DB
625>6	string	x		version %s
626
627#
628# CDB database
6290	string	NBCDB\012	NetBSD Constant Database
630>7	byte	x		\b, version %d
631>8	string	x		\b, for '%s'
632>24	lelong	x		\b, datasize %d
633>28	lelong	x		\b, entries %d
634>32	lelong	x		\b, index %d
635>36	lelong	x		\b, seed %#x
636
637#
638# Redis RDB - https://redis.io/topics/persistence
6390	string	REDIS			Redis RDB file,
640>5	regex	[0-9][0-9][0-9][0-9]	version %s
641
642# Mork database.
643# Used by older versions of Mozilla Suite and Firefox,
644# and current versions of Thunderbird.
645# From: David Korth <gerbilsoft@gerbilsoft.com>
6460	string	//\ <!--\ <mdb:mork:z\ v="	Mozilla Mork database
647>23	string	x		\b, version %.3s
648