1# $OpenBSD: database,v 1.5 2008/05/08 01:40:57 chl Exp $ 2 3#------------------------------------------------------------------------------ 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 0x13579ace GNU dbm 1.x or ndbm database, big endian 130 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian 140 string GDBM GNU dbm 2.x database 15# 16# Berkeley DB 17# 18# Ian Darwin's file /etc/magic files: big/little-endian version. 19# 20# Hash 1.85/1.86 databases store metadata in network byte order. 21# Btree 1.85/1.86 databases store the metadata in host byte order. 22# Hash and Btree 2.X and later databases store the metadata in host byte order. 23 240 long 0x00061561 Berkeley DB 25>8 belong 4321 26>>4 belong >2 1.86 27>>4 belong <3 1.85 28>>4 belong >0 (Hash, version %d, native byte-order) 29>8 belong 1234 30>>4 belong >2 1.86 31>>4 belong <3 1.85 32>>4 belong >0 (Hash, version %d, little-endian) 33 340 belong 0x00061561 Berkeley DB 35>8 belong 4321 36>>4 belong >2 1.86 37>>4 belong <3 1.85 38>>4 belong >0 (Hash, version %d, big-endian) 39>8 belong 1234 40>>4 belong >2 1.86 41>>4 belong <3 1.85 42>>4 belong >0 (Hash, version %d, native byte-order) 43 440 long 0x00053162 Berkeley DB 1.85/1.86 45>4 long >0 (Btree, version %d, native byte-order) 460 belong 0x00053162 Berkeley DB 1.85/1.86 47>4 belong >0 (Btree, version %d, big-endian) 480 lelong 0x00053162 Berkeley DB 1.85/1.86 49>4 lelong >0 (Btree, version %d, little-endian) 50 5112 long 0x00061561 Berkeley DB 52>16 long >0 (Hash, version %d, native byte-order) 5312 belong 0x00061561 Berkeley DB 54>16 belong >0 (Hash, version %d, big-endian) 5512 lelong 0x00061561 Berkeley DB 56>16 lelong >0 (Hash, version %d, little-endian) 57 5812 long 0x00053162 Berkeley DB 59>16 long >0 (Btree, version %d, native byte-order) 6012 belong 0x00053162 Berkeley DB 61>16 belong >0 (Btree, version %d, big-endian) 6212 lelong 0x00053162 Berkeley DB 63>16 lelong >0 (Btree, version %d, little-endian) 64 6512 long 0x00042253 Berkeley DB 66>16 long >0 (Queue, version %d, native byte-order) 6712 belong 0x00042253 Berkeley DB 68>16 belong >0 (Queue, version %d, big-endian) 6912 lelong 0x00042253 Berkeley DB 70>16 lelong >0 (Queue, version %d, little-endian) 71 72# From Max Bowsher. 7312 long 0x00040988 Berkeley DB 74>16 long >0 (Log, version %d, native byte-order) 7512 belong 0x00040988 Berkeley DB 76>16 belong >0 (Log, version %d, big-endian) 7712 lelong 0x00040988 Berkeley DB 78>16 lelong >0 (Log, version %d, little-endian) 79 80# 81# 82# Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch> 830 string RRD RRDTool DB 84>4 string x version %s 85#---------------------------------------------------------------------- 86# ROOT: file(1) magic for ROOT databases 87# 880 string root\0 ROOT file 89>4 belong x Version %d 90>33 belong x (Compression: %d) 91 92# XXX: Weak magic. 93# Alex Ott <ott@jet.msk.su> 94## Paradox file formats 95#2 leshort 0x0800 Paradox 96#>0x39 byte 3 v. 3.0 97#>0x39 byte 4 v. 3.5 98#>0x39 byte 9 v. 4.x 99#>0x39 byte 10 v. 5.x 100#>0x39 byte 11 v. 5.x 101#>0x39 byte 12 v. 7.x 102#>>0x04 byte 0 indexed .DB data file 103#>>0x04 byte 1 primary index .PX file 104#>>0x04 byte 2 non-indexed .DB data file 105#>>0x04 byte 3 non-incrementing secondary index .Xnn file 106#>>0x04 byte 4 secondary index .Ynn file 107#>>0x04 byte 5 incrementing secondary index .Xnn file 108#>>0x04 byte 6 non-incrementing secondary index .XGn file 109#>>0x04 byte 7 secondary index .YGn file 110#>>>0x04 byte 8 incrementing secondary index .XGn file 111## XBase database files 112#0 byte 0x02 113#>8 leshort >0 114#>>12 leshort 0 FoxBase 115#>>>0x04 lelong 0 (no records) 116#>>>0x04 lelong >0 (%ld records) 117# 118#0 byte 0x03 119#>8 leshort >0 120#>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 121#>>>0x04 lelong 0 (no records) 122#>>>0x04 lelong >0 (%ld records) 123# 124#0 byte 0x04 125#>8 leshort >0 126#>>12 leshort 0 dBASE IV no memo file 127#>>>0x04 lelong 0 (no records) 128#>>>0x04 lelong >0 (%ld records) 129# 130#0 byte 0x05 131#>8 leshort >0 132#>>12 leshort 0 dBASE V no memo file 133#>>>0x04 lelong 0 (no records) 134#>>>0x04 lelong >0 (%ld records) 135# 136#0 byte 0x30 137#>8 leshort >0 138#>>12 leshort 0 Visual FoxPro 139#>>>0x04 lelong 0 (no records) 140#>>>0x04 lelong >0 (%ld records) 141# 142#0 byte 0x43 143#>8 leshort >0 144#>>12 leshort 0 FlagShip with memo var size 145#>>>0x04 lelong 0 (no records) 146#>>>0x04 lelong >0 (%ld records) 147# 148#0 byte 0x7b 149#>8 leshort >0 150#>>12 leshort 0 dBASEIV with memo 151#>>>0x04 lelong 0 (no records) 152#>>>0x04 lelong >0 (%ld records) 153# 154#0 byte 0x83 155#>8 leshort >0 156#>>12 leshort 0 FoxBase+, dBaseIII+ with memo 157#>>>0x04 lelong 0 (no records) 158#>>>0x04 lelong >0 (%ld records) 159# 160#0 byte 0x8b 161#>8 leshort >0 162#>>12 leshort 0 dBaseIV with memo 163#>>>0x04 lelong 0 (no records) 164#>>>0x04 lelong >0 (%ld records) 165# 166#0 byte 0x8e 167#>8 leshort >0 168#>>12 leshort 0 dBaseIV with SQL Table 169#>>>0x04 lelong 0 (no records) 170#>>>0x04 lelong >0 (%ld records) 171# 172#0 byte 0xb3 173#>8 leshort >0 174#>>12 leshort 0 FlagShip with .dbt memo 175#>>>0x04 lelong 0 (no records) 176#>>>0x04 lelong >0 (%ld records) 177# 178#0 byte 0xf5 179#>8 leshort >0 180#>>12 leshort 0 FoxPro with memo 181#>>>0x04 lelong 0 (no records) 182#>>>0x04 lelong >0 (%ld records) 183# 184#0 leshort 0x0006 DBase 3 index file 185 186# MS Access database 1874 string Standard\ Jet\ DB Microsoft Access Database 188 189# TDB database from Samba et al - Martin Pool <mbp@samba.org> 1900 string TDB\ file TDB database 191>32 lelong 0x2601196D version 6, little-endian 192>>36 lelong x hash size %d bytes 193 194# SE Linux policy database 1950 lelong 0xf97cff8c SE Linux policy 196>16 lelong x v%d 197>20 lelong 1 MLS 198>24 lelong x %d symbols 199>28 lelong x %d ocons 200 201# ICE authority file data (Wolfram Kleff) 2022 string ICE ICE authority data 203 204# X11 Xauthority file (Wolfram Kleff) 20510 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 20611 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 20712 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 20813 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 20914 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 21015 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 21116 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 21217 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 21318 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 214