xref: /freebsd/contrib/file/magic/Magdir/database (revision a4d6d3b8910f3805eebcd8703e11e066aad2e2a1)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*a4d6d3b8SXin LI# $File: database,v 1.66 2022/02/26 17:42:21 christos Exp $
4b6cee71dSXin LI# database:  file(1) magic for various databases
5b6cee71dSXin LI#
6b6cee71dSXin LI# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
7b6cee71dSXin LI#
8b6cee71dSXin LI#
9b6cee71dSXin LI# GDBM magic numbers
10b6cee71dSXin LI#  Will be maintained as part of the GDBM distribution in the future.
11b6cee71dSXin LI#  <downsj@teeny.org>
12c2931133SXin LI0	belong	0x13579acd	GNU dbm 1.x or ndbm database, big endian, 32-bit
13b6cee71dSXin LI!:mime	application/x-gdbm
14c2931133SXin LI0	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian, old
15c2931133SXin LI!:mime	application/x-gdbm
16c2931133SXin LI0	belong	0x13579acf	GNU dbm 1.x or ndbm database, big endian, 64-bit
17c2931133SXin LI!:mime	application/x-gdbm
18c2931133SXin LI0	lelong	0x13579acd	GNU dbm 1.x or ndbm database, little endian, 32-bit
19c2931133SXin LI!:mime	application/x-gdbm
20c2931133SXin LI0	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian, old
21c2931133SXin LI!:mime	application/x-gdbm
22c2931133SXin LI0	lelong	0x13579acf	GNU dbm 1.x or ndbm database, little endian, 64-bit
23b6cee71dSXin LI!:mime	application/x-gdbm
24b6cee71dSXin LI0	string	GDBM		GNU dbm 2.x database
25b6cee71dSXin LI!:mime	application/x-gdbm
26b6cee71dSXin LI#
27b6cee71dSXin LI# Berkeley DB
28b6cee71dSXin LI#
29b6cee71dSXin LI# Ian Darwin's file /etc/magic files: big/little-endian version.
30b6cee71dSXin LI#
31b6cee71dSXin LI# Hash 1.85/1.86 databases store metadata in network byte order.
32b6cee71dSXin LI# Btree 1.85/1.86 databases store the metadata in host byte order.
33b6cee71dSXin LI# Hash and Btree 2.X and later databases store the metadata in host byte order.
34b6cee71dSXin LI
35b6cee71dSXin LI0	long	0x00061561	Berkeley DB
36b6cee71dSXin LI!:mime	application/x-dbm
37b6cee71dSXin LI>8	belong	4321
38b6cee71dSXin LI>>4	belong	>2		1.86
39b6cee71dSXin LI>>4	belong	<3		1.85
40b6cee71dSXin LI>>4	belong	>0		(Hash, version %d, native byte-order)
41b6cee71dSXin LI>8	belong	1234
42b6cee71dSXin LI>>4	belong	>2		1.86
43b6cee71dSXin LI>>4	belong	<3		1.85
44b6cee71dSXin LI>>4	belong	>0		(Hash, version %d, little-endian)
45b6cee71dSXin LI
46b6cee71dSXin LI0	belong	0x00061561	Berkeley DB
47b6cee71dSXin LI>8	belong	4321
48b6cee71dSXin LI>>4	belong	>2		1.86
49b6cee71dSXin LI>>4	belong	<3		1.85
50b6cee71dSXin LI>>4	belong	>0		(Hash, version %d, big-endian)
51b6cee71dSXin LI>8	belong	1234
52b6cee71dSXin LI>>4	belong	>2		1.86
53b6cee71dSXin LI>>4	belong	<3		1.85
54b6cee71dSXin LI>>4	belong	>0		(Hash, version %d, native byte-order)
55b6cee71dSXin LI
56b6cee71dSXin LI0	long	0x00053162	Berkeley DB 1.85/1.86
57b6cee71dSXin LI>4	long	>0		(Btree, version %d, native byte-order)
58b6cee71dSXin LI0	belong	0x00053162	Berkeley DB 1.85/1.86
59b6cee71dSXin LI>4	belong	>0		(Btree, version %d, big-endian)
60b6cee71dSXin LI0	lelong	0x00053162	Berkeley DB 1.85/1.86
61b6cee71dSXin LI>4	lelong	>0		(Btree, version %d, little-endian)
62b6cee71dSXin LI
63b6cee71dSXin LI12	long	0x00061561	Berkeley DB
64b6cee71dSXin LI>16	long	>0		(Hash, version %d, native byte-order)
65b6cee71dSXin LI12	belong	0x00061561	Berkeley DB
66b6cee71dSXin LI>16	belong	>0		(Hash, version %d, big-endian)
67b6cee71dSXin LI12	lelong	0x00061561	Berkeley DB
68b6cee71dSXin LI>16	lelong	>0		(Hash, version %d, little-endian)
69b6cee71dSXin LI
70b6cee71dSXin LI12	long	0x00053162	Berkeley DB
71b6cee71dSXin LI>16	long	>0		(Btree, version %d, native byte-order)
72b6cee71dSXin LI12	belong	0x00053162	Berkeley DB
73b6cee71dSXin LI>16	belong	>0		(Btree, version %d, big-endian)
74b6cee71dSXin LI12	lelong	0x00053162	Berkeley DB
75b6cee71dSXin LI>16	lelong	>0		(Btree, version %d, little-endian)
76b6cee71dSXin LI
77b6cee71dSXin LI12	long	0x00042253	Berkeley DB
78b6cee71dSXin LI>16	long	>0		(Queue, version %d, native byte-order)
79b6cee71dSXin LI12	belong	0x00042253	Berkeley DB
80b6cee71dSXin LI>16	belong	>0		(Queue, version %d, big-endian)
81b6cee71dSXin LI12	lelong	0x00042253	Berkeley DB
82b6cee71dSXin LI>16	lelong	>0		(Queue, version %d, little-endian)
83b6cee71dSXin LI
84b6cee71dSXin LI# From Max Bowsher.
85b6cee71dSXin LI12	long	0x00040988	Berkeley DB
86b6cee71dSXin LI>16	long	>0		(Log, version %d, native byte-order)
87b6cee71dSXin LI12	belong	0x00040988	Berkeley DB
88b6cee71dSXin LI>16	belong	>0		(Log, version %d, big-endian)
89b6cee71dSXin LI12	lelong	0x00040988	Berkeley DB
90b6cee71dSXin LI>16	lelong	>0		(Log, version %d, little-endian)
91b6cee71dSXin LI
92b6cee71dSXin LI#
93b6cee71dSXin LI#
94b6cee71dSXin LI# Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
95b6cee71dSXin LI0	string/b	RRD\0		RRDTool DB
96b6cee71dSXin LI>4	string/b	x		version %s
97b6cee71dSXin LI
98b6cee71dSXin LI>>10	short		!0		16bit aligned
99b6cee71dSXin LI>>>10	bedouble	8.642135e+130	big-endian
100b6cee71dSXin LI>>>>18	short		x		32bit long (m68k)
101b6cee71dSXin LI
102b6cee71dSXin LI>>10	short		0
103b6cee71dSXin LI>>>12	long		!0		32bit aligned
104b6cee71dSXin LI>>>>12	bedouble	8.642135e+130	big-endian
105b6cee71dSXin LI>>>>>20 long		0		64bit long
106b6cee71dSXin LI>>>>>20 long		!0		32bit long
107b6cee71dSXin LI>>>>12	ledouble	8.642135e+130	little-endian
108b6cee71dSXin LI>>>>>24 long		0		64bit long
109b6cee71dSXin LI>>>>>24 long		!0		32bit long (i386)
110b6cee71dSXin LI>>>>12	string		\x43\x2b\x1f\x5b\x2f\x25\xc0\xc7	middle-endian
111b6cee71dSXin LI>>>>>24 short		!0		32bit long (arm)
112b6cee71dSXin LI
113b6cee71dSXin LI>>8	quad		0		64bit aligned
114b6cee71dSXin LI>>>16	bedouble	8.642135e+130	big-endian
115b6cee71dSXin LI>>>>24	long		0		64bit long (s390x)
116b6cee71dSXin LI>>>>24	long		!0		32bit long (hppa/mips/ppc/s390/SPARC)
117b6cee71dSXin LI>>>16	ledouble	8.642135e+130	little-endian
118b6cee71dSXin LI>>>>28	long		0		64bit long (alpha/amd64/ia64)
119b6cee71dSXin LI>>>>28	long		!0		32bit long (armel/mipsel)
120b6cee71dSXin LI
121b6cee71dSXin LI#----------------------------------------------------------------------
122b6cee71dSXin LI# ROOT: file(1) magic for ROOT databases
123b6cee71dSXin LI#
124b6cee71dSXin LI0       string  root\0  ROOT file
125b6cee71dSXin LI>4      belong  x       Version %d
126b6cee71dSXin LI>33     belong  x       (Compression: %d)
127b6cee71dSXin LI
128b6cee71dSXin LI# XXX: Weak magic.
129b6cee71dSXin LI# Alex Ott <ott@jet.msk.su>
130b6cee71dSXin LI## Paradox file formats
131b6cee71dSXin LI#2	  leshort	0x0800	Paradox
132b6cee71dSXin LI#>0x39	  byte		3	v. 3.0
133b6cee71dSXin LI#>0x39	  byte		4	v. 3.5
134b6cee71dSXin LI#>0x39	  byte		9	v. 4.x
135b6cee71dSXin LI#>0x39	  byte		10	v. 5.x
136b6cee71dSXin LI#>0x39	  byte		11	v. 5.x
137b6cee71dSXin LI#>0x39	  byte		12	v. 7.x
138b6cee71dSXin LI#>>0x04	  byte		0	indexed .DB data file
139b6cee71dSXin LI#>>0x04	  byte		1	primary index .PX file
140b6cee71dSXin LI#>>0x04	  byte		2	non-indexed .DB data file
141b6cee71dSXin LI#>>0x04	  byte		3	non-incrementing secondary index .Xnn file
142b6cee71dSXin LI#>>0x04	  byte		4	secondary index .Ynn file
143b6cee71dSXin LI#>>0x04	  byte		5	incrementing secondary index .Xnn file
144b6cee71dSXin LI#>>0x04	  byte		6	non-incrementing secondary index .XGn file
145b6cee71dSXin LI#>>0x04	  byte		7	secondary index .YGn file
146b6cee71dSXin LI#>>>0x04	  byte		8	incrementing secondary index .XGn file
147b6cee71dSXin LI
148b6cee71dSXin LI## XBase database files
149b6cee71dSXin LI# updated by Joerg Jenderek at Feb 2013
15048c779cdSXin LI# https://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
15148c779cdSXin LI# https://www.clicketyclick.dk/databases/xbase/format/dbf.html
152b6cee71dSXin LI# inspect VVYYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
153b6cee71dSXin LI0	ubelong&0x0000FFFF		<0x00000C20
154*a4d6d3b8SXin LI!:strength +10
155b6cee71dSXin LI# skip Infocom game Z-machine
156b6cee71dSXin LI>2		ubyte			>0
157b6cee71dSXin LI# skip Androids *.xml
158b6cee71dSXin LI>>3		ubyte			>0
159b6cee71dSXin LI>>>3		ubyte			<32
160b6cee71dSXin LI# 1 < version VV
161b6cee71dSXin LI>>>>0		ubyte			>1
162b6cee71dSXin LI# skip HELP.CA3 by test for reserved byte ( NULL )
163b6cee71dSXin LI>>>>>27		ubyte			0
164b6cee71dSXin LI# reserved bytes not always 0 ; also found 0x3901 (T4.DBF) ,0x7101 (T5.DBF,T6.DBF)
165b6cee71dSXin LI#>>>>>30		ubeshort     		x		30NULL?%x
166b6cee71dSXin LI# possible production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
167b6cee71dSXin LI>>>>>>24	ubelong&0xffFFFFff	>0x01302000
168b6cee71dSXin LI# .DBF or .MDX
169b6cee71dSXin LI>>>>>>24	ubelong&0xffFFFFff	<0x01302001
170b6cee71dSXin LI# for Xbase Database file (*.DBF) reserved (NULL) for multi-user
171b6cee71dSXin LI>>>>>>>24	ubelong&0xffFFFFff	=0
172b6cee71dSXin LI# test for 2 reserved NULL bytes,transaction and encryption byte flag
173b6cee71dSXin LI>>>>>>>>12	ubelong&0xFFFFfEfE	0
174b6cee71dSXin LI# test for MDX flag
175b6cee71dSXin LI>>>>>>>>>28	ubyte			x
176b6cee71dSXin LI>>>>>>>>>28	ubyte&0xf8		0
177b6cee71dSXin LI# header size >= 32
178b6cee71dSXin LI>>>>>>>>>>8	uleshort		>31
179b6cee71dSXin LI# skip PIC15736.PCX by test for language driver name or field name
180b6cee71dSXin LI>>>>>>>>>>>32	ubyte			>0
181b6cee71dSXin LI#!:mime	application/x-dbf; charset=unknown-8bit ??
182b6cee71dSXin LI#!:mime	application/x-dbase
183b6cee71dSXin LI>>>>>>>>>>>>0	use			xbase-type
184b6cee71dSXin LI# database file
18543a5ec4eSXin LI>>>>>>>>>>>>28	ubyte&0x04		=0		\b DBF
18643a5ec4eSXin LI!:ext	dbf
18743a5ec4eSXin LI>>>>>>>>>>>>28	ubyte&0x04		=4		\b DataBaseContainer
18843a5ec4eSXin LI!:ext	dbc
189b6cee71dSXin LI>>>>>>>>>>>>4	lelong			0		\b, no records
190b6cee71dSXin LI>>>>>>>>>>>>4	lelong			>0		\b, %d record
191b6cee71dSXin LI# plural s appended
192b6cee71dSXin LI>>>>>>>>>>>>>4	lelong			>1		\bs
19348c779cdSXin LI# https://www.clicketyclick.dk/databases/xbase/format/dbf_check.html#CHECK_DBF
194b6cee71dSXin LI# 1 <= record size <= 4000 (dBase 3,4) or 32 * KB (=0x8000)
195b6cee71dSXin LI>>>>>>>>>>>>10	uleshort		x		* %d
196b6cee71dSXin LI# file size = records * record size + header size
197b6cee71dSXin LI>>>>>>>>>>>>1	ubyte			x		\b, update-date
198b6cee71dSXin LI>>>>>>>>>>>>1	use			xbase-date
19948c779cdSXin LI# https://msdn.microsoft.com/de-de/library/cc483186(v=vs.71).aspx
20043a5ec4eSXin LI#>>>>>>>>>>>>29	ubyte			=0		\b, codepage ID=%#x
201b6cee71dSXin LI# 2~cp850 , 3~cp1252 , 0x1b~?? ; what code page is 0x1b ?
20243a5ec4eSXin LI>>>>>>>>>>>>29	ubyte			>0		\b, codepage ID=%#x
203b6cee71dSXin LI#>>>>>>>>>>>>28	ubyte&0x01		0		\b, no index file
20443a5ec4eSXin LI# MDX or CDX index
205b6cee71dSXin LI>>>>>>>>>>>>28	ubyte&0x01		1		\b, with index file .MDX
206b6cee71dSXin LI>>>>>>>>>>>>28	ubyte&0x02		2		\b, with memo .FPT
20743a5ec4eSXin LI#>>>>>>>>>>>>28	ubyte&0x04		4		\b, DataBaseContainer
208b6cee71dSXin LI# 1st record offset + 1 = header size
209b6cee71dSXin LI>>>>>>>>>>>>8	uleshort		>0
210b6cee71dSXin LI>>>>>>>>>>>>(8.s+1)	ubyte		>0
211b6cee71dSXin LI>>>>>>>>>>>>>8		uleshort	>0		\b, at offset %d
212b6cee71dSXin LI>>>>>>>>>>>>>(8.s+1)	ubyte		>0
213b6cee71dSXin LI>>>>>>>>>>>>>>&-1	string		>\0		1st record "%s"
21440427ccaSGordon Tetlow# for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
215b6cee71dSXin LI>>>>>>>24	ubelong&0x0133f7ff	>0
216b6cee71dSXin LI# test for reserved NULL byte
217c2931133SXin LI>>>>>>>>47	ubyte			0
218b6cee71dSXin LI# test for valid TAG key format (0x10 or 0)
219b6cee71dSXin LI>>>>>>>>>559	ubyte&0xeF		0
220b6cee71dSXin LI# test MM <= 12
221c2931133SXin LI>>>>>>>>>>45	ubeshort		<0x0C20
222c2931133SXin LI>>>>>>>>>>>45	ubyte			>0
223c2931133SXin LI>>>>>>>>>>>>46	ubyte			<32
224c2931133SXin LI>>>>>>>>>>>>>46	ubyte			>0
225b6cee71dSXin LI#!:mime	application/x-mdx
226c2931133SXin LI>>>>>>>>>>>>>>0		use		xbase-type
227c2931133SXin LI>>>>>>>>>>>>>>0		ubyte		x		\b MDX
228c2931133SXin LI>>>>>>>>>>>>>>1		ubyte		x		\b, creation-date
229c2931133SXin LI>>>>>>>>>>>>>>1		use		xbase-date
230c2931133SXin LI>>>>>>>>>>>>>>44	ubyte		x		\b, update-date
231c2931133SXin LI>>>>>>>>>>>>>>44	use		xbase-date
232b6cee71dSXin LI# No.of tags in use (1,2,5,12)
233c2931133SXin LI>>>>>>>>>>>>>>28	uleshort	x		\b, %d
234b6cee71dSXin LI# No. of entries in tag (0x30)
235c2931133SXin LI>>>>>>>>>>>>>>25	ubyte		x		\b/%d tags
236b6cee71dSXin LI#  Length of tag
237c2931133SXin LI>>>>>>>>>>>>>>26	ubyte		x		* %d
238b6cee71dSXin LI# 1st tag name_
239b6cee71dSXin LI>>>>>>>>>>>>>548	string		x		\b, 1st tag "%.11s"
240b6cee71dSXin LI# 2nd tag name
241b6cee71dSXin LI#>>>>>>>>>>>>(26.b+548)	string		x		\b, 2nd tag "%.11s"
242b6cee71dSXin LI#
243b6cee71dSXin LI#		Print the xBase names of different version variants
244b6cee71dSXin LI0	name				xbase-type
245b6cee71dSXin LI>0	ubyte		<2
246b6cee71dSXin LI# 1 < version
247b6cee71dSXin LI>0	ubyte		>1
248b6cee71dSXin LI>>0	ubyte		0x02		FoxBase
24943a5ec4eSXin LI!:mime	application/x-dbf
25043a5ec4eSXin LI# like: ACCESS.DBF USER.DBF dbase3date.dbf mitarbei.dbf produkte.dbf umlaut-test-v2.dbf
251b6cee71dSXin LI# FoxBase+/dBaseIII+, no memo
252b6cee71dSXin LI>>0	ubyte		0x03		FoxBase+/dBase III
253b6cee71dSXin LI!:mime	application/x-dbf
25443a5ec4eSXin LI# like: 92DATA.DBF MSCATLOG.DBF SYLLABI2.DBF SYLLABUS.DBF T4.DBF Teleadr.dbf us_city.dbf
255b6cee71dSXin LI# dBASE IV no memo file
256b6cee71dSXin LI>>0	ubyte		0x04		dBase IV
257b6cee71dSXin LI!:mime	application/x-dbf
25843a5ec4eSXin LI# like: Quattro-test11.dbf umlaut-test-v4.dbf
259b6cee71dSXin LI# dBASE V no memo file
260b6cee71dSXin LI>>0	ubyte		0x05		dBase V
261b6cee71dSXin LI!:mime	application/x-dbf
26243a5ec4eSXin LI# like: dbase4double.dbf Quattro-test2.dbf umlaut-test7.dbf
26343a5ec4eSXin LI!:ext	dbf
26443a5ec4eSXin LI# probably Apollo Database Server 9.7? xBase (0x6)
26543a5ec4eSXin LI>>0	ubyte		0x06		Apollo
26643a5ec4eSXin LI!:mime	application/x-dbf
26743a5ec4eSXin LI# like: ALIAS.DBF CRYPT.DBF PROCS.DBF USERS.DBF
26843a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
26943a5ec4eSXin LI>>0	ubyte		0x2F		FoxBase+/Dbase III plus, no memo
27043a5ec4eSXin LI!:mime	application/x-dbf
27143a5ec4eSXin LI# no example
272b6cee71dSXin LI>>0	ubyte		0x30		Visual FoxPro
273b6cee71dSXin LI!:mime	application/x-dbf
27443a5ec4eSXin LI# like: 26FRX.DBF 30DBC.DBF 30DBCPRO.DBF BEHINDSC.DBF USER_LEV.DBF
27543a5ec4eSXin LI# Microsoft Visual FoxPro Database Container File like: FOXPRO-DB-TEST.DBC TESTDATA.DBC TASTRADE.DBC
276b6cee71dSXin LI>>0	ubyte		0x31		Visual FoxPro, autoincrement
277b6cee71dSXin LI!:mime	application/x-dbf
27843a5ec4eSXin LI# like: AI_Table.DBF dbase_31.dbf w_cityFoxpro.dbf
279b6cee71dSXin LI# Visual FoxPro, with field type Varchar or Varbinary
280b6cee71dSXin LI>>0	ubyte		0x32		Visual FoxPro, with field type Varchar
281b6cee71dSXin LI!:mime	application/x-dbf
28243a5ec4eSXin LI# like: dbase_32.dbf
283b6cee71dSXin LI# dBASE IV SQL, no memo;dbv memo var size (Flagship)
284b6cee71dSXin LI>>0	ubyte		0x43		dBase IV, with SQL table
285b6cee71dSXin LI!:mime	application/x-dbf
28643a5ec4eSXin LI# like: ASSEMBLY.DBF INVENTRY.DBF STAFF.DBF
28743a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
28843a5ec4eSXin LI>>0	ubyte		0x62		dBase IV, with SQL table
289b6cee71dSXin LI#!:mime	application/x-dbf
29043a5ec4eSXin LI# no example
291b6cee71dSXin LI# dBASE IV, with memo!!
292b6cee71dSXin LI>>0	ubyte		0x7b		dBase IV, with memo
293b6cee71dSXin LI!:mime	application/x-dbf
29443a5ec4eSXin LI# like: test3memo.DBF dbase5.DBF
29543a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
29643a5ec4eSXin LI>>0	ubyte		0x82		dBase IV, with SQL system
297b6cee71dSXin LI#!:mime	application/x-dbf
29843a5ec4eSXin LI# no example
299b6cee71dSXin LI# FoxBase+/dBaseIII+ with memo .DBT!
300b6cee71dSXin LI>>0	ubyte		0x83		FoxBase+/dBase III, with memo .DBT
301b6cee71dSXin LI!:mime	application/x-dbf
30243a5ec4eSXin LI# like: T2.DBF t3.DBF biblio.dbf dbase_83.dbf dbase3dbt0_4.dbf fsadress.dbf stop.dbf
303b6cee71dSXin LI# VISUAL OBJECTS (first 1.0 versions) for the Dbase III files (NTX clipper driver); memo file
304b6cee71dSXin LI>>0	ubyte		0x87		VISUAL OBJECTS, with memo file
305b6cee71dSXin LI!:mime	application/x-dbf
30643a5ec4eSXin LI# like: ACCESS.DBF dbase3date.dbf dbase3float.dbf holdings.dbf mitarbei.dbf
30743a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
30843a5ec4eSXin LI>>0	ubyte		0x8A		FoxBase+/dBase III, with memo .DBT
309b6cee71dSXin LI#!:mime	application/x-dbf
31043a5ec4eSXin LI# no example
311b6cee71dSXin LI# dBASE IV with memo!
312b6cee71dSXin LI>>0	ubyte		0x8B		dBase IV, with memo .DBT
313b6cee71dSXin LI!:mime	application/x-dbf
31443a5ec4eSXin LI# like: animals.dbf archive.dbf callin.dbf dbase_8b.dbf phnebook.dbf t6.dbf
315b6cee71dSXin LI# dBase IV with SQL Table,no memo?
316b6cee71dSXin LI>>0	ubyte		0x8E		dBase IV, with SQL table
317b6cee71dSXin LI!:mime	application/x-dbf
31843a5ec4eSXin LI# like: dbase5.DBF test3memo.DBF test-memo.DBF
319b6cee71dSXin LI# .dbv and .dbt memo (Flagship)?
320b6cee71dSXin LI>>0	ubyte		0xB3		Flagship
32143a5ec4eSXin LI!:mime	application/x-dbf
32243a5ec4eSXin LI# no example
32343a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
32443a5ec4eSXin LI>>0	ubyte		0xCA		dBase IV with memo .DBT
325b6cee71dSXin LI#!:mime	application/x-dbf
32643a5ec4eSXin LI# no example
327b6cee71dSXin LI# dBASE IV with SQL table, with memo .DBT
328b6cee71dSXin LI>>0	ubyte		0xCB		dBase IV with SQL table, with memo .DBT
329b6cee71dSXin LI!:mime	application/x-dbf
33043a5ec4eSXin LI# like: dbase5.DBF test3memo.DBF test-memo.DBF
331b6cee71dSXin LI# HiPer-Six format;Clipper SIX, with SMT memo file
332b6cee71dSXin LI>>0	ubyte		0xE5		Clipper SIX with memo
333b6cee71dSXin LI!:mime	application/x-dbf
33443a5ec4eSXin LI# like: dbase5.DBF test3memo.DBF test-memo.DBF testClipper.dbf DATA.DBF
33543a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
33643a5ec4eSXin LI>>0	ubyte		0xF4		dBase IV, with SQL table, with memo
337b6cee71dSXin LI#!:mime	application/x-dbf
33843a5ec4eSXin LI# no example
339b6cee71dSXin LI>>0	ubyte		0xF5		FoxPro with memo
340b6cee71dSXin LI!:mime	application/x-dbf
34143a5ec4eSXin LI# like: CUSTOMER.DBF FOXUSER1.DBF Invoice.DBF NG.DBF OBJSAMP.DBF dbase_f5.dbf kunde.dbf
34243a5ec4eSXin LI# probably Apollo Database Server 9.7 with SQL and memo mask? xBase (0xF6)
34343a5ec4eSXin LI>>0	ubyte		0xF6		Apollo, with SQL table with memo
34443a5ec4eSXin LI!:mime	application/x-dbf
34543a5ec4eSXin LI# like: SCRIPTS.DBF
34643a5ec4eSXin LI# https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
347b6cee71dSXin LI#>>0	ubyte		0xFA		FoxPro 2.x, with memo
348b6cee71dSXin LI#!:mime	application/x-dbf
34943a5ec4eSXin LI# no example
350b6cee71dSXin LI# unknown version (should not happen)
351b6cee71dSXin LI>>0	default		x		xBase
352b6cee71dSXin LI!:mime	application/x-dbf
35343a5ec4eSXin LI>>>0	ubyte		x		(%#x)
354b6cee71dSXin LI# flags in version byte
355b6cee71dSXin LI# DBT flag (with dBASE III memo .DBT)!!
356b6cee71dSXin LI# >>0	ubyte&0x80	>0		DBT_FLAG=%x
357b6cee71dSXin LI# memo flag ??
358b6cee71dSXin LI# >>0	ubyte&0x08	>0		MEMO_FLAG=%x
359b6cee71dSXin LI# SQL flag ??
360b6cee71dSXin LI# >>0	ubyte&0x70	>0		SQL_FLAG=%x
361b6cee71dSXin LI#		test and print the date of xBase .DBF .MDX
362b6cee71dSXin LI0	name				xbase-date
363b6cee71dSXin LI# inspect YYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
364b6cee71dSXin LI>0	ubelong		x
365b6cee71dSXin LI>1	ubyte		<13
366b6cee71dSXin LI>>1	ubyte		>0
367b6cee71dSXin LI>>>2	ubyte		>0
368b6cee71dSXin LI>>>>2	ubyte		<32
369b6cee71dSXin LI>>>>>0	ubyte		x
370b6cee71dSXin LI# YY is interpreted as 20YY or 19YY
371b6cee71dSXin LI>>>>>>0	ubyte		<100		\b %.2d
372b6cee71dSXin LI# YY is interpreted 1900+YY; TODO: display yy or 20yy instead 1YY
373b6cee71dSXin LI>>>>>>0	ubyte		>99		\b %d
374b6cee71dSXin LI>>>>>1	ubyte		x		\b-%d
375b6cee71dSXin LI>>>>>2	ubyte		x		\b-%d
376b6cee71dSXin LI
377b6cee71dSXin LI#	dBase memo files .DBT or .FPT
37848c779cdSXin LI# https://msdn.microsoft.com/en-us/library/8599s21w(v=vs.80).aspx
379b6cee71dSXin LI16		ubyte		<4
380b6cee71dSXin LI>16		ubyte		!2
381b6cee71dSXin LI>>16		ubyte		!1
382b6cee71dSXin LI# next free block index is positive
383b6cee71dSXin LI>>>0		ulelong		>0
384b6cee71dSXin LI# skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size
385d38c30c0SXin LI>>>>17		ubelong&0xFFfdFEff	0x00000000
386b6cee71dSXin LI# skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h
387b6cee71dSXin LI>>>>>20		ubelong&0xFF01209B	0x00000000
388b6cee71dSXin LI# dBASE III
389b6cee71dSXin LI>>>>>>16	ubyte		3
390b6cee71dSXin LI# dBASE III DBT
391c2931133SXin LI>>>>>>>0	use		dbase3-memo-print
392c2931133SXin LI# dBASE III DBT without version, dBASE IV DBT , FoxPro FPT , or many ZIP , DBF garbage
393b6cee71dSXin LI>>>>>>16	ubyte		0
394c2931133SXin LI# unusual dBASE III DBT like angest.dbt, dBASE IV DBT with block size 0 , FoxPro FPT ,  or garbage PCX DBF
395c2931133SXin LI>>>>>>>20	uleshort	0
396c2931133SXin LI# FoxPro FPT , unusual dBASE III DBT like biblio.dbt or garbage
397c2931133SXin LI>>>>>>>>8	ulong		=0
398c2931133SXin LI>>>>>>>>>6	ubeshort	>0
399c2931133SXin LI# skip emacs.PIF
400c2931133SXin LI>>>>>>>>>>4	ushort		0
401d38c30c0SXin LI# check for valid FoxPro field type
402d38c30c0SXin LI>>>>>>>>>>>512	ubelong		<3
403*a4d6d3b8SXin LI# skip LXMDCLN4.OUT LXMDCLN6.OUT LXMDALG6.OUT with invalid blocksize 170=AAh
404*a4d6d3b8SXin LI>>>>>>>>>>>>6	ubeshort&0x002f	0
405*a4d6d3b8SXin LI>>>>>>>>>>>>>0	use		foxpro-memo-print
406c2931133SXin LI# dBASE III DBT , garbage
407d38c30c0SXin LI# skip WORD1XW.DOC with improbably high free block index
4082726a701SXin LI>>>>>>>>>0	ulelong		<0x400000
4092726a701SXin LI# skip WinStore.App.exe by looking for printable 2nd character of 1st memo item
4102726a701SXin LI>>>>>>>>>>513	ubyte		>037
411c2931133SXin LI# unusual dBASE III DBT like adressen.dbt
4122726a701SXin LI>>>>>>>>>>>0	use		dbase3-memo-print
413c2931133SXin LI# dBASE III DBT like angest.dbt, or garbage PCX DBF
414c2931133SXin LI>>>>>>>>8	ubelong		!0
415c2931133SXin LI# skip PCX and some DBF by test for for reserved NULL bytes
416c2931133SXin LI>>>>>>>>>510	ubeshort	0
4172726a701SXin LI# skip bad symples with improbably high free block index above 2 GiB file limit
4182726a701SXin LI>>>>>>>>>>0	ulelong		<0x400000
4192726a701SXin LI# skip AI070GEP.EPS by printable 1st character of 1st memo item
4202726a701SXin LI>>>>>>>>>>>512	ubyte		>037
421*a4d6d3b8SXin LI# skip some Microsoft Visual C, OMF library like: BZ2.LIB WATTCPWL.LIB ZLIB.LIB
422*a4d6d3b8SXin LI>>>>>>>>>>>>512	ubyte		<0200
4232726a701SXin LI# skip gluon-ffhat-1.0-tp-link-tl-wr1043n-nd-v2-sysupgrade.bin by printable 2nd character
424*a4d6d3b8SXin LI>>>>>>>>>>>>>513 ubyte		>037
425*a4d6d3b8SXin LI>>>>>>>>>>>>>>0	use		dbase3-memo-print
426c2931133SXin LI# dBASE IV DBT with positive block size
427c2931133SXin LI>>>>>>>20	uleshort	>0
4283e41d09dSXin LI# dBASE IV DBT with valid block length like 512, 1024
4293e41d09dSXin LI# multiple of 2 in between 16 and 16 K ,implies upper and lower bits are zero
430d38c30c0SXin LI# skip also 3600h 3E00h size
431d38c30c0SXin LI>>>>>>>>20	uleshort&0xE00f	0
4323e41d09dSXin LI>>>>>>>>>0	use		dbase4-memo-print
433b6cee71dSXin LI
434c2931133SXin LI#		Print the information of dBase III DBT memo file
435c2931133SXin LI0	name				dbase3-memo-print
436c2931133SXin LI>0	ubyte			x		dBase III DBT
437d38c30c0SXin LI!:mime	application/x-dbt
438d38c30c0SXin LI!:ext	dbt
439c2931133SXin LI# instead 3 as version number 0 for unusual examples like biblio.dbt
440c2931133SXin LI>16	ubyte			!3		\b, version number %u
441b6cee71dSXin LI# Number of next available block for appending data
442c2931133SXin LI#>0	lelong			=0		\b, next free block index %u
443c2931133SXin LI>0	lelong			!0		\b, next free block index %u
44443a5ec4eSXin LI# no positive block length
445c2931133SXin LI#>20	uleshort		=0		\b, block length %u
446c2931133SXin LI>20	uleshort		!0		\b, block length %u
447c2931133SXin LI# dBase III memo field terminated by \032\032
448*a4d6d3b8SXin LI# like: "WHAT IS XBASE" test.dbt "Borges, Malte" biblio.dbt "First memo\032\032" T2.DBT
449c2931133SXin LI>512	string			>\0		\b, 1st item "%s"
450*a4d6d3b8SXin LI# For DEBUGGING
451*a4d6d3b8SXin LI#>512	ubelong			x		\b, 1ST item %#8.8x
452d38c30c0SXin LI# https://www.clicketyclick.dk/databases/xbase/format/dbt.html
453c2931133SXin LI#		Print the information of dBase IV DBT memo file
454c2931133SXin LI0	name				dbase4-memo-print
455c2931133SXin LI>0		lelong		x		dBase IV DBT
4563e41d09dSXin LI!:mime	application/x-dbt
4573e41d09dSXin LI!:ext dbt
45843a5ec4eSXin LI# 8 character shorted main name of corresponding dBASE IV DBF file
459c2931133SXin LI>8		ubelong		>0x20000000
460c2931133SXin LI# skip unusual like for angest.dbt
461c2931133SXin LI>>20		uleshort	>0
462c2931133SXin LI>>>8		string		>\0		\b of %-.8s.DBF
463c2931133SXin LI# value 0 implies 512 as size
464c2931133SXin LI#>4		ulelong		=0		\b, blocks size %u
465c2931133SXin LI# size of blocks not reliable like 0x2020204C in angest.dbt
466c2931133SXin LI>4		ulelong		!0
467c2931133SXin LI>>4		ulelong&0x0000003f	0	\b, blocks size %u
468c2931133SXin LI# dBase IV DBT with positive block length (found 512 , 1024)
469c2931133SXin LI>20		uleshort	>0		\b, block length %u
470c2931133SXin LI# next available block
471c2931133SXin LI#>0		lelong		=0		\b, next free block index %u
472c2931133SXin LI>0		lelong		!0		\b, next free block index %u
473c2931133SXin LI>20		uleshort	>0
474c2931133SXin LI>>(20.s)	ubelong		x
475c2931133SXin LI>>>&-4		use		dbase4-memofield-print
476c2931133SXin LI# unusual dBase IV DBT without block length (implies 512 as length)
477c2931133SXin LI>20		uleshort	=0
478b6cee71dSXin LI>>512		ubelong		x
479c2931133SXin LI>>>&-4		use				dbase4-memofield-print
480c2931133SXin LI#		Print the information of dBase IV memo field
481c2931133SXin LI0	name			dbase4-memofield-print
482c2931133SXin LI# free dBase IV memo field
483c2931133SXin LI>0		ubelong		!0xFFFF0800
484c2931133SXin LI>>0		lelong		x		\b, next free block %u
485c2931133SXin LI>>4		lelong		x		\b, next used block %u
486c2931133SXin LI# used dBase IV memo field
487c2931133SXin LI>0		ubelong		=0xFFFF0800
488c2931133SXin LI# length of memo field
489c2931133SXin LI>>4		lelong		x		\b, field length %d
490c2931133SXin LI>>>8		string		>\0		\b, 1st used item "%s"
491d38c30c0SXin LI# http://www.dbfree.org/webdocs/1-documentation/0018-developers_stuff_(advanced)/os_related_stuff/xbase_file_format.htm
492c2931133SXin LI#		Print the information of FoxPro FPT memo file
493c2931133SXin LI0	name				foxpro-memo-print
494c2931133SXin LI>0		belong		x		FoxPro FPT
495d38c30c0SXin LI!:mime	application/x-fpt
496d38c30c0SXin LI!:ext	fpt
497*a4d6d3b8SXin LI# Size of blocks for FoxPro ( 64,256 ); probably a multiple of two
498c2931133SXin LI>6		ubeshort	x		\b, blocks size %u
499c2931133SXin LI# next available block
500c2931133SXin LI#>0		belong		=0		\b, next free block index %u
501c2931133SXin LI>0		belong		!0		\b, next free block index %u
502c2931133SXin LI# field type ( 0~picture, 1~memo, 2~object )
503c2931133SXin LI>512		ubelong		<3		\b, field type %u
504c2931133SXin LI# length of memo field
505c2931133SXin LI>512		ubelong		1
506c2931133SXin LI>>516		belong		>0		\b, field length %d
507c2931133SXin LI>>>520		string		>\0		\b, 1st item "%s"
508b6cee71dSXin LI
50943a5ec4eSXin LI# Summary:	DBASE Compound Index file *.CDX and FoxPro index *.IDX
51043a5ec4eSXin LI# From:		Joerg Jenderek
51143a5ec4eSXin LI# URL:		https://www.clicketyclick.dk/databases/xbase/format/cdx.html
51243a5ec4eSXin LI#		https://www.clicketyclick.dk/databases/xbase/format/idx.html
51343a5ec4eSXin LI#		https://www.clicketyclick.dk/databases/xbase/format/idx_comp.html
51443a5ec4eSXin LI# Reference:	https://mark0.net/download/triddefs_xml.7z/defs/s/sybase-ianywhere-cdx.trid.xml
51543a5ec4eSXin LI#		https://mark0.net/download/triddefs_xml.7z/defs/c/cdx-vfp7.trid.xml
51643a5ec4eSXin LI# like: kunde.cdx
51743a5ec4eSXin LI0	ulelong		0x1C00
51843a5ec4eSXin LI>0	use			xbase-index
51943a5ec4eSXin LI# like: SYLLABI2.CDX SYLLABUS.CDX
52043a5ec4eSXin LI0	ulelong		0x0800
52143a5ec4eSXin LI>0	use			xbase-index
52243a5ec4eSXin LI# often in xBase index pointer to root node 400h
52343a5ec4eSXin LI0	ulelong		0x0400
52443a5ec4eSXin LI# skip most Maple help database *.hdb with version tag handled by ./maple
52543a5ec4eSXin LI>1028	string		!version
52643a5ec4eSXin LI# skip Maple help database hsum.hdb checking for valid reserved area
52743a5ec4eSXin LI>>492	quad		=0
52843a5ec4eSXin LI# skip remaining Maple help database *.hdb by checking key length
52943a5ec4eSXin LI#>>>12	uleshort	!0x000F			KEY_LENGTHVALID
53043a5ec4eSXin LI>>>0	use			xbase-index
53143a5ec4eSXin LI#	display information about dBase/FoxPro index
53243a5ec4eSXin LI0	name			xbase-index
53343a5ec4eSXin LI>0	ulelong		x			xBase
53443a5ec4eSXin LI!:mime	application/x-dbase-index
53543a5ec4eSXin LI>14	ubyte		&0x40			compound index
53643a5ec4eSXin LI# DCX for FoxPro database index like: TESTDATA.DCX
53743a5ec4eSXin LI!:ext	cdx/dcx
53843a5ec4eSXin LI>14	ubyte		^0x40			index
53943a5ec4eSXin LI# only 1 example like: TEST.IDX
54043a5ec4eSXin LI!:ext	idx
54143a5ec4eSXin LI# pointer to root node like: 1C00h 800h often 400h
54243a5ec4eSXin LI>0	ulelong		!0x400			\b, root pointer %#x
54343a5ec4eSXin LI# Pointer to free node list: often 0 but -1 if not present
54443a5ec4eSXin LI>4	ulelong		!0			\b, free node pointer %#x
54543a5ec4eSXin LI# MAYBE number of pages in file (Foxbase, FoxPro 1.x) or
54643a5ec4eSXin LI# http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_1.HTM
54743a5ec4eSXin LI# Whenever Visual FoxPro updates the index file it increments this reserved field
54843a5ec4eSXin LI# Reserved for internal use like: 02000000h 03000000h 460c0000h 780f0000h 89000000h 9fdc0100h often 0
54943a5ec4eSXin LI>8	ulelong		!0			\b, reserved counter %#x
55043a5ec4eSXin LI# length of key like: mostly 000Ah 0028h (TEST.IDX)
55143a5ec4eSXin LI>12	uleshort	!0x000A			\b, key length %#x
55243a5ec4eSXin LI# index options like: 24h E0h E8h
55343a5ec4eSXin LI# 1~a unique index 8~index has FOR clause 32~compact index format 64~compound index header
55443a5ec4eSXin LI# 16~Bit vector (SoftC) 128~Structure index (FoxPro)
55543a5ec4eSXin LI>14	ubyte		x			\b, index options (%#x
55643a5ec4eSXin LI>14	ubyte		&0x01			\b, unique
55743a5ec4eSXin LI>14	ubyte		&0x08			\b, has FOR clause
55843a5ec4eSXin LI>14	ubyte		&0x10			\b, bit vector (SoftC)
55943a5ec4eSXin LI>14	ubyte		&0x20			\b, compact format
56043a5ec4eSXin LI#>14	ubyte		&0x40			\b, compound header
56143a5ec4eSXin LI>14	ubyte		&0x80			\b, structure
56243a5ec4eSXin LI>14	ubyte		x			\b)
56343a5ec4eSXin LI# WHAT EXACTLY IS THAT? index signature like: 0 (sybase-ianywhere-cdx.trid.xml) 1 (cdx-vfp7.trid.xml)
56443a5ec4eSXin LI>15	ubyte		!0			\b, index signature %u
56543a5ec4eSXin LI# reserved area (0-bytes) til about 500, but not for uncompressed Index files *.idx
56643a5ec4eSXin LI>16	quad		!0			\b, at 16 reserved %#llx
56743a5ec4eSXin LI>492	quad		!0			\b, at 492 reserved %#llx
56843a5ec4eSXin LI# for IDX variant
56943a5ec4eSXin LI#>14	ubyte		^0x40			IDX
57043a5ec4eSXin LI# for CDX variant
57143a5ec4eSXin LI>14	ubyte		&0x40
57243a5ec4eSXin LI# Ascending or descending: 0~ascending 1~descending
57343a5ec4eSXin LI>>502	uleshort	x			\b, sort order %u
57443a5ec4eSXin LI# Total expression length (FoxPro 2) like: 0 1
57543a5ec4eSXin LI>>504	uleshort	!0			\b, expression length %u
57643a5ec4eSXin LI# FOR expression pool length like: 1
57743a5ec4eSXin LI>>506	uleshort	!1			\b, FOR expression pool length %#x
57843a5ec4eSXin LI# reserved for internal use like: 0
57943a5ec4eSXin LI>>508	uleshort	!0			\b, at 0x508 reserved %#x
58043a5ec4eSXin LI# Key expression pool length like: 1
58143a5ec4eSXin LI>>510	uleshort	!1			\b, key expression pool length %#x
58243a5ec4eSXin LI# 512 - 1023 Key & FOR expression pool (uncompiled)
58343a5ec4eSXin LI>>512	quad		!0			\b, key expression pool %#llx
58443a5ec4eSXin LI#>>520	quad		!0			\b, key expression pool %#llx
58543a5ec4eSXin LI
58643a5ec4eSXin LI# Summary:	dBASE IV Printer Form *.PRF
58743a5ec4eSXin LI# From:		Joerg Jenderek
58843a5ec4eSXin LI# URL:		https://en.wikipedia.org/wiki/.dbf#Other_file_types_found_in_dBASE
58943a5ec4eSXin LI# Reference:	https://mark0.net/download/triddefs_xml.7z/defs/p/prf-dbase.trid.xml
59043a5ec4eSXin LI0	ubeshort	0x0400
59143a5ec4eSXin LI# skip some Xbase Index files *.ndx and Infocom (Z-machine 4) *.z4 handled by ./adventure
59243a5ec4eSXin LI# by looking for valid printer driver name extension
59343a5ec4eSXin LI>0x58	search/8	.PR2
59443a5ec4eSXin LI>>0	use			xbase-prf
59543a5ec4eSXin LI#	display information of dbase print form like printer driver *.PR2
59643a5ec4eSXin LI0	name			xbase-prf	dBase Printer Form
59743a5ec4eSXin LI!:mime	application/x-dbase-prf
59843a5ec4eSXin LI!:ext	prf
59943a5ec4eSXin LI# MAYBE version? like: 4~DBASE IV
60043a5ec4eSXin LI#>0	ubyte		x			\b, version %u
60143a5ec4eSXin LI# MAYBE flag like: 1~with output file name 0~not
60243a5ec4eSXin LI#>2	ubyte		!0			\b, flag %u
60343a5ec4eSXin LI# optional printer text output file name like E:\DBASE\IV\T6.txt
60443a5ec4eSXin LI>3	string		>\0			\b, output file %s
60543a5ec4eSXin LI# probably padding with nils til 0x53
60643a5ec4eSXin LI#>0x48	 uquad		!0			\b, at 0x48 padding %#llx
60743a5ec4eSXin LI# dBASE IV printer driver name like: Generic.PR2 ASCII.PR2
60843a5ec4eSXin LI>0x56	string		>\0			\b, using printer driver %s
60943a5ec4eSXin LI# 2 is probably last character of previous dBASE printer driver name
61043a5ec4eSXin LI#>0x60	ubyte		!0x32			\b, at 0x60 %#x
61143a5ec4eSXin LI# probably padding with nils til 0xa8
61243a5ec4eSXin LI#>0x61	uquad		!0			\b, at 0x61 padding %#llx
61343a5ec4eSXin LI# unknown 0x03020300 0x03020100 at 0xa8
61443a5ec4eSXin LI>0xa8	ubelong 	x			\b, at 0xa8 unknown %#8.8x
61543a5ec4eSXin LI# probably padding with nils til 0x2aa
61643a5ec4eSXin LI#>0x2a0	uquad		!0			\b, at 0x2a0 padding %#llx
61743a5ec4eSXin LI# unknown 0x100ff7f01000001 at 0x2AB
61843a5ec4eSXin LI>0x2ab	ubequad		!0x100ff7f01000001	\b, at 0x2ab unknown %#llx
61943a5ec4eSXin LI# unknown 0x0042 at 0x2b3
62043a5ec4eSXin LI>0x2b3	ubeshort 	!0x0042			\b, at 0x2b3 unknown %#4.4x
62143a5ec4eSXin LI# unknown last 4 bytes at 0x2b6 like: 0 0x23
62243a5ec4eSXin LI>0x2b6	ubelong		!0			\b, at 0x2b6 unknown %#8.8x
62343a5ec4eSXin LI
624b6cee71dSXin LI# TODO:
625b6cee71dSXin LI# DBASE index file *.NDX
62643a5ec4eSXin LI# dBASE compiled Format *.FMO
62743a5ec4eSXin LI# FoxPro Database memo file *.DCT
62843a5ec4eSXin LI# FoxPro Forms Memo *.SCT
62943a5ec4eSXin LI# FoxPro Generated Menu Program *.MPR
63043a5ec4eSXin LI# FoxPro Report *.FRX
63143a5ec4eSXin LI# FoxPro Report Memo *.FRT
63243a5ec4eSXin LI# Foxpro Generated Screen Program *.SPR
63343a5ec4eSXin LI# Foxpro memo *.PJT
634b6cee71dSXin LI## End of XBase database stuff
635b6cee71dSXin LI
636b6cee71dSXin LI# MS Access database
637b6cee71dSXin LI4	string	Standard\ Jet\ DB	Microsoft Access Database
638b6cee71dSXin LI!:mime	application/x-msaccess
639b6cee71dSXin LI4	string	Standard\ ACE\ DB	Microsoft Access Database
640b6cee71dSXin LI!:mime	application/x-msaccess
641b6cee71dSXin LI
6423e41d09dSXin LI# From: Joerg Jenderek
6433e41d09dSXin LI# URL: http://fileformats.archiveteam.org/wiki/Extensible_Storage_Engine
6443e41d09dSXin LI# Reference: https://github.com/libyal/libesedb/archive/master.zip
6453e41d09dSXin LI#	libesedb-master/documentation/
6463e41d09dSXin LI#	Extensible Storage Engine (ESE) Database File (EDB) format.asciidoc
6473e41d09dSXin LI# Note: also known as "JET Blue". Used by numerous Windows components such as
6483e41d09dSXin LI# Windows Search, Mail, Exchange and Active Directory.
6493e41d09dSXin LI4	ubelong		0xefcdab89
6503e41d09dSXin LI# unknown1
6513e41d09dSXin LI>132	ubelong		0		Extensible storage engine
6523e41d09dSXin LI!:mime	application/x-ms-ese
6533e41d09dSXin LI# file_type 0~database 1~stream
6543e41d09dSXin LI>>12	ulelong		0		DataBase
6553e41d09dSXin LI# Security DataBase (sdb)
6563e41d09dSXin LI!:ext	edb/sdb
6573e41d09dSXin LI>>12	ulelong		1		STreaMing
6583e41d09dSXin LI!:ext	stm
6593e41d09dSXin LI# format_version 620h
66043a5ec4eSXin LI>>8	uleshort	x		\b, version %#x
66143a5ec4eSXin LI>>10	uleshort	>0		revision %#4.4x
66243a5ec4eSXin LI>>0	ubelong		x	 	\b, checksum %#8.8x
6633e41d09dSXin LI# Page size 4096 8192 32768
6643e41d09dSXin LI>>236	ulequad		x		\b, page size %lld
6653e41d09dSXin LI# database_state
6663e41d09dSXin LI>>52	ulelong		1		\b, JustCreated
6673e41d09dSXin LI>>52	ulelong		2		\b, DirtyShutdown
6683e41d09dSXin LI#>>52	ulelong		3		\b, CleanShutdown
6693e41d09dSXin LI>>52	ulelong		4		\b, BeingConverted
6703e41d09dSXin LI>>52	ulelong		5		\b, ForceDetach
6712726a701SXin LI# Windows NT major version when the databases indexes were updated.
6723e41d09dSXin LI>>216	ulelong		x		\b, Windows version %d
6732726a701SXin LI# Windows NT minor version
6743e41d09dSXin LI>>220	ulelong		x		\b.%d
6753e41d09dSXin LI
6763e41d09dSXin LI# From: Joerg Jenderek
67748c779cdSXin LI# URL: https://forensicswiki.org/wiki/Windows_Application_Compatibility
6783e41d09dSXin LI# Note: files contain application compatibility fixes, application compatibility modes and application help messages.
6793e41d09dSXin LI8	string		sdbf
6803e41d09dSXin LI>7	ubyte		0
6813e41d09dSXin LI# TAG_TYPE_LIST+TAG_INDEXES
6823e41d09dSXin LI>>12	uleshort	0x7802		Windows application compatibility Shim DataBase
6833e41d09dSXin LI# version? 2 3
6843e41d09dSXin LI#>>>0	ulelong		x		\b, version %d
6853e41d09dSXin LI!:mime	application/x-ms-sdb
6863e41d09dSXin LI!:ext	sdb
6873e41d09dSXin LI
688b6cee71dSXin LI# TDB database from Samba et al - Martin Pool <mbp@samba.org>
689b6cee71dSXin LI0	string	TDB\ file		TDB database
690b6cee71dSXin LI>32	lelong	0x2601196D		version 6, little-endian
691b6cee71dSXin LI>>36	lelong	x			hash size %d bytes
692b6cee71dSXin LI
693b6cee71dSXin LI# SE Linux policy database
694b6cee71dSXin LI0       lelong  0xf97cff8c      SE Linux policy
695b6cee71dSXin LI>16     lelong  x               v%d
696b6cee71dSXin LI>20     lelong  1      MLS
697b6cee71dSXin LI>24     lelong  x       %d symbols
698b6cee71dSXin LI>28     lelong  x       %d ocons
699b6cee71dSXin LI
700b6cee71dSXin LI# ICE authority file data (Wolfram Kleff)
701b6cee71dSXin LI2	string		ICE		ICE authority data
702b6cee71dSXin LI
703b6cee71dSXin LI# X11 Xauthority file (Wolfram Kleff)
704b6cee71dSXin LI10	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
705b6cee71dSXin LI11	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
706b6cee71dSXin LI12	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
707b6cee71dSXin LI13	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
708b6cee71dSXin LI14	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
709b6cee71dSXin LI15	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
710b6cee71dSXin LI16	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
711b6cee71dSXin LI17	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
712b6cee71dSXin LI18	string		MIT-MAGIC-COOKIE-1	X11 Xauthority data
713b6cee71dSXin LI
714b6cee71dSXin LI# From: Maxime Henrion <mux@FreeBSD.org>
715b6cee71dSXin LI# PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
716b6cee71dSXin LI0	string		PGDMP		PostgreSQL custom database dump
717b6cee71dSXin LI>5	byte		x		- v%d
718b6cee71dSXin LI>6	byte		x		\b.%d
719b6cee71dSXin LI>5	beshort		<0x101		\b-0
720b6cee71dSXin LI>5	beshort		>0x100
721b6cee71dSXin LI>>7	byte		x		\b-%d
722b6cee71dSXin LI
723b6cee71dSXin LI# Type: Advanced Data Format (ADF) database
72448c779cdSXin LI# URL:  https://www.grc.nasa.gov/WWW/cgns/adf/
725b6cee71dSXin LI# From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
726b6cee71dSXin LI0	string	@(#)ADF\ Database	CGNS Advanced Data Format
727b6cee71dSXin LI
728b6cee71dSXin LI# Tokyo Cabinet magic data
729b6cee71dSXin LI# http://tokyocabinet.sourceforge.net/index.html
730b6cee71dSXin LI0	string		ToKyO\ CaBiNeT\n	Tokyo Cabinet
731b6cee71dSXin LI>14	string		x			\b (%s)
732b6cee71dSXin LI>32	byte		0			\b, Hash
733b6cee71dSXin LI!:mime	application/x-tokyocabinet-hash
734b6cee71dSXin LI>32	byte		1			\b, B+ tree
735b6cee71dSXin LI!:mime	application/x-tokyocabinet-btree
736b6cee71dSXin LI>32	byte		2			\b, Fixed-length
737b6cee71dSXin LI!:mime	application/x-tokyocabinet-fixed
738b6cee71dSXin LI>32	byte		3			\b, Table
739b6cee71dSXin LI!:mime	application/x-tokyocabinet-table
740b6cee71dSXin LI>33	byte		&1			\b, [open]
741b6cee71dSXin LI>33	byte		&2			\b, [fatal]
742b6cee71dSXin LI>34	byte		x			\b, apow=%d
743b6cee71dSXin LI>35	byte		x			\b, fpow=%d
744b6cee71dSXin LI>36	byte		&0x01			\b, [large]
745b6cee71dSXin LI>36	byte		&0x02			\b, [deflate]
746b6cee71dSXin LI>36	byte		&0x04			\b, [bzip]
747b6cee71dSXin LI>36	byte		&0x08			\b, [tcbs]
748b6cee71dSXin LI>36	byte		&0x10			\b, [excodec]
749b6cee71dSXin LI>40	lequad		x			\b, bnum=%lld
750b6cee71dSXin LI>48	lequad		x			\b, rnum=%lld
751b6cee71dSXin LI>56	lequad		x			\b, fsiz=%lld
752b6cee71dSXin LI
753b6cee71dSXin LI# Type:	QDBM Quick Database Manager
754b6cee71dSXin LI# From:	Benoit Sibaud <bsibaud@april.org>
755b6cee71dSXin LI0	string		\\[depot\\]\n\f		Quick Database Manager, little endian
756b6cee71dSXin LI0	string		\\[DEPOT\\]\n\f		Quick Database Manager, big endian
757b6cee71dSXin LI
758b6cee71dSXin LI# Type:	TokyoCabinet database
759b6cee71dSXin LI# URL:	http://tokyocabinet.sourceforge.net/
760b6cee71dSXin LI# From:	Benoit Sibaud <bsibaud@april.org>
761b6cee71dSXin LI0	string		ToKyO\ CaBiNeT\n	TokyoCabinet database
762b6cee71dSXin LI>14	string		x			(version %s)
763b6cee71dSXin LI
76448c779cdSXin LI# From:  Stephane Blondon https://www.yaal.fr
765b6cee71dSXin LI# Database file for Zope (done by FileStorage)
7669fc5c47fSXin LI0	string	FS21	Zope Object Database File Storage v3 (data)
7679fc5c47fSXin LI0	string	FS30	Zope Object Database File Storage v4 (data)
7689fc5c47fSXin LI
769b6cee71dSXin LI# Cache file for the database of Zope (done by ClientStorage)
770b6cee71dSXin LI0	string		ZEC3	Zope Object Database Client Cache File (data)
771b6cee71dSXin LI
772b6cee71dSXin LI# IDA (Interactive Disassembler) database
773b6cee71dSXin LI0	string		IDA1	IDA (Interactive Disassembler) database
7749ce06829SXin LI
77548c779cdSXin LI# Hopper (reverse engineering tool) https://www.hopperapp.com/
7769ce06829SXin LI0	string		hopperdb	Hopper database
7779ce06829SXin LI
7783e41d09dSXin LI# URL: https://en.wikipedia.org/wiki/Panorama_(database_engine)
7793e41d09dSXin LI# Reference: http://www.provue.com/Panorama/
7803e41d09dSXin LI# From: Joerg Jenderek
7813e41d09dSXin LI# NOTE: test only versions 4 and 6.0 with Windows
7823e41d09dSXin LI# length of Panorama database name
7833e41d09dSXin LI5	ubyte				>0
7843e41d09dSXin LI# look after database name for "some" null bits
7853e41d09dSXin LI>(5.B+7)	ubelong&0xF3ffF000	0
7863e41d09dSXin LI# look for first keyword
7873e41d09dSXin LI>>&1		search/2		DESIGN		Panorama database
7883e41d09dSXin LI#!:mime	application/x-panorama-database
7893e41d09dSXin LI!:apple	KASXZEPD
7903e41d09dSXin LI!:ext	pan
7913e41d09dSXin LI# database name
7923e41d09dSXin LI>>>5	pstring				x		\b, "%s"
793282e23f0SXin LI
794282e23f0SXin LI#
795282e23f0SXin LI#
796282e23f0SXin LI# askSam Database by Stefan A. Haubenthal <polluks@web.de>
797282e23f0SXin LI0	string	askw40\0	askSam DB
798282e23f0SXin LI
799282e23f0SXin LI#
800282e23f0SXin LI#
801282e23f0SXin LI# MUIbase Database Tool by Stefan A. Haubenthal <polluks@web.de>
802282e23f0SXin LI0	string	MBSTV\040	MUIbase DB
803282e23f0SXin LI>6	string	x		version %s
80440427ccaSGordon Tetlow
80540427ccaSGordon Tetlow#
80640427ccaSGordon Tetlow# CDB database
80740427ccaSGordon Tetlow0	string	NBCDB\012	NetBSD Constant Database
80840427ccaSGordon Tetlow>7	byte	x		\b, version %d
80940427ccaSGordon Tetlow>8	string	x		\b, for '%s'
81040427ccaSGordon Tetlow>24	lelong	x		\b, datasize %d
81140427ccaSGordon Tetlow>28	lelong	x		\b, entries %d
81240427ccaSGordon Tetlow>32	lelong	x		\b, index %d
81340427ccaSGordon Tetlow>36	lelong	x		\b, seed %#x
8142dc4dbb9SEitan Adler
8152dc4dbb9SEitan Adler#
8162dc4dbb9SEitan Adler# Redis RDB - https://redis.io/topics/persistence
8172dc4dbb9SEitan Adler0	string	REDIS			Redis RDB file,
8182dc4dbb9SEitan Adler>5	regex	[0-9][0-9][0-9][0-9]	version %s
8192dc4dbb9SEitan Adler
8202dc4dbb9SEitan Adler# Mork database.
8212dc4dbb9SEitan Adler# Used by older versions of Mozilla Suite and Firefox,
8222dc4dbb9SEitan Adler# and current versions of Thunderbird.
8232dc4dbb9SEitan Adler# From: David Korth <gerbilsoft@gerbilsoft.com>
8242dc4dbb9SEitan Adler0	string	//\ <!--\ <mdb:mork:z\ v="	Mozilla Mork database
8252dc4dbb9SEitan Adler>23	string	x		\b, version %.3s
8262726a701SXin LI
8272726a701SXin LI# URL:		https://en.wikipedia.org/wiki/Management_Information_Format
8282726a701SXin LI# Reference:	https://www.dmtf.org/sites/default/files/standards/documents/DSP0005.pdf
8292726a701SXin LI# From:		Joerg Jenderek
8302726a701SXin LI# Note:		only tested with monitor asset reports of Dell Display Manager
8312726a701SXin LI#		skip start like Language=fr|CA|iso8859-1
8322726a701SXin LI0	search/27/C	Start\040Component	DMI Management Information Format
8332726a701SXin LI#!:mime	text/plain
8342726a701SXin LI!:mime	text/x-dmtf-mif
8352726a701SXin LI!:ext	mif
8362726a701SXin LI
837