database 6.2 KB

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