database 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. #------------------------------------------------------------------------------
  2. # $File: database,v 1.32 2013/02/06 14:18:52 christos Exp $
  3. # database: file(1) magic for various databases
  4. #
  5. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  6. #
  7. #
  8. # GDBM magic numbers
  9. # Will be maintained as part of the GDBM distribution in the future.
  10. # <downsj@teeny.org>
  11. 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
  12. !:mime application/x-gdbm
  13. 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
  14. !:mime application/x-gdbm
  15. 0 string GDBM GNU dbm 2.x database
  16. !:mime application/x-gdbm
  17. #
  18. # Berkeley DB
  19. #
  20. # Ian Darwin's file /etc/magic files: big/little-endian version.
  21. #
  22. # Hash 1.85/1.86 databases store metadata in network byte order.
  23. # Btree 1.85/1.86 databases store the metadata in host byte order.
  24. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  25. 0 long 0x00061561 Berkeley DB
  26. !:mime application/x-dbm
  27. >8 belong 4321
  28. >>4 belong >2 1.86
  29. >>4 belong <3 1.85
  30. >>4 belong >0 (Hash, version %d, native byte-order)
  31. >8 belong 1234
  32. >>4 belong >2 1.86
  33. >>4 belong <3 1.85
  34. >>4 belong >0 (Hash, version %d, little-endian)
  35. 0 belong 0x00061561 Berkeley DB
  36. >8 belong 4321
  37. >>4 belong >2 1.86
  38. >>4 belong <3 1.85
  39. >>4 belong >0 (Hash, version %d, big-endian)
  40. >8 belong 1234
  41. >>4 belong >2 1.86
  42. >>4 belong <3 1.85
  43. >>4 belong >0 (Hash, version %d, native byte-order)
  44. 0 long 0x00053162 Berkeley DB 1.85/1.86
  45. >4 long >0 (Btree, version %d, native byte-order)
  46. 0 belong 0x00053162 Berkeley DB 1.85/1.86
  47. >4 belong >0 (Btree, version %d, big-endian)
  48. 0 lelong 0x00053162 Berkeley DB 1.85/1.86
  49. >4 lelong >0 (Btree, version %d, little-endian)
  50. 12 long 0x00061561 Berkeley DB
  51. >16 long >0 (Hash, version %d, native byte-order)
  52. 12 belong 0x00061561 Berkeley DB
  53. >16 belong >0 (Hash, version %d, big-endian)
  54. 12 lelong 0x00061561 Berkeley DB
  55. >16 lelong >0 (Hash, version %d, little-endian)
  56. 12 long 0x00053162 Berkeley DB
  57. >16 long >0 (Btree, version %d, native byte-order)
  58. 12 belong 0x00053162 Berkeley DB
  59. >16 belong >0 (Btree, version %d, big-endian)
  60. 12 lelong 0x00053162 Berkeley DB
  61. >16 lelong >0 (Btree, version %d, little-endian)
  62. 12 long 0x00042253 Berkeley DB
  63. >16 long >0 (Queue, version %d, native byte-order)
  64. 12 belong 0x00042253 Berkeley DB
  65. >16 belong >0 (Queue, version %d, big-endian)
  66. 12 lelong 0x00042253 Berkeley DB
  67. >16 lelong >0 (Queue, version %d, little-endian)
  68. # From Max Bowsher.
  69. 12 long 0x00040988 Berkeley DB
  70. >16 long >0 (Log, version %d, native byte-order)
  71. 12 belong 0x00040988 Berkeley DB
  72. >16 belong >0 (Log, version %d, big-endian)
  73. 12 lelong 0x00040988 Berkeley DB
  74. >16 lelong >0 (Log, version %d, little-endian)
  75. #
  76. #
  77. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  78. 0 string RRD RRDTool DB
  79. >4 string x version %s
  80. #----------------------------------------------------------------------
  81. # ROOT: file(1) magic for ROOT databases
  82. #
  83. 0 string root\0 ROOT file
  84. >4 belong x Version %d
  85. >33 belong x (Compression: %d)
  86. # XXX: Weak magic.
  87. # Alex Ott <ott@jet.msk.su>
  88. ## Paradox file formats
  89. #2 leshort 0x0800 Paradox
  90. #>0x39 byte 3 v. 3.0
  91. #>0x39 byte 4 v. 3.5
  92. #>0x39 byte 9 v. 4.x
  93. #>0x39 byte 10 v. 5.x
  94. #>0x39 byte 11 v. 5.x
  95. #>0x39 byte 12 v. 7.x
  96. #>>0x04 byte 0 indexed .DB data file
  97. #>>0x04 byte 1 primary index .PX file
  98. #>>0x04 byte 2 non-indexed .DB data file
  99. #>>0x04 byte 3 non-incrementing secondary index .Xnn file
  100. #>>0x04 byte 4 secondary index .Ynn file
  101. #>>0x04 byte 5 incrementing secondary index .Xnn file
  102. #>>0x04 byte 6 non-incrementing secondary index .XGn file
  103. #>>0x04 byte 7 secondary index .YGn file
  104. #>>>0x04 byte 8 incrementing secondary index .XGn file
  105. ## XBase database files
  106. #0 byte 0x02
  107. #>8 leshort >0
  108. #>>12 leshort 0 FoxBase
  109. #!:mime application/x-dbf
  110. #>>>0x04 lelong 0 (no records)
  111. #>>>0x04 lelong >0 (%ld records)
  112. #
  113. #0 byte 0x03
  114. #!:mime application/x-dbf
  115. #>8 leshort >0
  116. #>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo
  117. #>>>0x04 lelong 0 (no records)
  118. #>>>0x04 lelong >0 (%ld records)
  119. #
  120. #0 byte 0x04
  121. #!:mime application/x-dbf
  122. #>8 leshort >0
  123. #>>12 leshort 0 dBASE IV no memo file
  124. #>>>0x04 lelong 0 (no records)
  125. #>>>0x04 lelong >0 (%ld records)
  126. #
  127. #0 byte 0x05
  128. #!:mime application/x-dbf
  129. #>8 leshort >0
  130. #>>12 leshort 0 dBASE V no memo file
  131. #>>>0x04 lelong 0 (no records)
  132. #>>>0x04 lelong >0 (%ld records)
  133. #
  134. #0 byte 0x30
  135. #!:mime application/x-dbf
  136. #>8 leshort >0
  137. #>>12 leshort 0 Visual FoxPro
  138. #>>>0x04 lelong 0 (no records)
  139. #>>>0x04 lelong >0 (%ld records)
  140. #
  141. #0 byte 0x43
  142. #!:mime application/x-dbf
  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. #!:mime application/x-dbf
  150. #>8 leshort >0
  151. #>>12 leshort 0 dBASEIV with memo
  152. #>>>0x04 lelong 0 (no records)
  153. #>>>0x04 lelong >0 (%ld records)
  154. #
  155. #0 byte 0x83
  156. #!:mime application/x-dbf
  157. #>8 leshort >0
  158. #>>12 leshort 0 FoxBase+, dBaseIII+ with memo
  159. #>>>0x04 lelong 0 (no records)
  160. #>>>0x04 lelong >0 (%ld records)
  161. #
  162. #0 byte 0x8b
  163. #!:mime application/x-dbf
  164. #>8 leshort >0
  165. #>>12 leshort 0 dBaseIV with memo
  166. #>>>0x04 lelong 0 (no records)
  167. #>>>0x04 lelong >0 (%ld records)
  168. #
  169. #0 byte 0x8e
  170. #!:mime application/x-dbf
  171. #>8 leshort >0
  172. #>>12 leshort 0 dBaseIV with SQL Table
  173. #>>>0x04 lelong 0 (no records)
  174. #>>>0x04 lelong >0 (%ld records)
  175. #
  176. #0 byte 0xb3
  177. #!:mime application/x-dbf
  178. #>8 leshort >0
  179. #>>12 leshort 0 FlagShip with .dbt memo
  180. #>>>0x04 lelong 0 (no records)
  181. #>>>0x04 lelong >0 (%ld records)
  182. #
  183. #0 byte 0xf5
  184. #!:mime application/x-dbf
  185. #>8 leshort >0
  186. #>>12 leshort 0 FoxPro with memo
  187. #>>>0x04 lelong 0 (no records)
  188. #>>>0x04 lelong >0 (%ld records)
  189. #
  190. #0 leshort 0x0006 DBase 3 index file
  191. # MS Access database
  192. 4 string Standard\ Jet\ DB Microsoft Access Database
  193. !:mime application/x-msaccess
  194. 4 string Standard\ ACE\ DB Microsoft Access Database
  195. !:mime application/x-msaccess
  196. # TDB database from Samba et al - Martin Pool <mbp@samba.org>
  197. 0 string TDB\ file TDB database
  198. >32 lelong 0x2601196D version 6, little-endian
  199. >>36 lelong x hash size %d bytes
  200. # SE Linux policy database
  201. 0 lelong 0xf97cff8c SE Linux policy
  202. >16 lelong x v%d
  203. >20 lelong 1 MLS
  204. >24 lelong x %d symbols
  205. >28 lelong x %d ocons
  206. # ICE authority file data (Wolfram Kleff)
  207. 2 string ICE ICE authority data
  208. # X11 Xauthority file (Wolfram Kleff)
  209. 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  210. 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  211. 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  212. 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  213. 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  214. 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  215. 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  216. 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  217. 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  218. # From: Maxime Henrion <mux@FreeBSD.org>
  219. # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
  220. 0 string PGDMP PostgreSQL custom database dump
  221. >5 byte x - v%d
  222. >6 byte x \b.%d
  223. >5 beshort <0x101 \b-0
  224. >5 beshort >0x100
  225. >>7 byte x \b-%d
  226. # Type: Advanced Data Format (ADF) database
  227. # URL: http://www.grc.nasa.gov/WWW/cgns/adf/
  228. # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
  229. 0 string @(#)ADF\ Database CGNS Advanced Data Format
  230. # Tokyo Cabinet magic data
  231. # http://tokyocabinet.sourceforge.net/index.html
  232. 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
  233. >14 string x \b (%s)
  234. >32 byte 0 \b, Hash
  235. !:mime application/x-tokyocabinet-hash
  236. >32 byte 1 \b, B+ tree
  237. !:mime application/x-tokyocabinet-btree
  238. >32 byte 2 \b, Fixed-length
  239. !:mime application/x-tokyocabinet-fixed
  240. >32 byte 3 \b, Table
  241. !:mime application/x-tokyocabinet-table
  242. >33 byte &1 \b, [open]
  243. >33 byte &2 \b, [fatal]
  244. >34 byte x \b, apow=%d
  245. >35 byte x \b, fpow=%d
  246. >36 byte &0x01 \b, [large]
  247. >36 byte &0x02 \b, [deflate]
  248. >36 byte &0x04 \b, [bzip]
  249. >36 byte &0x08 \b, [tcbs]
  250. >36 byte &0x10 \b, [excodec]
  251. >40 lequad x \b, bnum=%lld
  252. >48 lequad x \b, rnum=%lld
  253. >56 lequad x \b, fsiz=%lld
  254. # Type: QDBM Quick Database Manager
  255. # From: Benoit Sibaud <bsibaud@april.org>
  256. 0 string \\[depot\\]\n\f Quick Database Manager, little endian
  257. 0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
  258. # Type: TokyoCabinet database
  259. # URL: http://tokyocabinet.sourceforge.net/
  260. # From: Benoit Sibaud <bsibaud@april.org>
  261. 0 string ToKyO\ CaBiNeT\n TokyoCabinet database
  262. >14 string x (version %s)
  263. # From: Stephane Blondon http://www.yaal.fr
  264. # Database file for Zope (done by FileStorage)
  265. 0 string FS21 Zope Object Database File Storage (data)
  266. # Cache file for the database of Zope (done by ClientStorage)
  267. 0 string ZEC3 Zope Object Database Client Cache File (data)
  268. # IDA (Interactive Disassembler) database
  269. 0 string IDA1 IDA (Interactive Disassembler) database