database 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. #------------------------------------------------------------------------------
  2. # database: file(1) magic for various databases
  3. #
  4. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  5. #
  6. #
  7. # GDBM magic numbers
  8. # Will be maintained as part of the GDBM distribution in the future.
  9. # <downsj@teeny.org>
  10. 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
  11. !:mime application/x-gdbm
  12. 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
  13. !:mime application/x-gdbm
  14. 0 string GDBM GNU dbm 2.x database
  15. !:mime application/x-gdbm
  16. #
  17. # Berkeley DB
  18. #
  19. # Ian Darwin's file /etc/magic files: big/little-endian version.
  20. #
  21. # Hash 1.85/1.86 databases store metadata in network byte order.
  22. # Btree 1.85/1.86 databases store the metadata in host byte order.
  23. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  24. 0 long 0x00061561 Berkeley DB
  25. !:mime application/x-dbm
  26. >8 belong 4321
  27. >>4 belong >2 1.86
  28. >>4 belong <3 1.85
  29. >>4 belong >0 (Hash, version %d, native byte-order)
  30. >8 belong 1234
  31. >>4 belong >2 1.86
  32. >>4 belong <3 1.85
  33. >>4 belong >0 (Hash, version %d, little-endian)
  34. 0 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. 0 long 0x00053162 Berkeley DB 1.85/1.86
  44. >4 long >0 (Btree, version %d, native byte-order)
  45. 0 belong 0x00053162 Berkeley DB 1.85/1.86
  46. >4 belong >0 (Btree, version %d, big-endian)
  47. 0 lelong 0x00053162 Berkeley DB 1.85/1.86
  48. >4 lelong >0 (Btree, version %d, little-endian)
  49. 12 long 0x00061561 Berkeley DB
  50. >16 long >0 (Hash, version %d, native byte-order)
  51. 12 belong 0x00061561 Berkeley DB
  52. >16 belong >0 (Hash, version %d, big-endian)
  53. 12 lelong 0x00061561 Berkeley DB
  54. >16 lelong >0 (Hash, version %d, little-endian)
  55. 12 long 0x00053162 Berkeley DB
  56. >16 long >0 (Btree, version %d, native byte-order)
  57. 12 belong 0x00053162 Berkeley DB
  58. >16 belong >0 (Btree, version %d, big-endian)
  59. 12 lelong 0x00053162 Berkeley DB
  60. >16 lelong >0 (Btree, version %d, little-endian)
  61. 12 long 0x00042253 Berkeley DB
  62. >16 long >0 (Queue, version %d, native byte-order)
  63. 12 belong 0x00042253 Berkeley DB
  64. >16 belong >0 (Queue, version %d, big-endian)
  65. 12 lelong 0x00042253 Berkeley DB
  66. >16 lelong >0 (Queue, version %d, little-endian)
  67. # From Max Bowsher.
  68. 12 long 0x00040988 Berkeley DB
  69. >16 long >0 (Log, version %d, native byte-order)
  70. 12 belong 0x00040988 Berkeley DB
  71. >16 belong >0 (Log, version %d, big-endian)
  72. 12 lelong 0x00040988 Berkeley DB
  73. >16 lelong >0 (Log, version %d, little-endian)
  74. #
  75. #
  76. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  77. 0 string RRD RRDTool DB
  78. >4 string x version %s
  79. #----------------------------------------------------------------------
  80. # ROOT: file(1) magic for ROOT databases
  81. #
  82. 0 string root\0 ROOT file
  83. >4 belong x Version %d
  84. >33 belong x (Compression: %d)
  85. # XXX: Weak magic.
  86. # Alex Ott <ott@jet.msk.su>
  87. ## Paradox file formats
  88. #2 leshort 0x0800 Paradox
  89. #>0x39 byte 3 v. 3.0
  90. #>0x39 byte 4 v. 3.5
  91. #>0x39 byte 9 v. 4.x
  92. #>0x39 byte 10 v. 5.x
  93. #>0x39 byte 11 v. 5.x
  94. #>0x39 byte 12 v. 7.x
  95. #>>0x04 byte 0 indexed .DB data file
  96. #>>0x04 byte 1 primary index .PX file
  97. #>>0x04 byte 2 non-indexed .DB data file
  98. #>>0x04 byte 3 non-incrementing secondary index .Xnn file
  99. #>>0x04 byte 4 secondary index .Ynn file
  100. #>>0x04 byte 5 incrementing secondary index .Xnn file
  101. #>>0x04 byte 6 non-incrementing secondary index .XGn file
  102. #>>0x04 byte 7 secondary index .YGn file
  103. #>>>0x04 byte 8 incrementing secondary index .XGn file
  104. ## XBase database files
  105. #0 byte 0x02
  106. #>8 leshort >0
  107. #>>12 leshort 0 FoxBase
  108. #!:mime application/x-dbf
  109. #>>>0x04 lelong 0 (no records)
  110. #>>>0x04 lelong >0 (%ld records)
  111. #
  112. #0 byte 0x03
  113. #!:mime application/x-dbf
  114. #>8 leshort >0
  115. #>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo
  116. #>>>0x04 lelong 0 (no records)
  117. #>>>0x04 lelong >0 (%ld records)
  118. #
  119. #0 byte 0x04
  120. #!:mime application/x-dbf
  121. #>8 leshort >0
  122. #>>12 leshort 0 dBASE IV no memo file
  123. #>>>0x04 lelong 0 (no records)
  124. #>>>0x04 lelong >0 (%ld records)
  125. #
  126. #0 byte 0x05
  127. #!:mime application/x-dbf
  128. #>8 leshort >0
  129. #>>12 leshort 0 dBASE V no memo file
  130. #>>>0x04 lelong 0 (no records)
  131. #>>>0x04 lelong >0 (%ld records)
  132. #
  133. #0 byte 0x30
  134. #!:mime application/x-dbf
  135. #>8 leshort >0
  136. #>>12 leshort 0 Visual FoxPro
  137. #>>>0x04 lelong 0 (no records)
  138. #>>>0x04 lelong >0 (%ld records)
  139. #
  140. #0 byte 0x43
  141. #!:mime application/x-dbf
  142. #>8 leshort >0
  143. #>>12 leshort 0 FlagShip with memo var size
  144. #>>>0x04 lelong 0 (no records)
  145. #>>>0x04 lelong >0 (%ld records)
  146. #
  147. #0 byte 0x7b
  148. #!:mime application/x-dbf
  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. #!:mime application/x-dbf
  156. #>8 leshort >0
  157. #>>12 leshort 0 FoxBase+, dBaseIII+ with memo
  158. #>>>0x04 lelong 0 (no records)
  159. #>>>0x04 lelong >0 (%ld records)
  160. #
  161. #0 byte 0x8b
  162. #!:mime application/x-dbf
  163. #>8 leshort >0
  164. #>>12 leshort 0 dBaseIV with memo
  165. #>>>0x04 lelong 0 (no records)
  166. #>>>0x04 lelong >0 (%ld records)
  167. #
  168. #0 byte 0x8e
  169. #!:mime application/x-dbf
  170. #>8 leshort >0
  171. #>>12 leshort 0 dBaseIV with SQL Table
  172. #>>>0x04 lelong 0 (no records)
  173. #>>>0x04 lelong >0 (%ld records)
  174. #
  175. #0 byte 0xb3
  176. #!:mime application/x-dbf
  177. #>8 leshort >0
  178. #>>12 leshort 0 FlagShip with .dbt memo
  179. #>>>0x04 lelong 0 (no records)
  180. #>>>0x04 lelong >0 (%ld records)
  181. #
  182. #0 byte 0xf5
  183. #!:mime application/x-dbf
  184. #>8 leshort >0
  185. #>>12 leshort 0 FoxPro with memo
  186. #>>>0x04 lelong 0 (no records)
  187. #>>>0x04 lelong >0 (%ld records)
  188. #
  189. #0 leshort 0x0006 DBase 3 index file
  190. # MS Access database
  191. 4 string Standard\ Jet\ DB Microsoft Access Database
  192. !:mime application/x-msaccess
  193. # TDB database from Samba et al - Martin Pool <mbp@samba.org>
  194. 0 string TDB\ file TDB database
  195. >32 lelong 0x2601196D version 6, little-endian
  196. >>36 lelong x hash size %d bytes
  197. # SE Linux policy database
  198. 0 lelong 0xf97cff8c SE Linux policy
  199. >16 lelong x v%d
  200. >20 lelong 1 MLS
  201. >24 lelong x %d symbols
  202. >28 lelong x %d ocons
  203. # ICE authority file data (Wolfram Kleff)
  204. 2 string ICE ICE authority data
  205. # X11 Xauthority file (Wolfram Kleff)
  206. 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  207. 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  208. 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  209. 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  210. 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  211. 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  212. 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  213. 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  214. 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  215. # From: Maxime Henrion <mux@FreeBSD.org>
  216. # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
  217. 0 string PGDMP PostgreSQL custom database dump
  218. >5 byte x - v%d
  219. >6 byte x \b.%d
  220. >5 beshort <0x101 \b-0
  221. >5 beshort >0x100
  222. >>7 byte x \b-%d
  223. # Type: Advanced Data Format (ADF) database
  224. # URL: http://www.grc.nasa.gov/WWW/cgns/adf/
  225. # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
  226. 0 string @(#)ADF\ Database CGNS Advanced Data Format