home *** CD-ROM | disk | FTP | other *** search
/ Enter 2006 October / Enter 10 2006.iso / boot / isolinux / initrd / in / usr / share / file / magic
Encoding:
Text File  |  2005-09-09  |  327.4 KB  |  9,578 lines

  1. # Magic
  2. # Magic data for file(1) command.
  3. # Machine-generated from src/cmd/file/magdir/*; edit there only!
  4. # Format is described in magic(files), where:
  5. # files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID.
  6.  
  7. #------------------------------------------------------------------------------
  8. # Localstuff:  file(1) magic for locally observed files
  9. #
  10. # $Id: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
  11. # Add any locally observed files here.  Remember:
  12. # text if readable, executable if runnable binary, data if unreadable.
  13. #------------------------------------------------------------------------------
  14. # acorn:  file(1) magic for files found on Acorn systems
  15. #
  16.  
  17. # RISC OS Chunk File Format
  18. # From RISC OS Programmer's Reference Manual, Appendix D
  19. # We guess the file type from the type of the first chunk.
  20. 0    lelong        0xc3cbc6c5    RISC OS Chunk data
  21. >12    string        OBJ_        \b, AOF object
  22. >12    string        LIB_        \b, ALF library
  23.  
  24. # RISC OS AIF, contains "SWI OS_Exit" at offset 16.
  25. 16    lelong        0xef000011    RISC OS AIF executable
  26.  
  27. # RISC OS Draw files
  28. # From RISC OS Programmer's Reference Manual, Appendix E
  29. 0    string         Draw        RISC OS Draw file data
  30.  
  31. # RISC OS new format font files
  32. # From RISC OS Programmer's Reference Manual, Appendix E
  33. 0    string        FONT\0        RISC OS outline font data,
  34. >5    byte        x        version %d
  35. 0    string        FONT\1        RISC OS 1bpp font data,
  36. >5    byte        x        version %d
  37. 0    string        FONT\4        RISC OS 4bpp font data
  38. >5    byte        x        version %d
  39.  
  40. # RISC OS Music files
  41. # From RISC OS Programmer's Reference Manual, Appendix E
  42. 0    string        Maestro\r    RISC OS music file
  43. >8    byte        x        version %d
  44.  
  45.  
  46. #------------------------------------------------------------------------------
  47. # adi: file(1) magic for ADi's objects
  48. # From Gregory McGarry <g.mcgarry@ieee.org>
  49. #
  50. 0    leshort        0x521c        COFF DSP21k
  51. >18    lelong        &02        executable,
  52. >18    lelong        ^02
  53. >>18    lelong        &01        static object,
  54. >>18    lelong        ^01        relocatable object,
  55. >18    lelong        &010        stripped
  56. >18    lelong        ^010        not stripped
  57.  
  58. #------------------------------------------------------------------------------
  59. # adventure: file(1) magic for Adventure game files
  60. #
  61. # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
  62. # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
  63. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  64. #
  65. # ALAN
  66. # I assume there are other, lower versions, but these are the only ones I
  67. # saw in the archive.
  68. 0    beshort    0x0206    ALAN game data
  69. >2    byte    <10    version 2.6%d
  70.  
  71. # Conflicts with too much other stuff!
  72. # Infocom
  73. # (Note: to avoid false matches Z-machine version 1 and 2 are not
  74. # recognized since only the oldest Zork I and II used them.  Similarly
  75. # there are 4 Infocom games that use verion 4 that are not recognized.)
  76. #0    byte    3    Infocom game data (Z-machine 3,
  77. #>2    beshort    <0x7fff    Release %3d,
  78. #>26    beshort >0    Size %d*2
  79. #>18    string    >\0    Serial %.6s)
  80. #0    byte    5    Infocom game data (Z-machine 5,
  81. #>2    beshort    <0x7fff    Release %3d,
  82. #>26    beshort >0    Size %d*4
  83. #>18    string    >\0    Serial %.6s)
  84. #0    byte    6    Infocom game data (Z-machine 6,
  85. #>2    beshort    <0x7fff    Release %3d,
  86. #>26    beshort >0    Size %d*8
  87. #>18    string    >\0    Serial %.6s)
  88. #0    byte    8    Infocom game data (Z-machine 8,
  89. #>2    beshort    <0x7fff    Release %3d,
  90. #>26    beshort >0    Size %d*8
  91. #>18    string    >\0    Serial %.6s)
  92.  
  93. # TADS (Text Adventure Development System)
  94. #  All files are machine-independent (games compile to byte-code) and are tagged
  95. #  with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
  96. #  on the way).
  97. #  Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
  98. 0    string    TADS2\ bin    TADS
  99. >9    belong  !0x0A0D1A00    game data, CORRUPTED
  100. >9    belong     0x0A0D1A00
  101. >>13    string    >\0        %s game data
  102. #  Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
  103. 0    string    TADS2\ rsc    TADS
  104. >9    belong  !0x0A0D1A00    resource data, CORRUPTED
  105. >9    belong     0x0A0D1A00
  106. >>13    string    >\0        %s resource data
  107. #  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
  108. #  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
  109. # "TADS2 save\n\r\032\0" and the interpreter version. 
  110. 0    string    TADS2\ save/g    TADS
  111. >12    belong    !0x0A0D1A00    saved game data, CORRUPTED
  112. >12    belong     0x0A0D1A00
  113. >>(16.s+32) string >\0        %s saved game data
  114. #  Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
  115. #  version.
  116. 0    string    TADS2\ save    TADS
  117. >10    belong    !0x0A0D1A00    saved game data, CORRUPTED
  118. >10    belong     0x0A0D1A00
  119. >>14    string    >\0        %s saved game data
  120. #------------------------------------------------------------------------------
  121. # allegro:  file(1) magic for Allegro datafiles
  122. # Toby Deshane <hac@shoelace.digivill.net>
  123. #
  124. 0 belong 0x736C6821   Allegro datafile (packed)
  125. 0 belong 0x736C682E   Allegro datafile (not packed/autodetect)
  126. 0 belong 0x736C682B   Allegro datafile (appended exe data)
  127.  
  128. #------------------------------------------------------------------------------
  129. # alliant:  file(1) magic for Alliant FX series a.out files
  130. #
  131. # If the FX series is the one that had a processor with a 68K-derived
  132. # instruction set, the "short" should probably become "beshort" and the
  133. # "long" should probably become "belong".
  134. # If it's the i860-based one, they should probably become either the
  135. # big-endian or little-endian versions, depending on the mode they ran
  136. # the 860 in....
  137. #
  138. 0    short        0420        0420 Alliant virtual executable
  139. >2    short        &0x0020        common library
  140. >16    long        >0        not stripped
  141. 0    short        0421        0421 Alliant compact executable
  142. >2    short        &0x0020        common library
  143. >16    long        >0        not stripped
  144. #------------------------------------------------------------------------------
  145. # alpha architecture description
  146. #
  147.  
  148. 0    leshort        0603        COFF format alpha
  149. >22    leshort&030000    !020000        executable
  150. >24    leshort        0410        pure
  151. >24    leshort        0413        paged
  152. >22    leshort&020000    !0        dynamically linked
  153. >16    lelong        !0        not stripped
  154. >16    lelong        0        stripped
  155. >22    leshort&030000    020000        shared library
  156. >24    leshort        0407        object
  157. >27    byte        x        - version %d
  158. >26    byte        x        .%d
  159. >28    byte        x        -%d
  160.  
  161. # Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
  162. #
  163. # The actual magic number is just "Core", followed by a 2-byte version
  164. # number; however, treating any file that begins with "Core" as a Digital
  165. # UNIX core dump file may produce too many false hits, so we include one
  166. # byte of the version number as well; DU 5.0 appears only to be up to
  167. # version 2.
  168. #
  169. 0    string        Core\001    Alpha COFF format core dump (Digital UNIX)
  170. >24    string        >\0        \b, from '%s'
  171. 0    string        Core\002    Alpha COFF format core dump (Digital UNIX)
  172. >24    string        >\0        \b, from '%s'
  173.  
  174. #------------------------------------------------------------------------------
  175. # amanda:  file(1) magic for amanda file format
  176. #
  177. 0    string    AMANDA:\         AMANDA 
  178. >8    string    TAPESTART\ DATE        tape header file,
  179. >>23    string    X
  180. >>>25    string    >\             Unused %s
  181. >>23    string    >\             DATE %s
  182. >8    string    FILE\             dump file,
  183. >>13    string    >\             DATE %s
  184. #------------------------------------------------------------------------------
  185. # amigaos:  file(1) magic for AmigaOS binary formats:
  186.  
  187. #
  188. # From ignatios@cs.uni-bonn.de (Ignatios Souvatzis)
  189. # Some formats are still missing: AmigaOS special IFF's, e.g.: FORM....CTLG
  190. # (the others should be separate, anyway)
  191. #
  192. 0    belong        0x000003f3    AmigaOS loadseg()ble executable/binary
  193. 0    belong        0x000003e7    AmigaOS object/library data
  194. #
  195. 0    beshort        0xe310        Amiga Workbench
  196. >2    beshort        1        
  197. >>48    byte        1        disk icon
  198. >>48    byte        2        drawer icon
  199. >>48    byte        3        tool icon
  200. >>48    byte        4        project icon
  201. >>48    byte        5        garbage icon
  202. >>48    byte        6        device icon
  203. >>48    byte        7        kickstart icon
  204. >>48    byte        8        workbench application icon
  205. >2    beshort        >1        icon, vers. %d
  206. #
  207. # various sound formats from the Amiga
  208. # G=F6tz Waschk <waschk@informatik.uni-rostock.de>
  209. #
  210. 0    string        FC14        Future Composer 1.4 Module sound file
  211. 0    string        SMOD        Future Composer 1.3 Module sound file
  212. 0    string        AON4artofnoise    Art Of Noise Module sound file
  213. 1    string        MUGICIAN/SOFTEYES Mugician Module sound file
  214. 58    string        SIDMON\ II\ -\ THE    Sidmon 2.0 Module sound file
  215. 0    string        Synth4.0    Synthesis Module sound file
  216. 0    string        ARP.        The Holy Noise Module sound file
  217. 0    string        BeEp\0        JamCracker Module sound file
  218. 0    string        COSO\0        Hippel-COSO Module sound file
  219. # Too simple (short, pure ASCII, deep), MPi
  220. #26    string        V.3        Brian Postma's Soundmon Module sound file v3
  221. #26    string        BPSM        Brian Postma's Soundmon Module sound file v3
  222. #26    string        V.2        Brian Postma's Soundmon Module sound file v2
  223.  
  224. # The following are from: "Stefan A. Haubenthal" <polluks@web.de>
  225. 0    beshort        0x0f00        AmigaOS bitmap font
  226. 0    beshort        0x0f03        AmigaOS outline font
  227. 0    belong        0x80001001    AmigaOS outline tag
  228. 0    string        ##\ version    catalog translation
  229.  
  230. 0    string        FORM        IFF data
  231. >8    string        CTLG        \b, CTLG message catalog
  232. >8    string        PREF        \b, PREF preferences
  233.  
  234. 0    string        Rar!        RAR archive data,
  235. >44    byte        x        v%0x,
  236. >35    byte        0        os: MS-DOS
  237. >35    byte        1        os: OS/2
  238. >35    byte        2        os: Win32
  239. >35    byte        3        os: Unix
  240.  
  241. 0    belong        0x000003fa    AmigaOS shared library
  242.  
  243. # Amiga disk types
  244. 0    string        RDSK        Rigid Disk Block
  245. >160    string        x        on %.24s
  246. 0    string        DOS\0        Amiga DOS disk
  247. 0    string        DOS\1        Amiga FFS disk
  248. 0    string        DOS\2        Amiga Inter DOS disk
  249. 0    string        DOS\3        Amiga Inter FFS disk
  250. 0    string        DOS\4        Amiga Fastdir DOS disk
  251. 0    string        DOS\5        Amiga Fastdir FFS disk
  252. 0    string        KICK        Kickstart disk
  253.  
  254. #------------------------------------------------------------------------------
  255. # animation:  file(1) magic for animation/movie formats
  256. #
  257. # animation formats
  258. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  259. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  260.  
  261. # MPEG animation format
  262. 0    belong        0x000001b3        MPEG video stream data
  263. #>4    beshort&0xfff0    x            (%d x
  264. #>5    beshort&0x0fff  x            %d)
  265. 0    belong        0x000001ba        MPEG system stream data
  266.  
  267. # MPEG Audio (*.mpx)
  268. # from dreesen@math.fu-berlin.de
  269.  
  270. # MPEG 1.0 Layer 3
  271. 0       beshort&0xfffe  =0xfffa         \bMP3
  272. >2      byte&0xf0       =0x10           \b,  32 kBits
  273. >2      byte&0xf0       =0x20           \b,  40 kBits
  274. >2      byte&0xf0       =0x30           \b,  48 kBits
  275. >2      byte&0xf0       =0x40           \b,  56 kBits
  276. >2      byte&0xf0       =0x50           \b,  64 kBits
  277. >2      byte&0xf0       =0x60           \b,  80 kBits
  278. >2      byte&0xf0       =0x70           \b,  96 kBits
  279. >2      byte&0xf0       =0x80           \b, 112 kBits
  280. >2      byte&0xf0       =0x90           \b, 128 kBits
  281. >2      byte&0xf0       =0xA0           \b, 160 kBits
  282. >2      byte&0xf0       =0xB0           \b, 192 kBits
  283. >2      byte&0xf0       =0xC0           \b, 224 kBits
  284. >2      byte&0xf0       =0xD0           \b, 256 kBits
  285. >2      byte&0xf0       =0xE0           \b, 320 kBits
  286. # freq
  287. >2      byte&0x0C       =0x00           \b, 44.1 kHz
  288. >2      byte&0x0C       =0x04           \b, 48 kHz
  289. >2      byte&0x0C       =0x08           \b, 32 kHz
  290. # misc
  291. >3      byte&0xC0       =0x00           \b, Stereo
  292. >3      byte&0xC0       =0x40           \b, JStereo
  293. >3      byte&0xC0       =0x80           \b, Dual-Ch
  294. >3      byte&0xC0       =0xC0           \b, Mono
  295. #>1     byte&0x01       =0x00           \b, Error Protection
  296. #>2     byte&0x02       =0x02           \b, Padding
  297. #>2     byte&0x01       =0x01           \b, Private
  298. #>3     byte&0x08       =0x08           \b, Copyright
  299. #>3     byte&0x04       =0x04           \b, Original
  300. #>3     byte&0x03       1               \b, Emphasis 5
  301. #>3     byte&0x03       3               \b, Emphasis c
  302.  
  303. # MPEG 1.0 Layer 2
  304. 0       beshort&0xfffe  =0xfffc         \bMP2
  305. >2      byte&0xf0       =0x10           \b,  32 kBits
  306. >2      byte&0xf0       =0x20           \b,  48 kBits
  307. >2      byte&0xf0       =0x30           \b,  56 kBits
  308. >2      byte&0xf0       =0x40           \b,  64 kBits
  309. >2      byte&0xf0       =0x50           \b,  80 kBits
  310. >2      byte&0xf0       =0x60           \b,  96 kBits
  311. >2      byte&0xf0       =0x70           \b, 112 kBits
  312. >2      byte&0xf0       =0x80           \b, 128 kBits
  313. >2      byte&0xf0       =0x90           \b, 160 kBits
  314. >2      byte&0xf0       =0xA0           \b, 192 kBits
  315. >2      byte&0xf0       =0xB0           \b, 224 kBits
  316. >2      byte&0xf0       =0xC0           \b, 256 kBits
  317. >2      byte&0xf0       =0xD0           \b, 320 kBits
  318. >2      byte&0xf0       =0xE0           \b, 384 kBits
  319. # freq
  320. >2      byte&0x0C       =0x00           \b, 44.1 kHz
  321. >2      byte&0x0C       =0x04           \b, 48 kHz
  322. >2      byte&0x0C       =0x08           \b, 32 kHz
  323. # misc
  324. >3      byte&0xC0       =0x00           \b, Stereo
  325. >3      byte&0xC0       =0x40           \b, JStereo
  326. >3      byte&0xC0       =0x80           \b, Dual-Ch
  327. >3      byte&0xC0       =0xC0           \b, Mono
  328. #>1     byte&0x01       =0x00           \b, Error Protection
  329. #>2     byte&0x02       =0x02           \b, Padding
  330. #>2     byte&0x01       =0x01           \b, Private
  331. #>3     byte&0x08       =0x08           \b, Copyright
  332. #>3     byte&0x04       =0x04           \b, Original
  333. #>3     byte&0x03       1               \b, Emphasis 5
  334. #>3     byte&0x03       3               \b, Emphasis c
  335.  
  336. # MPEG 2.0
  337. 0       beshort&0xfff8  =0xfff0         MP
  338. # Layer 3
  339. >1      byte            &0x02           \b3
  340. # Layer 2
  341. >1      byte            &0x04           \b2
  342. >2      byte&0xf0       =0x10           \b,   8 kBits
  343. >2      byte&0xf0       =0x20           \b,  16 kBits
  344. >2      byte&0xf0       =0x30           \b,  24 kBits
  345. >2      byte&0xf0       =0x40           \b,  32 kBits
  346. >2      byte&0xf0       =0x50           \b,  40 kBits
  347. >2      byte&0xf0       =0x60           \b,  48 kBits
  348. >2      byte&0xf0       =0x70           \b,  56 kBits
  349. >2      byte&0xf0       =0x80           \b,  64 kBits
  350. >2      byte&0xf0       =0x90           \b,  80 kBits
  351. >2      byte&0xf0       =0xA0           \b,  96 kBits
  352. >2      byte&0xf0       =0xB0           \b, 112 kBits
  353. >2      byte&0xf0       =0xC0           \b, 128 kBits
  354. >2      byte&0xf0       =0xD0           \b, 144 kBits
  355. >2      byte&0xf0       =0xE0           \b, 160 kBits
  356. # freq
  357. >2      byte&0x0C       =0x00           \b, 22.05 kHz
  358. >2      byte&0x0C       =0x04           \b, 24 kHz
  359. >2      byte&0x0C       =0x08           \b, 16 kHz
  360. # misc
  361. >3      byte&0xC0       =0x00           \b, Stereo
  362. >3      byte&0xC0       =0x40           \b, JStereo
  363. >3      byte&0xC0       =0x80           \b, Dual-Ch
  364. >3      byte&0xC0       =0xC0           \b, Mono
  365. #>1     byte&0x01       =0x00           \b, Error Protection
  366. #>2     byte&0x02       =0x02           \b, Padding
  367. #>2     byte&0x01       =0x01           \b, Private
  368. #>3     byte&0x08       =0x08           \b, Copyright
  369. #>3     byte&0x04       =0x04           \b, Original
  370. #>3     byte&0x03       1               \b, Emphasis 5
  371. #>3     byte&0x03       3               \b, Emphasis c
  372.  
  373. #From: Johan Gade <jgade@diku.dk>
  374.  
  375. # MPEG-4 Advanced Audio Coding (AAC) file (perhaps also MPEG-2 ACC?)
  376. 16    string        M4A        MPEG-4 Advanced Audio Coding file (AAC)
  377.  
  378.  
  379. # FLI animation format
  380. 4    leshort        0xAF11            FLI file
  381. >6    leshort        x            - %d frames,
  382. >8    leshort        x            width=%d pixels,
  383. >10    leshort        x            height=%d pixels,
  384. >12    leshort        x            depth=%d,
  385. >16    leshort        x            ticks/frame=%d
  386. # FLC animation format
  387. 4    leshort        0xAF12            FLC file
  388. >6    leshort        x            - %d frames
  389. >8    leshort        x            width=%d pixels,
  390. >10    leshort        x            height=%d pixels,
  391. >12    leshort        x            depth=%d,
  392. >16    leshort        x            ticks/frame=%d
  393.  
  394. # DL animation format
  395. # XXX - collision with most `mips' magic
  396. #
  397. # I couldn't find a real magic number for these, however, this
  398. # -appears- to work.  Note that it might catch other files, too, so be
  399. # careful!
  400. #
  401. # Note that title and author appear in the two 20-byte chunks
  402. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  403. # 255 (hex FF)!  The DL format is really bad.
  404. #
  405. #0    byte    1    DL version 1, medium format (160x100, 4 images/screen)
  406. #>42    byte    x    - %d screens,
  407. #>43    byte    x    %d commands
  408. #0    byte    2    DL version 2
  409. #>1    byte    1    - large format (320x200,1 image/screen),
  410. #>1    byte    2    - medium format (160x100,4 images/screen),
  411. #>1    byte    >2    - unknown format,
  412. #>42    byte    x    %d screens,
  413. #>43    byte    x    %d commands
  414. # Based on empirical evidence, DL version 3 have several nulls following the
  415. # \003.  Most of them start with non-null values at hex offset 0x34 or so.
  416. #0    string    \3\0\0\0\0\0\0\0\0\0\0\0    DL version 3
  417.  
  418. # SGI formats
  419. 0    string        MOVI        Silicon Graphics movie file
  420.  
  421. # Apple Quicktime: Scan for all known top-level QT atom markers
  422. 4    string        moov        Apple QuickTime movie file (moov)
  423. 4    string        mdat        Apple QuickTime movie file (mdat)
  424. 4    string        ftyp        Apple QuickTime movie file (ftyp)
  425. 4    string        free        Apple QuickTime movie file (free)
  426. 4    string        junk        Apple QuickTime movie file (junk)
  427. 4    string        pnot        Apple QuickTime movie file (pnot)
  428. 4    string        skip        Apple QuickTime movie file (skip)
  429. 4    string        wide        Apple QuickTime movie file (wide)
  430. 4    string        pict        Apple QuickTime movie file (pict)
  431.  
  432. # iso 13818 transport stream
  433. #
  434. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
  435. # (the following is a little bit restrictive and works fine for a stream
  436. #  that starts with PAT properly. it won't work for stream data, that is
  437. #  cut from an input device data right in the middle, but this shouldn't
  438. #  disturb)
  439. # syncbyte      8 bit    0x47
  440. # error_ind     1 bit    -
  441. # payload_start 1 bit    1
  442. # priority      1 bit    -
  443. # PID          13 bit    0x0000
  444. # scrambling    2 bit    -
  445. # adaptfld_ctrl 2 bit    1 or 3
  446. # conti_count   4 bit    0
  447. 0    belong&0xFF5FFF1F    0x47400010    MPEG transport stream data
  448. >188    byte            !0x47        CORRUPTED
  449.  
  450. # DIF digital video file format <mpruett@sgi.com>
  451. 0    belong&0xffffff00    0x1f070000      DIF
  452. >4    byte            &0x01        (DVCPRO) movie file
  453. >4    byte            ^0x01        (DV) movie file
  454. >3    byte            &0x80        (PAL)
  455. >3    byte            ^0x80        (NTSC)
  456.  
  457. # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
  458. 0    belong            0x3026b275    Microsoft ASF
  459.  
  460. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  461. 0    string            \x8aMNG        MNG video data,
  462. >4    belong            !0x0d0a1a0a    CORRUPTED,
  463. >4    belong            0x0d0a1a0a
  464. >>16    belong    x                %ld x
  465. >>20    belong    x                %ld
  466.  
  467. # JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  468. 0    string            \x8bJNG        JNG video data,
  469. >4    belong            !0x0d0a1a0a    CORRUPTED,
  470. >4    belong            0x0d0a1a0a
  471. >>16    belong    x                %ld x
  472. >>20    belong    x                %ld
  473.  
  474. # Vivo video (Wolfram Kleff)
  475. 3    string        \x0D\x0AVersion:Vivo    Vivo video data
  476.  
  477. # VRML (Virtual Reality Modelling Language)
  478. 0       string/b        #VRML\ V1.0\ ascii    VRML 1 file
  479. 0    string/b    #VRML\ V2.0\ utf8    ISO/IEC 14772 VRML 97 file
  480.  
  481. #------------------------------------------------------------------------------
  482. # apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
  483. #       workspaces)
  484. #
  485. 0    long        0100554        APL workspace (Ken's original?)
  486.  
  487. #------------------------------------------------------------------------------
  488. # apple:  file(1) magic for Apple file formats
  489. #
  490. 0    string        FiLeStArTfIlEsTaRt    binscii (apple ][) text
  491. 0    string        \x0aGL            Binary II (apple ][) data
  492. 0    string        \x76\xff        Squeezed (apple ][) data
  493. 0    string        NuFile            NuFile archive (apple ][) data
  494. 0    string        N\xf5F\xe9l\xe5        NuFile archive (apple ][) data
  495. 0    belong        0x00051600        AppleSingle encoded Macintosh file
  496. 0    belong        0x00051607        AppleDouble encoded Macintosh file
  497.  
  498. # magic for Newton PDA package formats
  499. # from Ruda Moura <ruda@helllabs.org>
  500. 0    string    package0    Newton package, NOS 1.x,
  501. >12    belong    &0x80000000    AutoRemove,
  502. >12    belong    &0x40000000    CopyProtect,
  503. >12    belong    &0x10000000    NoCompression,
  504. >12    belong    &0x04000000    Relocation,
  505. >12    belong    &0x02000000    UseFasterCompression,
  506. >16    belong    x        version %d
  507.  
  508. 0    string    package1    Newton package, NOS 2.x,
  509. >12    belong    &0x80000000    AutoRemove,
  510. >12    belong    &0x40000000    CopyProtect,
  511. >12    belong    &0x10000000    NoCompression,
  512. >12    belong    &0x04000000    Relocation,
  513. >12    belong    &0x02000000    UseFasterCompression,
  514. >16    belong    x        version %d
  515.  
  516. 0    string    package4    Newton package,
  517. >8    byte    8        NOS 1.x,
  518. >8    byte    9        NOS 2.x,
  519. >12    belong    &0x80000000    AutoRemove,
  520. >12    belong    &0x40000000    CopyProtect,
  521. >12    belong    &0x10000000    NoCompression,
  522.  
  523. # The following entries for the Apple II are for files that have
  524. # been transferred as raw binary data from an Apple, without having
  525. # been encapsulated by any of the above archivers.
  526. #
  527. # In general, Apple II formats are hard to identify because Apple DOS
  528. # and especially Apple ProDOS have strong typing in the file system and
  529. # therefore programmers never felt much need to include type information
  530. # in the files themselves.
  531. #
  532. # Eric Fischer <enf@pobox.com>
  533.  
  534. # AppleWorks word processor:
  535. #
  536. # This matches the standard tab stops for an AppleWorks file, but if
  537. # a file has a tab stop set in the first four columns this will fail.
  538. #
  539. # The "O" is really the magic number, but that's so common that it's
  540. # necessary to check the tab stops that follow it to avoid false positives.
  541.  
  542. 4       string          O====   AppleWorks word processor data
  543. >85     byte&0x01       >0      \b, zoomed
  544. >90     byte&0x01       >0      \b, paginated
  545. >92     byte&0x01       >0      \b, with mail merge
  546. #>91    byte            x       \b, left margin %d
  547.  
  548. # AppleWorks database:
  549. #
  550. # This isn't really a magic number, but it's the closest thing to one
  551. # that I could find.  The 1 and 2 really mean "order in which you defined
  552. # categories" and "left to right, top to bottom," respectively; the D and R
  553. # mean that the cursor should move either down or right when you press Return.
  554.  
  555. #30    string        \x01D    AppleWorks database data
  556. #30    string        \x02D    AppleWorks database data
  557. #30    string        \x01R    AppleWorks database data
  558. #30    string        \x02R    AppleWorks database data
  559.  
  560. # AppleWorks spreadsheet:
  561. #
  562. # Likewise, this isn't really meant as a magic number.  The R or C means
  563. # row- or column-order recalculation; the A or M means automatic or manual
  564. # recalculation.
  565.  
  566. #131    string        RA    AppleWorks spreadsheet data
  567. #131    string        RM    AppleWorks spreadsheet data
  568. #131    string        CA    AppleWorks spreadsheet data
  569. #131    string        CM    AppleWorks spreadsheet data
  570.  
  571. # Applesoft BASIC:
  572. #
  573. # This is incredibly sloppy, but will be true if the program was
  574. # written at its usual memory location of 2048 and its first line
  575. # number is less than 256.  Yuck.
  576.  
  577. 0       belong&0xff00ff 0x80000 Applesoft BASIC program data
  578. #>2     leshort         x       \b, first line number %d
  579.  
  580. # ORCA/EZ assembler:
  581. # This will not identify ORCA/M source files, since those have
  582. # some sort of date code instead of the two zero bytes at 6 and 7
  583. # XXX Conflicts with ELF
  584. #4       belong&0xff00ffff       0x01000000      ORCA/EZ assembler source data
  585. #>5      byte                    x               \b, build number %d
  586.  
  587. # Broderbund Fantavision
  588. #
  589. # I don't know what these values really mean, but they seem to recur.
  590. # Will they cause too many conflicts?
  591.  
  592. # Probably :-)
  593. #2    belong&0xFF00FF        0x040008    Fantavision movie data
  594.  
  595. # Some attempts at images.
  596. #
  597. # These are actually just bit-for-bit dumps of the frame buffer, so
  598. # there's really no reasonably way to distinguish them except for their
  599. # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
  600. # or, occasionally, 8184.
  601. #
  602. # Nevertheless this will manage to catch a lot of images that happen
  603. # to have a solid-colored line at the bottom of the screen.
  604.  
  605. 8144    string    \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F    Apple II image with white background
  606. 8144    string    \x55\x2A\x55\x2A\x55\x2A\x55\x2A    Apple II image with purple background
  607. 8144    string    \x2A\x55\x2A\x55\x2A\x55\x2A\x55    Apple II image with green background
  608. 8144    string    \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA    Apple II image with blue background
  609. 8144    string    \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5    Apple II image with orange background
  610.  
  611. # Beagle Bros. Apple Mechanic fonts
  612.  
  613. 0    belong&0xFF00FFFF    0x6400D000    Apple Mechanic font
  614.  
  615. #------------------------------------------------------------------------------
  616. # applix:  file(1) magic for Applixware
  617. # From: Peter Soos <sp@osb.hu>
  618. #
  619. 0    string        *BEGIN        Applixware
  620. >7    string        WORDS            Words Document
  621. >7    string        GRAPHICS        Graphic
  622. >7    string        RASTER            Bitmap
  623. >7    string        SPREADSHEETS        Spreadsheet
  624. >7    string        MACRO            Macro
  625. >7    string        BUILDER            Builder Object
  626.  
  627. #------------------------------------------------------------------------------
  628. # archive:  file(1) magic for archive formats (see also "msdos" for self-
  629. #           extracting compressed archives)
  630. #
  631. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  632. # pre-POSIX "tar" archives are handled in the C code.
  633.  
  634. # POSIX tar archives
  635. 257    string        ustar\0        POSIX tar archive
  636. 257    string        ustar\040\040\0    GNU tar archive
  637.  
  638. # cpio archives
  639. #
  640. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  641. # The idea is to indicate archives produced on machines with the same
  642. # byte order as the machine running "file" with "cpio archive", and
  643. # to indicate archives produced on machines with the opposite byte order
  644. # from the machine running "file" with "byte-swapped cpio archive".
  645. #
  646. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  647. # are defined as "short"s; I think all the new formats are
  648. # character-header formats and thus are strings, not numbers.
  649. 0    short        070707        cpio archive
  650. 0    short        0143561        byte-swapped cpio archive
  651. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  652. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  653. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  654.  
  655. # Debian package (needs to go before regular portable archives)
  656. #
  657. 0    string        !<arch>\ndebian
  658. >8    string        debian-split    part of multipart Debian package
  659. >8    string        debian-binary    Debian binary package
  660. >68    string        >\0        (format %s)
  661. >81    string        bz2        \b, uses bzip2 compression
  662. >84    string        gz        \b, uses gzip compression
  663. #>136    ledate        x        created: %s
  664.  
  665. # other archives
  666. 0    long        0177555        very old archive
  667. 0    short        0177555        very old PDP-11 archive
  668. 0    long        0177545        old archive
  669. 0    short        0177545        old PDP-11 archive
  670. 0    long        0100554        apl workspace
  671. 0    string        =<ar>        archive
  672.  
  673. # MIPS archive (needs to go before regular portable archives)
  674. #
  675. 0    string    !<arch>\n__________E    MIPS archive
  676. >20    string    U            with MIPS Ucode members
  677. >21    string    L            with MIPSEL members
  678. >21    string    B            with MIPSEB members
  679. >19    string    L            and an EL hash table
  680. >19    string    B            and an EB hash table
  681. >22    string    X            -- out of date
  682.  
  683. 0    string        -h-        Software Tools format archive text
  684.  
  685. #
  686. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  687. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  688. #
  689. # 0    string        !<arch>        current ar archive
  690. # 0    long        0x213c6172    archive file
  691. #
  692. # and for SVR1 archives, we have:
  693. #
  694. # 0    string        \<ar>        System V Release 1 ar archive
  695. # 0    string        =<ar>        archive
  696. #
  697. # XXX - did Aegis really store shared libraries, breakpointed modules,
  698. # and absolute code program modules in the same format as new-style
  699. # "ar" archives?
  700. #
  701. 0    string        !<arch>        current ar archive
  702. >8    string        __.SYMDEF    random library
  703. >0    belong        =65538        - pre SR9.5
  704. >0    belong        =65539        - post SR9.5
  705. >0    beshort        2        - object archive
  706. >0    beshort        3        - shared library module
  707. >0    beshort        4        - debug break-pointed module
  708. >0    beshort        5        - absolute code program module
  709. 0    string        \<ar>        System V Release 1 ar archive
  710. 0    string        =<ar>        archive
  711. #
  712. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  713. # thingies, to help you recognize VAX files on big-endian machines;
  714. # with "leshort", "lelong", and "string", that's no longer necessary....
  715. #
  716. 0    belong        0x65ff0000    VAX 3.0 archive
  717. 0    belong        0x3c61723e    VAX 5.0 archive
  718. #
  719. 0    long        0x213c6172    archive file
  720. 0    lelong        0177555        very old VAX archive
  721. 0    leshort        0177555        very old PDP-11 archive
  722. #
  723. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  724. # be a random library (it said 0xff65 rather than 0177545).
  725. #
  726. 0    lelong        0177545        old VAX archive
  727. >8    string        __.SYMDEF    random library
  728. 0    leshort        0177545        old PDP-11 archive
  729. >8    string        __.SYMDEF    random library
  730. #
  731. # From "pdp" (but why a 4-byte quantity?)
  732. #
  733. 0    lelong        0x39bed        PDP-11 old archive
  734. 0    lelong        0x39bee        PDP-11 4.0 archive
  735.  
  736. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  737. #
  738. # The first byte is the magic (0x1a), byte 2 is the compression type for
  739. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  740. # filename of the first file (null terminated).  Since some types collide
  741. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  742. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
  743. 0    lelong&0x8080ffff    0x0000081a    ARC archive data, dynamic LZW
  744. 0    lelong&0x8080ffff    0x0000091a    ARC archive data, squashed
  745. 0    lelong&0x8080ffff    0x0000021a    ARC archive data, uncompressed
  746. 0    lelong&0x8080ffff    0x0000031a    ARC archive data, packed
  747. 0    lelong&0x8080ffff    0x0000041a    ARC archive data, squeezed
  748. 0    lelong&0x8080ffff    0x0000061a    ARC archive data, crunched
  749.  
  750. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  751. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  752. # [GRR:  the original entries collide with ARC, above; replaced with combined
  753. #  version (not tested)]
  754. #0    byte        0x1a        RISC OS archive
  755. #>1    string        archive        (ArcFS format)
  756. 0    string        \032archive    RISC OS archive (ArcFS format)
  757.  
  758. # ARJ archiver (jason@jarthur.Claremont.EDU)
  759. 0    leshort        0xea60        ARJ archive data
  760. >5    byte        x        \b, v%d,
  761. >8    byte        &0x04        multi-volume,
  762. >8    byte        &0x10        slash-switched,
  763. >8    byte        &0x20        backup,
  764. >34    string        x        original name: %s,
  765. >7    byte        0        os: MS-DOS
  766. >7    byte        1        os: PRIMOS
  767. >7    byte        2        os: Unix
  768. >7    byte        3        os: Amiga
  769. >7    byte        4        os: Macintosh
  770. >7    byte        5        os: OS/2
  771. >7    byte        6        os: Apple ][ GS
  772. >7    byte        7        os: Atari ST
  773. >7    byte        8        os: NeXT
  774. >7    byte        9        os: VAX/VMS
  775. >3    byte        >0        %d]
  776.  
  777. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  778. # This is a really bad format. A file containing HAWAII will match this...
  779. #0    string        HA        HA archive data,
  780. #>2    leshort        =1        1 file,
  781. #>2    leshort        >1        %u files,
  782. #>4    byte&0x0f    =0        first is type CPY
  783. #>4    byte&0x0f    =1        first is type ASC
  784. #>4    byte&0x0f    =2        first is type HSC
  785. #>4    byte&0x0f    =0x0e        first is type DIR
  786. #>4    byte&0x0f    =0x0f        first is type SPECIAL
  787.  
  788. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  789. 0    string        HPAK        HPACK archive data
  790.  
  791. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  792. 0    string        \351,\001JAM\        JAM archive,
  793. >7    string        >\0            version %.4s
  794. >0x26    byte        =0x27            -
  795. >>0x2b    string          >\0            label %.11s,
  796. >>0x27    lelong        x            serial %08x,
  797. >>0x36    string        >\0            fstype %.8s
  798.  
  799. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  800. 2    string        -lh0-        LHarc 1.x archive data [lh0]
  801. 2    string        -lh1-        LHarc 1.x archive data [lh1]
  802. 2    string        -lz4-        LHarc 1.x archive data [lz4]
  803. 2    string        -lz5-        LHarc 1.x archive data [lz5]
  804. #    [never seen any but the last; -lh4- reported in comp.compression:]
  805. 2    string        -lzs-        LHa 2.x? archive data [lzs]
  806. 2    string        -lh\40-        LHa 2.x? archive data [lh ]
  807. 2    string        -lhd-        LHa 2.x? archive data [lhd]
  808. 2    string        -lh2-        LHa 2.x? archive data [lh2]
  809. 2    string        -lh3-        LHa 2.x? archive data [lh3]
  810. 2    string        -lh4-        LHa (2.x) archive data [lh4]
  811. 2    string        -lh5-        LHa (2.x) archive data [lh5]
  812. 2    string        -lh6-        LHa (2.x) archive data [lh6]
  813. 2    string        -lh7-        LHa (2.x) archive data [lh7]
  814. >20    byte        x        - header level %d
  815.  
  816. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  817. 0    string        Rar!        RAR archive data
  818.  
  819. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  820. 0    string        SQSH        squished archive data (Acorn RISCOS)
  821.  
  822. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  823. # I can't figure out the self-extracting form of these buggers...
  824. 0    string        UC2\x1a        UC2 archive data
  825.  
  826. # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  827. 0    string        PK\003\004    Zip archive data
  828. >4    byte        0x09        \b, at least v0.9 to extract
  829. >4    byte        0x0a        \b, at least v1.0 to extract
  830. >4    byte        0x0b        \b, at least v1.1 to extract
  831. >4    byte        0x14        \b, at least v2.0 to extract
  832.  
  833. # Zoo archiver
  834. 20    lelong        0xfdc4a7dc    Zoo archive data
  835. >4    byte        >48        \b, v%c.
  836. >>6    byte        >47        \b%c
  837. >>>7    byte        >47        \b%c
  838. >32    byte        >0        \b, modify: v%d
  839. >>33    byte        x        \b.%d+
  840. >42    lelong        0xfdc4a7dc    \b,
  841. >>70    byte        >0        extract: v%d
  842. >>>71    byte        x        \b.%d+
  843.  
  844. # Shell archives
  845. 10    string        #\ This\ is\ a\ shell\ archive    shell archive text
  846.  
  847. #
  848. # LBR. NB: May conflict with the questionable 
  849. #          "binary Computer Graphics Metafile" format.
  850. #
  851. 0       string  \0\ \ \ \ \ \ \ \ \ \ \ \0\0    LBR archive data
  852. #
  853. # PMA (CP/M derivative of LHA)
  854. #
  855. 2       string          -pm0-           PMarc archive data [pm0]
  856. 2       string          -pm1-           PMarc archive data [pm1]
  857. 2       string          -pm2-           PMarc archive data [pm2]
  858. 2       string          -pms-           PMarc SFX archive (CP/M, DOS)
  859. 5       string          -pc1-           PopCom compressed executable (CP/M)
  860.  
  861. # From Rafael Laboissiere <rafael@laboissiere.net>
  862. # The Project Revision Control System (see
  863. # http://prcs.sourceforge.net) generates a packaged project
  864. # file which is recognized by the following entry: 
  865. 0    leshort        0xeb81    PRCS packaged project
  866.  
  867. # Microsoft cabinets 
  868. # by David Necas (Yeti) <yeti@physics.muni.cz>
  869. #0    string    MSCF\0\0\0\0    Microsoft cabinet file data,
  870. #>25    byte    x        v%d
  871. #>24    byte    x        \b.%d
  872. # MPi: All CABs have version 1.3, so this is pointless.
  873. # Better magic in debian-additions.
  874.  
  875. # GTKtalog catalogs 
  876. # by David Necas (Yeti) <yeti@physics.muni.cz>
  877. 4    string    gtktalog\     GTKtalog catalog data,
  878. >13    string    3        version 3
  879. >>14    beshort    0x677a        (gzipped)
  880. >>14    beshort    !0x677a        (not gzipped)
  881. >13    string    >3        version %s
  882.  
  883. ############################################################################
  884. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  885. 0       string          PAR\0    PARity archive data
  886. >48    leshort        =0    - Index file
  887. >48    leshort        >0    - file number %d
  888.  
  889. # Felix von Leitner <felix-file@fefe.de>
  890. 0    string    d8:announce    BitTorrent file
  891.  
  892. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  893. 0       beshort 0x0e0f          Atari MSA archive data
  894. >2      beshort x           \b, %d sectors per track
  895. >4      beshort 0           \b, 1 sided
  896. >4      beshort 1           \b, 2 sided
  897. >6      beshort x           \b, starting track: %d
  898. >8      beshort x           \b, ending track: %d
  899.  
  900. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  901. 0    string    PK00PK\003\004    Zip archive data
  902.  
  903. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  904. # by Stefan `Sec` Zehl <sec@42.org>
  905. 7    string        **ACE**        ACE compressed archive
  906. >15    byte    >0        version %d
  907. >16    byte    =0x00        \b, from MS-DOS
  908. >16    byte    =0x01        \b, from OS/2
  909. >16    byte    =0x02        \b, from Win/32
  910. >16    byte    =0x03        \b, from Unix
  911. >16    byte    =0x04        \b, from MacOS
  912. >16    byte    =0x05        \b, from WinNT
  913. >16    byte    =0x06        \b, from Primos
  914. >16    byte    =0x07        \b, from AppleGS
  915. >16    byte    =0x08        \b, from Atari
  916. >16    byte    =0x09        \b, from Vax/VMS
  917. >16    byte    =0x0A        \b, from Amiga
  918. >16    byte    =0x0B        \b, from Next
  919. >14    byte    x        \b, version %d to extract
  920. >5    leshort &0x0080        \b, multiple volumes,
  921. >>17    byte    x        \b (part %d),
  922. >5    leshort &0x0002        \b, contains comment
  923. >5    leshort    &0x0200        \b, sfx
  924. >5    leshort    &0x0400        \b, small dictionary
  925. >5    leshort    &0x0800        \b, multi-volume
  926. >5    leshort    &0x1000        \b, contains AV-String
  927. >>30    string\x16*UNREGISTERED\x20VERSION*    (unregistered)
  928. >5    leshort &0x2000        \b, with recovery record
  929. >5    leshort &0x4000        \b, locked
  930. >5    leshort &0x8000        \b, solid
  931. # Date in MS-DOS format (whatever that is)
  932. #>18    lelong    x        Created on
  933.  
  934. #------------------------------------------------------------------------------
  935. # asterix:  file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
  936. # strings as "long" - we assume they're just strings:
  937. # From: guy@netapp.com (Guy Harris)
  938. #
  939. 0    string        *STA        Aster*x
  940. >7    string        WORD            Words Document
  941. >7    string        GRAP            Graphic
  942. >7    string        SPRE            Spreadsheet
  943. >7    string        MACR            Macro
  944. 0    string        2278        Aster*x Version 2
  945. >29    byte        0x36            Words Document
  946. >29    byte        0x35            Graphic
  947. >29    byte        0x32            Spreadsheet
  948. >29    byte        0x38            Macro
  949.  
  950.  
  951. #------------------------------------------------------------------------------
  952. # att3b:  file(1) magic for AT&T 3B machines
  953. #
  954. # The `versions' should be un-commented if they work for you.
  955. # (Was the problem just one of endianness?)
  956. #
  957. # 3B20
  958. #
  959. # The 3B20 conflicts with SCCS.
  960. #0    beshort        0550        3b20 COFF executable
  961. #>12    belong        >0        not stripped
  962. #>22    beshort        >0        - version %ld
  963. #0    beshort        0551        3b20 COFF executable (TV)
  964. #>12    belong        >0        not stripped
  965. #>22    beshort        >0        - version %ld
  966. #
  967. # WE32K
  968. #
  969. 0    beshort        0560        WE32000 COFF
  970. >18    beshort        ^00000020    object
  971. >18    beshort        &00000020    executable
  972. >12    belong        >0        not stripped
  973. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  974. >18    beshort        &00020000    32100 required
  975. >18    beshort        &00040000    and MAU hardware required
  976. >20    beshort        0407        (impure)
  977. >20    beshort        0410        (pure)
  978. >20    beshort        0413        (demand paged)
  979. >20    beshort        0443        (target shared library)
  980. >22    beshort        >0        - version %ld
  981. 0    beshort        0561        WE32000 COFF executable (TV)
  982. >12    belong        >0        not stripped
  983. #>18    beshort        &00020000    - 32100 required
  984. #>18    beshort        &00040000    and MAU hardware required
  985. #>22    beshort        >0        - version %ld
  986. #
  987. # core file for 3b2 
  988. 0    string        \000\004\036\212\200    3b2 core file
  989. >364    string        >\0        of '%s'
  990.  
  991. #------------------------------------------------------------------------------
  992. # audio:  file(1) magic for sound formats (see also "iff")
  993. #
  994. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  995. # and others
  996. #
  997.  
  998. # Sun/NeXT audio data
  999. 0    string        .snd        Sun/NeXT audio data:
  1000. >12    belong        1        8-bit ISDN mu-law,
  1001. >12    belong        2        8-bit linear PCM [REF-PCM],
  1002. >12    belong        3        16-bit linear PCM,
  1003. >12    belong        4        24-bit linear PCM,
  1004. >12    belong        5        32-bit linear PCM,
  1005. >12    belong        6        32-bit IEEE floating point,
  1006. >12    belong        7        64-bit IEEE floating point,
  1007. >12    belong        23        8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
  1008. >12    belong        24        compressed (8-bit G.722 ADPCM)
  1009. >12    belong        25        compressed (3-bit G.723 ADPCM),
  1010. >12    belong        26        compressed (5-bit G.723 ADPCM),
  1011. >12    belong        27        8-bit A-law,
  1012. >20    belong        1        mono,
  1013. >20    belong        2        stereo,
  1014. >20    belong        4        quad,
  1015. >16    belong        >0        %d Hz
  1016.  
  1017. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  1018. # that uses little-endian encoding and has a different magic number
  1019. 0    lelong        0x0064732E    DEC audio data:
  1020. >12    lelong        1        8-bit ISDN mu-law,
  1021. >12    lelong        2        8-bit linear PCM [REF-PCM],
  1022. >12    lelong        3        16-bit linear PCM,
  1023. >12    lelong        4        24-bit linear PCM,
  1024. >12    lelong        5        32-bit linear PCM,
  1025. >12    lelong        6        32-bit IEEE floating point,
  1026. >12    lelong        7        64-bit IEEE floating point,
  1027. >12    lelong        23        8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data encoding),
  1028. >20    lelong        1        mono,
  1029. >20    lelong        2        stereo,
  1030. >20    lelong        4        quad,
  1031. >16    lelong        >0        %d Hz
  1032.  
  1033. # Creative Labs AUDIO stuff
  1034. 0    string    MThd            Standard MIDI data
  1035. >8     beshort    x            (format %d)
  1036. >10    beshort    x            using %d track
  1037. >10    beshort        >1        \bs
  1038. >12    beshort&0x7fff    x        at 1/%d
  1039. >12    beshort&0x8000    >0        SMPTE
  1040.  
  1041. 0    string    CTMF            Creative Music (CMF) data
  1042. 0    string    SBI            SoundBlaster instrument data
  1043. 0    string    Creative\ Voice\ File    Creative Labs voice data
  1044. # is this next line right?  it came this way...
  1045. >19    byte    0x1A
  1046. >23    byte    >0            - version %d
  1047. >22    byte    >0            \b.%d
  1048.  
  1049. # first entry is also the string "NTRK"
  1050. 0    belong        0x4e54524b    MultiTrack sound data
  1051. >4    belong        x        - version %ld
  1052.  
  1053. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  1054. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  1055. 0    string        EMOD        Extended MOD sound data,
  1056. >4    byte&0xf0    x        version %d
  1057. >4    byte&0x0f    x        \b.%d,
  1058. >45    byte        x        %d instruments
  1059. >83    byte        0        (module)
  1060. >83    byte        1        (song)
  1061.  
  1062. # Real Audio (Magic .ra\0375)
  1063. 0    belong        0x2e7261fd    RealAudio sound file
  1064. 0    string        .RMF        RealMedia file
  1065.  
  1066. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  1067. # Oct 31, 1995
  1068. # fixed by <doj@cubic.org> 2003-06-24
  1069. 0    string        MTM        MultiTracker Module sound file
  1070. 0    string        if        Composer 669 Module sound data
  1071. 0    string        JN        Composer 669 Module sound data (extended format)
  1072. 0    string        MAS_U        ULT(imate) Module sound data
  1073.  
  1074. 0    string        FAR        Module sound data
  1075. >4    string        >\15        Title: "%s"
  1076.  
  1077. 0x2c    string        SCRM        ScreamTracker III Module sound data
  1078. >0    string        >\0        Title: "%s"
  1079.  
  1080. # Gravis UltraSound patches
  1081. # From <ache@nagual.ru>
  1082.  
  1083. 0    string        GF1PATCH110\0ID#000002\0    GUS patch
  1084. 0    string        GF1PATCH100\0ID#000002\0    Old GUS    patch
  1085.  
  1086. #
  1087. # Taken from loader code from mikmod version 2.14
  1088. # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  1089. # <doj@cubic.org> added title printing on 2003-06-24
  1090. 0    string    MAS_UTrack_V00
  1091. >14    string    >/0        ultratracker V1.%.1s module sound data
  1092.  
  1093. 0    string    UN05        MikMod UNI format module sound data
  1094.  
  1095. 0    string    Extended\ Module: Fasttracker II module sound data
  1096. >17    string    >\0        Title: "%s"
  1097.  
  1098. 21    string/c    !SCREAM!    Screamtracker 2 module sound data
  1099. 21    string    BMOD2STM    Screamtracker 2 module sound data
  1100. 1080    string    M.K.        4-channel Protracker module sound data
  1101. >0    string    >\0        Title: "%s"
  1102. 1080    string    M!K!        4-channel Protracker module sound data
  1103. >0    string    >\0        Title: "%s"
  1104. 1080    string    FLT4        4-channel Startracker module sound data
  1105. >0    string    >\0        Title: "%s"
  1106. 1080    string    FLT8        8-channel Startracker module sound data
  1107. >0    string    >\0        Title: "%s"
  1108. 1080    string    4CHN        4-channel Fasttracker module sound data
  1109. >0    string    >\0        Title: "%s"
  1110. 1080    string    6CHN        6-channel Fasttracker module sound data
  1111. >0    string    >\0        Title: "%s"
  1112. 1080    string    8CHN        8-channel Fasttracker module sound data
  1113. >0    string    >\0        Title: "%s"
  1114. 1080    string    CD81        8-channel Octalyser module sound data
  1115. >0    string    >\0        Title: "%s"
  1116. 1080    string    OKTA        8-channel Oktalyzer module sound data
  1117. >0    string    >\0        Title: "%s"
  1118. # Not good enough.
  1119. #1082    string    CH
  1120. #>1080    string    >/0        %.2s-channel Fasttracker "oktalyzer" module sound data
  1121. 1080    string    16CN        16-channel Taketracker module sound data
  1122. >0    string    >\0        Title: "%s"
  1123. 1080    string    32CN        32-channel Taketracker module sound data
  1124. >0    string    >\0        Title: "%s"
  1125.  
  1126. # TOC sound files -Trevor Johnson <trevor@jpj.net>
  1127. #
  1128. 0       string          TOC             TOC sound file
  1129.  
  1130. # sidfiles <pooka@iki.fi>
  1131. # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
  1132. 0    string        SIDPLAY\ INFOFILE    Sidplay info file
  1133.  
  1134. 0    string        PSID            PlaySID v2.2+ (AMIGA) sidtune
  1135. >4    beshort        >0            w/ header v%d,
  1136. >14    beshort        =1            single song,
  1137. >14    beshort        >1            %d songs,
  1138. >16    beshort        >0            default song: %d
  1139. >0x16    string        >\0            name: "%s"
  1140. >0x36    string        >\0            author: "%s"
  1141. >0x56    string        >\0            copyright: "%s"
  1142.  
  1143. 0    string        RSID            RSID sidtune PlaySID compatible
  1144. >4    beshort        >0            w/ header v%d,
  1145. >14    beshort        =1            single song,
  1146. >14    beshort        >1            %d songs,
  1147. >16    beshort        >0            default song: %d
  1148. >0x16    string        >\0            name: "%s"
  1149. >0x36    string        >\0            author: "%s"
  1150. >0x56    string        >\0            copyright: "%s"
  1151.  
  1152. # IRCAM <mpruett@sgi.com>
  1153. # VAX and MIPS files are little-endian; Sun and NeXT are big-endian
  1154. 0    belong        0x64a30100        IRCAM file (VAX)
  1155. 0    belong        0x64a30200        IRCAM file (Sun)
  1156. 0    belong        0x64a30300        IRCAM file (MIPS little-endian)
  1157. 0    belong        0x64a30400        IRCAM file (NeXT)
  1158.  
  1159. # NIST SPHERE <mpruett@sgi.com>
  1160. 0    string        NIST_1A\n\ \ \ 1024\n    NIST SPHERE file
  1161.  
  1162. # Sample Vision <mpruett@sgi.com>
  1163. 0    string        SOUND\ SAMPLE\ DATA\     Sample Vision file
  1164.  
  1165. # Audio Visual Research <tonigonenstein@users.sourceforge.net>
  1166. 0    string        2BIT            Audio Visual Research file,
  1167. >12    beshort        =0            mono,
  1168. >12    beshort        =-1            stereo,
  1169. >14    beshort        x            %d bits
  1170. >16    beshort        =0            unsigned,
  1171. >16    beshort        =-1            signed,
  1172. >22    belong&0x00ffffff    x        %d Hz,
  1173. >18    beshort        =0            no loop,
  1174. >18    beshort        =-1            loop,
  1175. >21    ubyte        <=127            note %d,
  1176. >22    byte        =0            replay 5.485 KHz
  1177. >22    byte        =1            replay 8.084 KHz
  1178. >22    byte        =2            replay 10.971 Khz
  1179. >22    byte        =3            replay 16.168 Khz
  1180. >22    byte        =4            replay 21.942 KHz
  1181. >22    byte        =5            replay 32.336 KHz
  1182. >22    byte        =6            replay 43.885 KHz
  1183. >22    byte        =7            replay 47.261 KHz
  1184.  
  1185. # SGI SoundTrack <mpruett@sgi.com>
  1186. 0    string        _SGI_SoundTrack        SGI SoundTrack project file
  1187. # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  1188. 0    string        ID3    MP3 file with ID3 version 2.
  1189. >3    ubyte    <0xff    \b%d.
  1190. >4    ubyte    <0xff    \b%d tag
  1191.  
  1192. # NSF (NES sound file) magic
  1193. 0    string        NESM\x1a    NES Sound File
  1194. >14    string        >\0        ("%s" by
  1195. >46    string        >\0        %s, copyright
  1196. >78    string        >\0        %s),
  1197. >5    byte        x        version %d,
  1198. >6    byte        x        %d tracks,
  1199. >122    byte&0x2    =1        dual PAL/NTSC
  1200. >122    byte&0x1    =1        PAL
  1201. >122    byte&0x1    =0        NTSC
  1202.  
  1203. # Impuse tracker module (audio/x-it)
  1204. 0    string        IMPM        Impulse Tracker module sound data -
  1205. >4    string        >\0        "%s"
  1206. >40    leshort        !0        compatible w/ITv%x
  1207. >42    leshort        !0        created w/ITv%x
  1208.  
  1209. # Imago Orpheus module (audio/x-imf)
  1210. 60    string        IM10        Imago Orpheus module sound data -
  1211. >0    string        >\0        "%s"
  1212.  
  1213. # From <collver1@attbi.com>
  1214. # These are the /etc/magic entries to decode modules, instruments, and
  1215. # samples in Impulse Tracker's native format.
  1216.  
  1217. 0    string        IMPS        Impulse Tracker Sample
  1218. >18    byte        &2        16 bit
  1219. >18    byte        ^2        8 bit
  1220. >18    byte        &4        stereo
  1221. >18    byte        ^4        mono
  1222. 0    string        IMPI        Impulse Tracker Instrument
  1223. >28    leshort        !0        ITv%x
  1224. >30    byte        !0        %d samples
  1225.  
  1226. # Yamaha TX Wave:  file(1) magic for Yamaha TX Wave audio files
  1227. # From <collver1@attbi.com>
  1228. 0    string        LM8953        Yamaha TX Wave
  1229. >22    byte        0x49        looped
  1230. >22    byte        0xC9        non-looped
  1231. >23    byte        1        33kHz
  1232. >23    byte        2        50kHz
  1233. >23    byte        3        16kHz
  1234.  
  1235. # scream tracker:  file(1) magic for Scream Tracker sample files
  1236. #
  1237. # From <collver1@attbi.com>
  1238. 76    string        SCRS        Scream Tracker Sample
  1239. >0    byte        1        sample
  1240. >0    byte        2        adlib melody
  1241. >0    byte        >2        adlib drum
  1242. >31    byte        &2        stereo
  1243. >31    byte        ^2        mono
  1244. >31    byte        &4        16bit little endian
  1245. >31    byte        ^4        8bit
  1246. >30    byte        0        unpacked
  1247. >30    byte        1        packed
  1248.  
  1249. # audio
  1250. # From: Cory Dikkers <cdikkers@swbell.net>
  1251. 0    string        MMD0        MED music file, version 0
  1252. 0    string        MMD1        OctaMED Pro music file, version 1
  1253. 0    string        MMD3        OctaMED Soundstudio music file, version 3
  1254. 0    string        OctaMEDCmpr    OctaMED Soundstudio compressed file
  1255. 0    string        MED        MED_Song
  1256. 0    string        SymM        Symphonie SymMOD music file
  1257. #
  1258. 0    string        THX        AHX version
  1259. >3    byte        =0        1 module data
  1260. >3    byte        =1        2 module data
  1261. #
  1262. 0    string        OKTASONG    Oktalyzer module data
  1263. #
  1264. 0    string        DIGI\ Booster\ module\0    %s
  1265. >20    byte        >0        %c
  1266. >>21    byte        >0        \b%c
  1267. >>>22    byte        >0        \b%c
  1268. >>>>23    byte        >0        \b%c
  1269. >610    string        >\0        \b, "%s"
  1270. #
  1271. 0    string        DBM0           DIGI Booster Pro Module
  1272. >4    byte        >0        V%X.
  1273. >>5    byte        x        \b%02X
  1274. >16    string        >\0        \b, "%s"
  1275. #
  1276. 0    string        FTMN        FaceTheMusic module
  1277. >16    string        >\0d        \b, "%s"
  1278.  
  1279. # From: <doj@cubic.org> 2003-06-24
  1280. 0    string        AMShdr\32    Velvet Studio AMS Module v2.2
  1281. 0    string        Extreme        Extreme Tracker AMS Module v1.3
  1282. 0    string        DDMF        Xtracker DMF Module
  1283. >4    byte        x        v%i
  1284. >0xD    string        >\0        Title: "%s"
  1285. >0x2B    string        >\0        Composer: "%s"
  1286. 0    string        DSM\32        Dynamic Studio Module DSM
  1287. 0    string        SONG        DigiTrekker DTM Module
  1288. 0    string        DMDL        DigiTrakker MDL Module
  1289. 0    string        PSM\32        Protracker Studio PSM Module
  1290. 44    string        PTMF        Poly Tracker PTM Module
  1291. >0    string        >\32        Title: "%s"
  1292. 0    string        MT20        MadTracker 2.0 Module MT2
  1293. 0    string        RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
  1294. 0    string        RTMM        RTM Module
  1295. 0x426    string        MaDoKaN96    XMS Adlib Module
  1296. >0    string        >\0        Composer: "%s"
  1297. 0    string        AMF        AMF Module
  1298. >4    string        >\0        Title: "%s"
  1299. 0    string        MODINFO1    Open Cubic Player Module Inforation MDZ
  1300. 0    string        Extended\40Instrument: Fast Tracker II Instrument
  1301.  
  1302. # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
  1303. # NOA Nancy Codec file
  1304. 0    string        \210NOA\015\012\032    NOA Nancy Codec Movie file
  1305. # Yamaha SMAF format
  1306. 0    string        MMMD        Yamaha SMAF file
  1307. # Sharp Jisaku Melody format for PDC
  1308. 0    string        \001Sharp\040JisakuMelody    SHARP Cell-Phone ringing Melody
  1309. >20    string        Ver01.00    Ver. 1.00
  1310. >>32    byte        x        , %d tracks
  1311.  
  1312. # FLAC audio stream <URL:http://flac.sourceforge.net/>
  1313. # From: Dan Fandrich <dan@coneharvesters.com>
  1314. 0    string        fLaC        FLAC audio stream data
  1315.  
  1316. # (ISDN) VBOX voice message file (Wolfram Kleff)
  1317. 0       string          VBOX            VBOX voice message data
  1318.  
  1319. # ReBorn Song Files (.rbs)
  1320. # David J. Singer <doc@deadvirgins.org.uk>
  1321. 8       string          RB40             RBS Song file
  1322. >29     string          ReBorn           created by ReBorn
  1323. >37     string          Propellerhead    created by ReBirth
  1324.  
  1325. # Synthesizer Generator and Kimwitu share their file format
  1326. 0    string        A#S#C#S#S#L#V#3        Synthesizer Generator or Kimwitu data
  1327. # Kimwitu++ uses a slightly different magic
  1328. 0    string        A#S#C#S#S#L#HUB        Kimwitu++ data
  1329.  
  1330. # From "Simon Hosie
  1331. 0       string  TFMX-SONG       TFMX module sound data
  1332. #------------------------------------------------------------------------------
  1333. # bFLT: file(1) magic for BFLT uclinux binary files
  1334. #
  1335. # From Philippe De Muyter <phdm@macqel.be>
  1336. #
  1337. 0    string        bFLT        BFLT executable
  1338. >4    belong        x        - version %ld
  1339. >4    belong        4
  1340. >>36    belong&0x1    0x1        ram
  1341. >>36    belong&0x2    0x2        gotpic
  1342. >>36    belong&0x4    0x4        gzip
  1343. >>36    belong&0x8    0x8        gzdata
  1344. #------------------------------------------------------------------------------
  1345. # blender: file(1) magic for Blender 3D data files
  1346. #
  1347. # Coded by Guillermo S. Romero <gsromero@alumnos.euitt.upm.es> using the
  1348. # data from Ton Roosendaal <ton@blender.nl>. Ton or his company do not
  1349. # support the rule, so mail GSR if problems with it. Rule version: 1.1.
  1350. # You can get latest version with comments and details about the format
  1351. # at http://acd.asoc.euitt.upm.es/~gsromero/3d/blender/magic.blender
  1352.  
  1353. 0    string    =BLENDER    Blender3D,
  1354. >7    string    =_        saved as 32-bits
  1355. >7      string    =-        saved as 64-bits
  1356. >8    string    =v        little endian
  1357. >8    string    =V        big endian
  1358. >9    byte    x        with version %c.
  1359. >10    byte    x        \b%c
  1360. >11    byte    x        \b%c
  1361.  
  1362. #------------------------------------------------------------------------------
  1363. # blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
  1364. #
  1365. # Note that this 0407 conflicts with several other a.out formats...
  1366. #
  1367. # XXX - should this be redone with "be" and "le", so that it works on
  1368. # little-endian machines as well?  If so, what's the deal with
  1369. # "VAX-order" and "VAX-order2"?
  1370. #
  1371. #0    long        0407        68K Blit (standalone) executable
  1372. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  1373. 0    short        03401        VAX-order 68K Blit (standalone) executable
  1374. 0    long        0406        68k Blit mpx/mux executable
  1375. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  1376. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  1377. # Need more values for WE32 DMD executables.
  1378. # Note that 0520 is the same as COFF
  1379. #0    short        0520        tty630 layers executable
  1380. #
  1381. # i80960 b.out objects and archives
  1382. #
  1383. 0    long        0x10d        i960 b.out relocatable object
  1384. >16    long        >0        not stripped
  1385. #
  1386. # b.out archive (hp-rt on i960)
  1387. 0    string        !<bout>        b.out archive
  1388. >8    string        __.SYMDEF    random library
  1389. #------------------------------------------------------------------------------
  1390. # bsdi:  file(1) magic for BSD/OS (from BSDI) objects
  1391. #
  1392.  
  1393. 0    lelong        0314        386 compact demand paged pure executable
  1394. >16    lelong        >0        not stripped
  1395. >32    byte        0x6a        (uses shared libs)
  1396.  
  1397. 0    lelong        0407        386 executable
  1398. >16    lelong        >0        not stripped
  1399. >32    byte        0x6a        (uses shared libs)
  1400.  
  1401. 0    lelong        0410        386 pure executable
  1402. >16    lelong        >0        not stripped
  1403. >32    byte        0x6a        (uses shared libs)
  1404.  
  1405. 0    lelong        0413        386 demand paged pure executable
  1406. >16    lelong        >0        not stripped
  1407. >32    byte        0x6a        (uses shared libs)
  1408.  
  1409. # same as in SunOS 4.x, except for static shared libraries
  1410. 0    belong&077777777    0600413        sparc demand paged
  1411. >0    byte        &0x80
  1412. >>20    belong        <4096        shared library
  1413. >>20    belong        =4096        dynamically linked executable
  1414. >>20    belong        >4096        dynamically linked executable
  1415. >0    byte        ^0x80        executable
  1416. >16    belong        >0        not stripped
  1417. >36    belong        0xb4100001    (uses shared libs)
  1418.  
  1419. 0    belong&077777777    0600410        sparc pure
  1420. >0    byte        &0x80        dynamically linked executable
  1421. >0    byte        ^0x80        executable
  1422. >16    belong        >0        not stripped
  1423. >36    belong        0xb4100001    (uses shared libs)
  1424.  
  1425. 0    belong&077777777    0600407        sparc
  1426. >0    byte        &0x80        dynamically linked executable
  1427. >0    byte        ^0x80        executable
  1428. >16    belong        >0        not stripped
  1429. >36    belong        0xb4100001    (uses shared libs)
  1430.  
  1431. #------------------------------------------------------------------------------
  1432. # autocad:  file(1) magic for cad files
  1433. #
  1434.  
  1435. # AutoCAD DWG versions R13/R14 (www.autodesk.com)
  1436. # Written December 01, 2003 by Lester Hightower
  1437. # Based on the DWG File Format Specifications at http://www.opendwg.org/
  1438. 0    string           \101\103\061\060\061           AutoCAD
  1439. >5    string           \062\000\000\000\000           DWG ver. R13
  1440. >5    string           \064\000\000\000\000           DWG ver. R14
  1441.  
  1442. # Microstation DGN/CIT Files (www.bentley.com)
  1443. # Written October 30, 2003 by Lester Hightower
  1444. # DGN is the default file extension of Microstation/Intergraph CAD files.
  1445. # CIT is the proprietary raster format (similar to TIFF) used to attach
  1446. # raster underlays to Microstation DGN (vector) drawings.
  1447. # http://www.wotsit.org/search.asp
  1448. # http://filext.com/detaillist.php?extdetail=DGN
  1449. # http://filext.com/detaillist.php?extdetail=CIT
  1450. #
  1451. # http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
  1452. # 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
  1453. # http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
  1454. # 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
  1455. 0    string           \010\011\376               Microstation
  1456. >3    string           \002
  1457. >>30    string           \372\104                   DGN File
  1458. >>30    string           \172\104                   DGN File
  1459. >>30    string           \026\105                   DGN File
  1460. >4    string           \030\000\000               CIT File
  1461.  
  1462.  
  1463. #------------------------------------------------------------------------------
  1464. # c-lang:  file(1) magic for C programs (or REXX)
  1465. #
  1466.  
  1467. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  1468. # if you uncomment "/*" for C/REXX below, also uncomment this entry
  1469. #0    string        /*\ XPM\ */    X pixmap image data
  1470.  
  1471. # this first will upset you if you're a PL/1 shop...
  1472. # in which case rm it; ascmagic will catch real C programs
  1473. #0    string        /*        C or REXX program text
  1474. #0    string        //        C++ program text
  1475.  
  1476. # From: Mikhail Teterin <mi@aldan.algebra.com> 
  1477. 0    string        cscope        cscope reference data
  1478. >7    string        x        version %.2s
  1479. # We skip the path here, because it is often long (so file will
  1480. # truncate it) and mostly redundant.
  1481. # The inverted index functionality was added some time betwen
  1482. # versions 11 and 15, so look for -q if version is above 14:
  1483. >7    string        >14
  1484. >>10    regex        .+\ -q\        with inverted index
  1485. >10    regex        .+\ -c\        text (non-compressed)
  1486.  
  1487. #------------------------------------------------------------------------------
  1488. # c64:  file(1) magic for various commodore 64 related files
  1489. #
  1490. # From <doj@cubic.org>
  1491.  
  1492. 0x16500    belong        0x12014100    D64 Image
  1493. 0x16500    belong        0x12014180    D71 Image
  1494. 0x61800 belong        0x28034400    D81 Image
  1495. 0    string        C64\40CARTRIDGE    CCS C64 Emultar Cartridge Image
  1496. 0    belong        0x43154164    X64 Image
  1497.  
  1498. 0    string        GCR-1541    GCR Image
  1499. >8    byte        x        version: $i
  1500. >9    byte        x        tracks: %i
  1501.  
  1502. 9    string        PSUR        ARC archive (c64)
  1503. 2    string        -LH1-        LHA archive (c64)
  1504.  
  1505. 0    string        C64File        PC64 Emulator file
  1506. >8    string        >\0        "%s"
  1507. 0    string        C64Image    PC64 Freezer Image
  1508.  
  1509. 0    beshort        0x38CD        C64 PCLink Image
  1510. 0    string        CBM\144\0\0    Power 64 C64 Emulator Snapshot
  1511.  
  1512. 0    belong        0xFF424CFF    WRAptor packer (c64)
  1513.  
  1514. #------------------------------------------------------------------------------
  1515. # CDDB: file(1) magic for CDDB(tm) format CD text data files
  1516. #
  1517. # From <steve@gracenote.com>
  1518. #
  1519. # This is the /etc/magic entry to decode datafiles as used by
  1520. # CDDB-enabled CD player applications.
  1521. #
  1522.  
  1523. 0       string/b        #\040xmcd               CDDB(tm) format CD text data
  1524.  
  1525. #------------------------------------------------------------------------------
  1526. # chi:  file(1) magic for ChiWriter files
  1527. #
  1528. 0       string          \\1cw\          ChiWriter file
  1529. >5      string          >\0             version %s
  1530. 0       string          \\1cw           ChiWriter file
  1531.  
  1532. #------------------------------------------------------------------------------
  1533. # chord: file(1) magic for Chord music sheet typesetting utility input files
  1534. #
  1535. # From Philippe De Muyter <phdm@macqel.be>
  1536. # File format is actually free, but many distributed files begin with `{title'
  1537. #
  1538. 0    string        {title        Chord text file
  1539.  
  1540. #------------------------------------------------------------------------------
  1541. # cisco:  file(1) magic for cisco Systems routers
  1542. #
  1543. # Most cisco file-formats are covered by the generic elf code
  1544. #
  1545. # Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
  1546. 0    belong&0xffffff00    0x85011400  cisco IOS microcode
  1547. >7    string        >\0            for '%s'
  1548. 0    belong&0xffffff00    0x8501cb00  cisco IOS experimental microcode
  1549. >7    string        >\0            for '%s'
  1550. #------------------------------------------------------------------------------
  1551. # citrus locale declaration
  1552. #
  1553.  
  1554. 0    string        RuneCT        Citrus locale declaration for LC_CTYPE
  1555.  
  1556.  
  1557. #------------------------------------------------------------------------------
  1558. # claris:  file(1) magic for claris
  1559. # "H. Nanosecond" <aldomel@ix.netcom.com>
  1560. # Claris Works a word processor, etc.
  1561. # Version 3.0
  1562.  
  1563. # .pct claris works clip art files
  1564. #0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
  1565. #*
  1566. #0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
  1567. #null to byte 1000 octal
  1568. 514    string    \377\377\377\377\000    Claris clip art?
  1569. >0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0    yes.
  1570. 514    string    \377\377\377\377\001    Claris clip art?
  1571. >0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0    yes.
  1572.  
  1573. # Claris works files
  1574. # .cwk
  1575. 0    string    \002\000\210\003\102\117\102\117\000\001\206 Claris works document
  1576. # .plt
  1577. 0    string    \020\341\000\000\010\010    Claris Works pallete files .plt
  1578.  
  1579. # .msp a dictionary file I am not sure about this I have only one .msp file
  1580. 0    string    \002\271\262\000\040\002\000\164    Claris works dictionary
  1581.  
  1582. # .usp are user dictionary bits
  1583. # I am not sure about a magic header:
  1584. #0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
  1585. #        soh   S   p   f   8   U   D  sp   ^   S  cr  nl   p   o   d   i
  1586. #0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
  1587. #          a   t   r   i   s   t  sp   ^   S  cr  nl   d   i   v  sp   #
  1588.  
  1589. # .mth Thesaurus
  1590. # statrts with \0 but no magic header
  1591.  
  1592. # .chy Hyphenation file
  1593. # I am not sure: 000 210 034 000 000
  1594.  
  1595. # other claris files
  1596. #./windows/claris/useng.ndx: data
  1597. #./windows/claris/xtndtran.l32: data
  1598. #./windows/claris/xtndtran.lst: data
  1599. #./windows/claris/clworks.lbl: data
  1600. #./windows/claris/clworks.prf: data
  1601. #./windows/claris/userd.spl: data
  1602.  
  1603. #------------------------------------------------------------------------------
  1604. # clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
  1605. #
  1606. # XXX - what byte order does the Clipper use?
  1607. #
  1608. # XXX - what's the "!" stuff:
  1609. #
  1610. # >18    short        !074000,000000    C1 R1 
  1611. # >18    short        !074000,004000    C2 R1
  1612. # >18    short        !074000,010000    C3 R1
  1613. # >18    short        !074000,074000    TEST
  1614. #
  1615. # I shall assume it's ANDing the field with the first value and
  1616. # comparing it with the second, and rewrite it as:
  1617. #
  1618. # >18    short&074000    000000        C1 R1 
  1619. # >18    short&074000    004000        C2 R1
  1620. # >18    short&074000    010000        C3 R1
  1621. # >18    short&074000    074000        TEST
  1622. #
  1623. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  1624. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  1625. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  1626. # somebody else thought was a good idea; it's not documented in the
  1627. # man page for this version of "magic", nor does it appear to be
  1628. # implemented (at least not after I blew off the bogus code to turn
  1629. # old-style "&"s into new-style "&"s, which just didn't work at all).
  1630. #
  1631. 0    short        0575        CLIPPER COFF executable (VAX #)
  1632. >20    short        0407        (impure)
  1633. >20    short        0410        (5.2 compatible)
  1634. >20    short        0411        (pure)
  1635. >20    short        0413        (demand paged)
  1636. >20    short        0443        (target shared library)
  1637. >12    long        >0        not stripped
  1638. >22    short        >0        - version %ld
  1639. 0    short        0577        CLIPPER COFF executable
  1640. >18    short&074000    000000        C1 R1 
  1641. >18    short&074000    004000        C2 R1
  1642. >18    short&074000    010000        C3 R1
  1643. >18    short&074000    074000        TEST
  1644. >20    short        0407        (impure)
  1645. >20    short        0410        (pure)
  1646. >20    short        0411        (separate I&D)
  1647. >20    short        0413        (paged)
  1648. >20    short        0443        (target shared library)
  1649. >12    long        >0        not stripped
  1650. >22    short        >0        - version %ld
  1651. >48    long&01        01        alignment trap enabled
  1652. >52    byte        1        -Ctnc
  1653. >52    byte        2        -Ctsw
  1654. >52    byte        3        -Ctpw
  1655. >52    byte        4        -Ctcb
  1656. >53    byte        1        -Cdnc
  1657. >53    byte        2        -Cdsw
  1658. >53    byte        3        -Cdpw
  1659. >53    byte        4        -Cdcb
  1660. >54    byte        1        -Csnc
  1661. >54    byte        2        -Cssw
  1662. >54    byte        3        -Cspw
  1663. >54    byte        4        -Cscb
  1664. 4    string        pipe        CLIPPER instruction trace
  1665. 4    string        prof        CLIPPER instruction profile
  1666.  
  1667. #------------------------------------------------------------------------------
  1668. # commands:  file(1) magic for various shells and interpreters
  1669. #
  1670. 0    string        :            shell archive or script for antique kernel text
  1671. 0    string/b    #!\ /bin/sh        Bourne shell script text executable
  1672. 0    string/b    #!\ /bin/csh        C shell script text executable
  1673. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  1674. 0    string/b    #!\ /bin/ksh        Korn shell script text executable
  1675. 0    string/b     #!\ /bin/tcsh        Tenex C shell script text executable
  1676. 0    string/b     #!\ /usr/local/tcsh    Tenex C shell script text executable
  1677. 0    string/b    #!\ /usr/local/bin/tcsh    Tenex C shell script text executable
  1678.  
  1679. #
  1680. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  1681. 0    string/b    #!\ /bin/zsh        Paul Falstad's zsh script text executable
  1682. 0    string/b    #!\ /usr/bin/zsh    Paul Falstad's zsh script text executable
  1683. 0    string/b    #!\ /usr/local/bin/zsh    Paul Falstad's zsh script text executable
  1684. 0    string/b    #!\ /usr/local/bin/ash    Neil Brown's ash script text executable
  1685. 0    string/b    #!\ /usr/local/bin/ae    Neil Brown's ae script text executable
  1686. 0    string/b    #!\ /bin/nawk        new awk script text executable
  1687. 0    string/b    #!\ /usr/bin/nawk    new awk script text executable
  1688. 0    string/b    #!\ /usr/local/bin/nawk    new awk script text executable
  1689. 0    string/b    #!\ /bin/gawk        GNU awk script text executable
  1690. 0    string/b    #!\ /usr/bin/gawk    GNU awk script text executable
  1691. 0    string/b    #!\ /usr/local/bin/gawk    GNU awk script text executable
  1692. #
  1693. 0    string/b    #!\ /bin/awk        awk script text executable
  1694. 0    string/b    #!\ /usr/bin/awk    awk script text executable
  1695. 0    string        BEGIN            awk script text
  1696.  
  1697. # AT&T Bell Labs' Plan 9 shell
  1698. 0    string/b    #!\ /bin/rc    Plan 9 rc shell script text executable
  1699.  
  1700. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  1701. 0    string/b    #!\ /bin/bash    Bourne-Again shell script text executable
  1702. 0    string/b    #!\ /usr/local/bin/bash    Bourne-Again shell script text executable
  1703.  
  1704. # using env
  1705. 0    string        #!/usr/bin/env        a
  1706. >15    string        >\0            %s script text executable
  1707. 0    string        #!\ /usr/bin/env    a
  1708. >16    string        >\0            %s script text executable
  1709.  
  1710. # PHP scripts
  1711. # Ulf Harnhammar <ulfh@update.uu.se>
  1712. 0    string/c    =<?php            PHP script text
  1713. 0    string        =<?\n            PHP script text
  1714. 0    string        =<?\r            PHP script text
  1715. 0    string/b    #!\ /usr/local/bin/php    PHP script text executable
  1716. 0    string/b    #!\ /usr/bin/php    PHP script text executable
  1717.  
  1718. 0    string        Zend\x00        PHP script Zend Optimizer data
  1719.  
  1720. #----------------------------------------------------------------------------
  1721. # communcation
  1722.  
  1723. # TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
  1724. # It is used for conformance testing of communication protocols.
  1725. # Added by W. Borgert <debacle@debian.org>.
  1726. 0    string        $Suite            TTCN Abstract Test Suite
  1727. >&1    string        $SuiteId
  1728. >>&1    string        >\n            %s
  1729. >&2    string        $SuiteId
  1730. >>&1    string        >\n            %s
  1731. >&3    string        $SuiteId
  1732. >>&1    string        >\n            %s
  1733.  
  1734. # MSC (message sequence charts) are a formal description technique,
  1735. # described in ITU-T Z.120, mainly used for communication protocols.
  1736. # Added by W. Borgert <debacle@debian.org>.
  1737. 0    string        mscdocument    Message Sequence Chart (document)
  1738. 0    string        msc        Message Sequence Chart (chart)
  1739. 0    string        submsc        Message Sequence Chart (subchart)
  1740.  
  1741. #------------------------------------------------------------------------------
  1742. # compress:  file(1) magic for pure-compression formats (no archives)
  1743. #
  1744. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  1745. #
  1746. # Formats for various forms of compressed data
  1747. # Formats for "compress" proper have been moved into "compress.c",
  1748. # because it tries to uncompress it to figure out what's inside.
  1749.  
  1750. # standard unix compress
  1751. 0    string        \037\235    compress'd data
  1752. >2    byte&0x80    >0        block compressed
  1753. >2    byte&0x1f    x        %d bits
  1754.  
  1755. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  1756. #   Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  1757. #    * Original filename is only at offset 10 if "extra field" absent
  1758. #    * Produce shorter output - notably, only report compression methods
  1759. #      other than 8 ("deflate", the only method defined in RFC 1952).
  1760. 0       string          \037\213        gzip compressed data
  1761. >2    byte        <8        \b, reserved method
  1762. >2    byte        >8        \b, unknown method
  1763. >3    byte        &0x01        \b, ASCII
  1764. >3    byte        &0x02        \b, continuation
  1765. >3    byte        &0x04        \b, extra field
  1766. >3    byte&0xC    =0x08
  1767. >>10    string        x        \b, was "%s"
  1768. >9    byte        =0x00        \b, from MS-DOS
  1769. >9    byte        =0x01        \b, from Amiga
  1770. >9    byte        =0x02        \b, from VMS
  1771. >9    byte        =0x03        \b, from Unix
  1772. >9    byte        =0x05        \b, from Atari
  1773. >9    byte        =0x06        \b, from OS/2
  1774. >9    byte        =0x07        \b, from MacOS
  1775. >9    byte        =0x0A        \b, from Tops/20
  1776. >9    byte        =0x0B        \b, from Win/32
  1777. >3    byte        &0x10        \b, comment
  1778. >3    byte        &0x20        \b, encrypted
  1779. ### >4    ledate        x        last modified: %s,
  1780. >8    byte        2        \b, max compression
  1781. >8    byte        4        \b, max speed
  1782.  
  1783. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  1784. 0    string        \037\036    packed data
  1785. >2    belong        >1        \b, %d characters originally
  1786. >2    belong        =1        \b, %d character originally
  1787. #
  1788. # This magic number is byte-order-independent.
  1789. 0    short        0x1f1f        old packed data
  1790.  
  1791. # XXX - why *two* entries for "compacted data", one of which is
  1792. # byte-order independent, and one of which is byte-order dependent?
  1793. #
  1794. 0    short        0x1fff        compacted data
  1795. # This string is valid for SunOS (BE) and a matching "short" is listed
  1796. # in the Ultrix (LE) magic file.
  1797. 0    string        \377\037    compacted data
  1798. 0    short        0145405        huf output
  1799.  
  1800. # bzip2
  1801. 0    string        BZh        bzip2 compressed data
  1802. >3    byte        >47        \b, block size = %c00k
  1803.  
  1804. # squeeze and crunch
  1805. # Michael Haardt <michael@cantor.informatik.rwth-aachen.de>
  1806. 0    beshort        0x76FF        squeezed data,
  1807. >4    string        x        original name %s
  1808. 0    beshort        0x76FE        crunched data,
  1809. >2    string        x        original name %s
  1810. 0    beshort        0x76FD        LZH compressed data,
  1811. >2    string        x        original name %s
  1812.  
  1813. # Freeze
  1814. 0    string        \037\237    frozen file 2.1
  1815. 0    string        \037\236    frozen file 1.0 (or gzip 0.5)
  1816.  
  1817. # SCO compress -H (LZH)
  1818. 0    string        \037\240    SCO compress -H (LZH) data
  1819.  
  1820. # European GSM 06.10 is a provisional standard for full-rate speech
  1821. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  1822. # excitation/long term prediction) coding at 13 kbit/s.
  1823. #
  1824. # There's only a magic nibble (4 bits); that nibble repeats every 33
  1825. # bytes.  This isn't suited for use, but maybe we can use it someday.
  1826. #
  1827. # This will cause very short GSM files to be declared as data and
  1828. # mismatches to be declared as data too!
  1829. #0    byte&0xF0    0xd0        data
  1830. #>33    byte&0xF0    0xd0
  1831. #>66    byte&0xF0    0xd0
  1832. #>99    byte&0xF0    0xd0
  1833. #>132    byte&0xF0    0xd0        GSM 06.10 compressed audio
  1834.  
  1835. # bzip    a block-sorting file compressor
  1836. #    by Julian Seward <sewardj@cs.man.ac.uk> and others
  1837. #
  1838. 0    string        BZ        bzip compressed data
  1839. >2    byte        x        \b, version: %c
  1840. >3    string        =1        \b, compression block size 100k
  1841. >3    string        =2        \b, compression block size 200k
  1842. >3    string        =3        \b, compression block size 300k
  1843. >3    string        =4        \b, compression block size 400k
  1844. >3    string        =5        \b, compression block size 500k
  1845. >3    string        =6        \b, compression block size 600k
  1846. >3    string        =7        \b, compression block size 700k
  1847. >3    string        =8        \b, compression block size 800k
  1848. >3    string        =9        \b, compression block size 900k
  1849.  
  1850. # lzop from <markus.oberhumer@jk.uni-linz.ac.at>
  1851. 0    string        \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a    lzop compressed data
  1852. >9    beshort        <0x0940
  1853. >>9    byte&0xf0    =0x00        - version 0.
  1854. >>9    beshort&0x0fff    x        \b%03x,
  1855. >>13    byte        1        LZO1X-1,
  1856. >>13    byte        2        LZO1X-1(15),
  1857. >>13    byte        3        LZO1X-999,
  1858. ## >>22    bedate        >0        last modified: %s,
  1859. >>14    byte        =0x00        os: MS-DOS
  1860. >>14    byte        =0x01        os: Amiga
  1861. >>14    byte        =0x02        os: VMS
  1862. >>14    byte        =0x03        os: Unix
  1863. >>14    byte        =0x05        os: Atari
  1864. >>14    byte        =0x06        os: OS/2
  1865. >>14    byte        =0x07        os: MacOS
  1866. >>14    byte        =0x0A        os: Tops/20
  1867. >>14    byte        =0x0B        os: WinNT
  1868. >>14    byte        =0x0E        os: Win32
  1869. >9    beshort        >0x0939
  1870. >>9    byte&0xf0    =0x00        - version 0.
  1871. >>9    byte&0xf0    =0x10        - version 1.
  1872. >>9    byte&0xf0    =0x20        - version 2.
  1873. >>9    beshort&0x0fff    x        \b%03x,
  1874. >>15    byte        1        LZO1X-1,
  1875. >>15    byte        2        LZO1X-1(15),
  1876. >>15    byte        3        LZO1X-999,
  1877. ## >>25    bedate        >0        last modified: %s,
  1878. >>17    byte        =0x00        os: MS-DOS
  1879. >>17    byte        =0x01        os: Amiga
  1880. >>17    byte        =0x02        os: VMS
  1881. >>17    byte        =0x03        os: Unix
  1882. >>17    byte        =0x05        os: Atari
  1883. >>17    byte        =0x06        os: OS/2
  1884. >>17    byte        =0x07        os: MacOS
  1885. >>17    byte        =0x0A        os: Tops/20
  1886. >>17    byte        =0x0B        os: WinNT
  1887. >>17    byte        =0x0E        os: Win32
  1888.  
  1889. # 4.3BSD-Quasijarus Strong Compression
  1890. # http://minnie.tuhs.org/Quasijarus/compress.html
  1891. 0    string        \037\241    Quasijarus strong compressed data
  1892.  
  1893. # From: Cory Dikkers <cdikkers@swbell.net>
  1894. 0    string        XPKF        Amiga xpkf.library compressed data
  1895. 0    string        PP11        Power Packer 1.1 compressed data
  1896. 0    string        PP20        Power Packer 2.0 compressed data,
  1897. >4    belong        0x09090909    fast compression
  1898. >4    belong        0x090A0A0A    mediocre compression
  1899. >4    belong        0x090A0B0B    good compression
  1900. >4    belong        0x090A0C0C    very good compression
  1901. >4    belong        0x090A0C0D    best compression
  1902.  
  1903. # 7z archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
  1904. # http://www.7-zip.org or DOC/7zFormat.txt 
  1905. #
  1906. 0    string        7z\274\257\047\034    7z archive data,
  1907. >6    byte        x            version %d
  1908. >7    byte        x            \b.%d
  1909.  
  1910. # AFX compressed files (Wolfram Kleff)
  1911. 2    string        -afx-        AFX compressed file data
  1912. #------------------------------------------------------------------------------
  1913. # Console game magic
  1914. # Toby Deshane <hac@shoelace.digivill.net>
  1915. #    ines:  file(1) magic for Marat's iNES Nintendo Entertainment System
  1916. #           ROM dump format
  1917.  
  1918. 0 string NES\032 iNES ROM dump,
  1919. >4 byte  x     %dx16k PRG
  1920. >5 byte  x     \b, %dx8k CHR
  1921. >6 byte&0x01  =0x1  \b, [Vert.]
  1922. >6 byte&0x01  =0x0  \b, [Horiz.]
  1923. >6 byte&0x02  =0x2  \b, [SRAM]
  1924. >6 byte&0x04  =0x4  \b, [Trainer]
  1925. >6 byte&0x04  =0x8  \b, [4-Scr]
  1926.  
  1927. #------------------------------------------------------------------------------
  1928. # gameboy:  file(1) magic for the Nintendo (Color) Gameboy raw ROM format
  1929. #
  1930. 0x104 belong 0xCEED6666 Gameboy ROM:
  1931. >0x134 string >\0 "%.16s"
  1932. >0x146 byte 0x03  \b,[SGB]
  1933. >0x147 byte 0x00  \b, [ROM ONLY]
  1934. >0x147 byte 0x01  \b, [ROM+MBC1]
  1935. >0x147 byte 0x02  \b, [ROM+MBC1+RAM]
  1936. >0x147 byte 0x03  \b, [ROM+MBC1+RAM+BATT]
  1937. >0x147 byte 0x05  \b, [ROM+MBC2]
  1938. >0x147 byte 0x06  \b, [ROM+MBC2+BATTERY]
  1939. >0x147 byte 0x08  \b, [ROM+RAM]
  1940. >0x147 byte 0x09  \b, [ROM+RAM+BATTERY]
  1941. >0x147 byte 0x0B  \b, [ROM+MMM01]
  1942. >0x147 byte 0x0C  \b, [ROM+MMM01+SRAM]
  1943. >0x147 byte 0x0D  \b, [ROM+MMM01+SRAM+BATT]
  1944. >0x147 byte 0x0F  \b, [ROM+MBC3+TIMER+BATT]
  1945. >0x147 byte 0x10  \b, [ROM+MBC3+TIMER+RAM+BATT]
  1946. >0x147 byte 0x11  \b, [ROM+MBC3]
  1947. >0x147 byte 0x12  \b, [ROM+MBC3+RAM]
  1948. >0x147 byte 0x13  \b, [ROM+MBC3+RAM+BATT]
  1949. >0x147 byte 0x19  \b, [ROM+MBC5]
  1950. >0x147 byte 0x1A  \b, [ROM+MBC5+RAM]
  1951. >0x147 byte 0x1B  \b, [ROM+MBC5+RAM+BATT]
  1952. >0x147 byte 0x1C  \b, [ROM+MBC5+RUMBLE]
  1953. >0x147 byte 0x1D  \b, [ROM+MBC5+RUMBLE+SRAM]
  1954. >0x147 byte 0x1E  \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
  1955. >0x147 byte 0x1F  \b, [Pocket Camera]
  1956. >0x147 byte 0xFD  \b, [Bandai TAMA5]
  1957. >0x147 byte 0xFE  \b, [Hudson HuC-3]
  1958. >0x147 byte 0xFF  \b, [Hudson HuC-1]
  1959.  
  1960. >0x148 byte 0     \b, ROM: 256Kbit
  1961. >0x148 byte 1     \b, ROM: 512Kbit
  1962. >0x148 byte 2     \b, ROM: 1Mbit
  1963. >0x148 byte 3     \b, ROM: 2Mbit
  1964. >0x148 byte 4     \b, ROM: 4Mbit
  1965. >0x148 byte 5     \b, ROM: 8Mbit
  1966. >0x148 byte 6     \b, ROM: 16Mbit
  1967. >0x148 byte 0x52  \b, ROM: 9Mbit
  1968. >0x148 byte 0x53  \b, ROM: 10Mbit
  1969. >0x148 byte 0x54  \b, ROM: 12Mbit
  1970.  
  1971. >0x149 byte 1     \b, RAM: 16Kbit
  1972. >0x149 byte 2     \b, RAM: 64Kbit
  1973. >0x149 byte 3     \b, RAM: 128Kbit
  1974. >0x149 byte 4     \b, RAM: 1Mbit
  1975.  
  1976. #>0x14e long  x     \b, CRC: %x
  1977.  
  1978. #------------------------------------------------------------------------------
  1979. # genesis:  file(1) magic for the Sega MegaDrive/Genesis raw ROM format
  1980. #
  1981. 0x100 string SEGA  Sega MegaDrive/Genesis raw ROM dump
  1982. >0x120 string >\0 Name: "%.16s"
  1983. >0x110 string >\0 %.16s
  1984. >0x1B0 string RA with SRAM
  1985.  
  1986. #------------------------------------------------------------------------------
  1987. # genesis:  file(1) magic for the Super MegaDrive ROM dump format
  1988. #
  1989. 0x280 string EAGN  Super MagicDrive ROM dump
  1990. >0 byte x %dx16k blocks
  1991. >2 byte 0 \b, last in series or standalone
  1992. >2 byte >0 \b, split ROM
  1993. >8 byte 0xAA
  1994. >9 byte 0xBB
  1995.  
  1996. #------------------------------------------------------------------------------
  1997. # genesis:  file(1) alternate magic for the Super MegaDrive ROM dump format
  1998. #
  1999. 0x280 string EAMG  Super MagicDrive ROM dump
  2000. >0 byte x %dx16k blocks
  2001. >2 byte x \b, last in series or standalone
  2002. >8 byte 0xAA
  2003. >9 byte 0xBB
  2004.  
  2005. #------------------------------------------------------------------------------
  2006. # smsgg:  file(1) magic for Sega Master System and Game Gear ROM dumps
  2007. #
  2008. # Does not detect all images.  Very preliminary guesswork.  Need more data
  2009. # on format.
  2010. #
  2011. # FIXME: need a little more info...;P
  2012. #
  2013. #0 byte 0xF3
  2014. #>1 byte 0xED  Sega Master System/Game Gear ROM dump
  2015. #>1 byte 0x31  Sega Master System/Game Gear ROM dump
  2016. #>1 byte 0xDB  Sega Master System/Game Gear ROM dump
  2017. #>1 byte 0xAF  Sega Master System/Game Gear ROM dump
  2018. #>1 byte 0xC3  Sega Master System/Game Gear ROM dump
  2019.  
  2020. #------------------------------------------------------------------------------
  2021. # dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
  2022. #
  2023. 0 belong 0x21068028   Sega Dreamcast VMU game image
  2024. 0 string LCDi         Dream Animator file
  2025.  
  2026. #------------------------------------------------------------------------------
  2027. # v64: file(1) uncertain magic for the V64 format N64 ROM dumps
  2028. #
  2029. 0 belong 0x37804012    V64 Nintendo 64 ROM dump
  2030.  
  2031. #------------------------------------------------------------------------------
  2032. # msx: file(1) magic for MSX game cartridge dumps
  2033. # Too simple - MPi
  2034. #0 beshort 0x4142 MSX game cartridge dump 
  2035.  
  2036. #------------------------------------------------------------------------------
  2037. # Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
  2038. 0    string    PS-X\ EXE    Sony Playstation executable
  2039. #  Area:
  2040. >113    string    x        (%s)
  2041.  
  2042. #------------------------------------------------------------------------------
  2043. # Microsoft Xbox executables .xbe (Esa Hyyti├â┬ñ <ehyytia@cc.hut.fi>)
  2044. 0       string          XBEH            XBE, Microsoft Xbox executable
  2045. # probabilistic checks whether signed or not
  2046. >0x0004 ulelong =0x0
  2047. >>&2    ulelong =0x0
  2048. >>>&2   ulelong =0x0  \b, not signed
  2049. >0x0004 ulelong >0
  2050. >>&2    ulelong >0
  2051. >>>&2   ulelong >0    \b, signed
  2052. # expect base address of 0x10000
  2053. >0x0104               ulelong =0x10000
  2054. >>(0x0118-0x0FF60)    ulelong&0x80000007  0x80000007 \b, all regions
  2055. >>(0x0118-0x0FF60)    ulelong&0x80000007  !0x80000007
  2056. >>>(0x0118-0x0FF60)   ulelong >0           (regions:
  2057. >>>>(0x0118-0x0FF60)  ulelong &0x00000001  NA
  2058. >>>>(0x0118-0x0FF60)  ulelong &0x00000002  Japan
  2059. >>>>(0x0118-0x0FF60)  ulelong &0x00000004  Rest_of_World
  2060. >>>>(0x0118-0x0FF60)  ulelong &0x80000000  Manufacturer
  2061. >>>(0x0118-0x0FF60)   ulelong >0           \b)
  2062.  
  2063. # --------------------------------
  2064. # Microsoft Xbox data file formats
  2065. 0       string          XIP0            XIP, Microsoft Xbox data
  2066. 0       string          XTF0            XTF, Microsoft Xbox data
  2067. #------------------------------------------------------------------------------
  2068. # convex:  file(1) magic for Convex boxes
  2069. #
  2070. # Convexes are big-endian.
  2071. #
  2072. # /*\
  2073. #  * Below are the magic numbers and tests added for Convex.
  2074. #  * Added at beginning, because they are expected to be used most.
  2075. # \*/
  2076. 0    belong    0507    Convex old-style object
  2077. >16    belong    >0    not stripped
  2078. 0    belong    0513    Convex old-style demand paged executable
  2079. >16    belong    >0    not stripped
  2080. 0    belong    0515    Convex old-style pre-paged executable
  2081. >16    belong    >0    not stripped
  2082. 0    belong    0517    Convex old-style pre-paged, non-swapped executable
  2083. >16    belong    >0    not stripped
  2084. 0    belong    0x011257    Core file
  2085. #
  2086. # The following are a series of dump format magic numbers.  Each one
  2087. # corresponds to a drastically different dump format.  The first on is
  2088. # the original dump format on a 4.1 BSD or earlier file system.  The
  2089. # second marks the change between the 4.1 file system and the 4.2 file
  2090. # system.  The Third marks the changing of the block size from 1K
  2091. # to 2K to be compatible with an IDC file system.  The fourth indicates
  2092. # a dump that is dependent on Convex Storage Manager, because data in
  2093. # secondary storage is not physically contained within the dump.
  2094. # The restore program uses these number to determine how the data is
  2095. # to be extracted.
  2096. #
  2097. 24    belong    =60011    dump format, 4.1 BSD or earlier
  2098. 24    belong    =60012    dump format, 4.2 or 4.3 BSD without IDC
  2099. 24    belong    =60013    dump format, 4.2 or 4.3 BSD (IDC compatible)
  2100. 24    belong    =60014    dump format, Convex Storage Manager by-reference dump
  2101. #
  2102. # what follows is a bunch of bit-mask checks on the flags field of the opthdr.
  2103. # If there is no `=' sign, assume just checking for whether the bit is set?
  2104. #
  2105. 0    belong    0601        Convex SOFF
  2106. >88    belong&0x000f0000    =0x00000000    c1
  2107. >88    belong            &0x00010000    c2
  2108. >88    belong            &0x00020000    c2mp
  2109. >88    belong            &0x00040000    parallel
  2110. >88    belong            &0x00080000    intrinsic
  2111. >88    belong            &0x00000001    demand paged
  2112. >88    belong            &0x00000002    pre-paged
  2113. >88    belong            &0x00000004    non-swapped
  2114. >88    belong            &0x00000008    POSIX
  2115. #
  2116. >84    belong            &0x80000000    executable
  2117. >84    belong            &0x40000000    object
  2118. >84    belong&0x20000000    =0        not stripped
  2119. >84    belong&0x18000000    =0x00000000    native fpmode
  2120. >84    belong&0x18000000    =0x10000000    ieee fpmode
  2121. >84    belong&0x18000000    =0x18000000    undefined fpmode
  2122. #
  2123. 0    belong            0605        Convex SOFF core
  2124. #
  2125. 0    belong            0607        Convex SOFF checkpoint
  2126. >88    belong&0x000f0000    =0x00000000    c1
  2127. >88    belong            &0x00010000    c2
  2128. >88    belong            &0x00020000    c2mp
  2129. >88    belong            &0x00040000    parallel
  2130. >88    belong            &0x00080000    intrinsic
  2131. >88    belong            &0x00000008    POSIX
  2132. #
  2133. >84    belong&0x18000000    =0x00000000    native fpmode
  2134. >84    belong&0x18000000    =0x10000000    ieee fpmode
  2135. >84    belong&0x18000000    =0x18000000    undefined fpmode
  2136.  
  2137. # ----------------------------------------------------------------------------
  2138. # ctags:  file (1) magic for Exuberant Ctags files
  2139. # From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
  2140. 0       string  !_TAG   Exuberant Ctags tag file text
  2141.  
  2142. #------------------------------------------------------------------------------
  2143. # database:  file(1) magic for various databases
  2144. #
  2145. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  2146. #
  2147. #
  2148. # GDBM magic numbers
  2149. #  Will be maintained as part of the GDBM distribution in the future.
  2150. #  <downsj@teeny.org>
  2151. 0    belong    0x13579ace    GNU dbm 1.x or ndbm database, big endian
  2152. 0    lelong    0x13579ace    GNU dbm 1.x or ndbm database, little endian
  2153. 0    string    GDBM        GNU dbm 2.x database
  2154. #
  2155. # Berkeley DB
  2156. #
  2157. # Ian Darwin's file /etc/magic files: big/little-endian version.
  2158. #
  2159. # Hash 1.85/1.86 databases store metadata in network byte order.
  2160. # Btree 1.85/1.86 databases store the metadata in host byte order.
  2161. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  2162.  
  2163. 0    long    0x00061561    Berkeley DB
  2164. >8    belong    4321
  2165. >>4    belong    >2        1.86
  2166. >>4    belong    <3        1.85
  2167. >>4    belong    >0        (Hash, version %d, native byte-order)
  2168. >8    belong    1234
  2169. >>4    belong    >2        1.86
  2170. >>4    belong    <3        1.85
  2171. >>4    belong    >0        (Hash, version %d, little-endian)
  2172.  
  2173. 0    belong    0x00061561    Berkeley DB
  2174. >8    belong    4321
  2175. >>4    belong    >2        1.86
  2176. >>4    belong    <3        1.85
  2177. >>4    belong    >0        (Hash, version %d, big-endian)
  2178. >8    belong    1234
  2179. >>4    belong    >2        1.86
  2180. >>4    belong    <3        1.85
  2181. >>4    belong    >0        (Hash, version %d, native byte-order)
  2182.  
  2183. 0    long    0x00053162    Berkeley DB 1.85/1.86
  2184. >4    long    >0        (Btree, version %d, native byte-order)
  2185. 0    belong    0x00053162    Berkeley DB 1.85/1.86
  2186. >4    belong    >0        (Btree, version %d, big-endian)
  2187. 0    lelong    0x00053162    Berkeley DB 1.85/1.86
  2188. >4    lelong    >0        (Btree, version %d, little-endian)
  2189.  
  2190. 12    long    0x00061561    Berkeley DB
  2191. >16    long    >0        (Hash, version %d, native byte-order)
  2192. 12    belong    0x00061561    Berkeley DB
  2193. >16    belong    >0        (Hash, version %d, big-endian)
  2194. 12    lelong    0x00061561    Berkeley DB
  2195. >16    lelong    >0        (Hash, version %d, little-endian)
  2196.  
  2197. 12    long    0x00053162    Berkeley DB
  2198. >16    long    >0        (Btree, version %d, native byte-order)
  2199. 12    belong    0x00053162    Berkeley DB
  2200. >16    belong    >0        (Btree, version %d, big-endian)
  2201. 12    lelong    0x00053162    Berkeley DB
  2202. >16    lelong    >0        (Btree, version %d, little-endian)
  2203.  
  2204. 12    long    0x00042253    Berkeley DB
  2205. >16    long    >0        (Queue, version %d, native byte-order)
  2206. 12    belong    0x00042253    Berkeley DB
  2207. >16    belong    >0        (Queue, version %d, big-endian)
  2208. 12    lelong    0x00042253    Berkeley DB
  2209. >16    lelong    >0        (Queue, version %d, little-endian)
  2210. #
  2211. #
  2212. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  2213. 0    string    RRD        RRDTool DB
  2214. >4    string    x        version %s
  2215. #----------------------------------------------------------------------
  2216. # ROOT: file(1) magic for ROOT databases
  2217. #
  2218. 0       string  root\0  ROOT file
  2219. >4      belong  x       Version %d
  2220. >33     belong  x       (Compression: %d)
  2221.  
  2222. # XXX: Weak magic.
  2223. # Alex Ott <ott@jet.msk.su>
  2224. ## Paradox file formats
  2225. #2      leshort    0x0800    Paradox 
  2226. #>0x39      byte        3    v. 3.0 
  2227. #>0x39      byte        4    v. 3.5 
  2228. #>0x39      byte        9    v. 4.x 
  2229. #>0x39      byte        10    v. 5.x 
  2230. #>0x39      byte        11    v. 5.x 
  2231. #>0x39      byte        12    v. 7.x 
  2232. #>>0x04      byte        0    indexed .DB data file 
  2233. #>>0x04      byte        1    primary index .PX file 
  2234. #>>0x04      byte        2    non-indexed .DB data file 
  2235. #>>0x04      byte        3    non-incrementing secondary index .Xnn file 
  2236. #>>0x04      byte        4    secondary index .Ynn file 
  2237. #>>0x04      byte        5    incrementing secondary index .Xnn file 
  2238. #>>0x04      byte        6    non-incrementing secondary index .XGn file 
  2239. #>>0x04      byte        7    secondary index .YGn file 
  2240. #>>>0x04      byte        8    incrementing secondary index .XGn file 
  2241. ## XBase database files
  2242. #0      byte       0x02    
  2243. #>8     leshort      >0
  2244. #>>12   leshort    0    FoxBase 
  2245. #>>>0x04    lelong        0        (no records)
  2246. #>>>0x04    lelong        >0        (%ld records)
  2247. #
  2248. #0      byte       0x03    
  2249. #>8     leshort      >0
  2250. #>>12   leshort    0    FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 
  2251. #>>>0x04    lelong        0        (no records)
  2252. #>>>0x04    lelong        >0        (%ld records)
  2253. #
  2254. #0      byte       0x04    
  2255. #>8     leshort      >0
  2256. #>>12   leshort    0    dBASE IV no memo file 
  2257. #>>>0x04    lelong        0        (no records)
  2258. #>>>0x04    lelong        >0        (%ld records)
  2259. #
  2260. #0      byte       0x05    
  2261. #>8     leshort      >0
  2262. #>>12   leshort    0    dBASE V no memo file 
  2263. #>>>0x04    lelong        0        (no records)
  2264. #>>>0x04    lelong        >0        (%ld records)
  2265. #
  2266. #0      byte       0x30
  2267. #>8     leshort      >0
  2268. #>>12   leshort    0    Visual FoxPro 
  2269. #>>>0x04    lelong        0        (no records)
  2270. #>>>0x04    lelong        >0        (%ld records)
  2271. #
  2272. #0      byte       0x43
  2273. #>8     leshort      >0
  2274. #>>12   leshort    0    FlagShip with memo var size 
  2275. #>>>0x04    lelong        0        (no records)
  2276. #>>>0x04    lelong        >0        (%ld records)
  2277. #
  2278. #0      byte       0x7b
  2279. #>8     leshort      >0
  2280. #>>12   leshort    0    dBASEIV with memo 
  2281. #>>>0x04    lelong        0        (no records)
  2282. #>>>0x04    lelong        >0        (%ld records)
  2283. #
  2284. #0      byte       0x83    
  2285. #>8     leshort      >0
  2286. #>>12   leshort    0    FoxBase+, dBaseIII+ with memo 
  2287. #>>>0x04    lelong        0        (no records)
  2288. #>>>0x04    lelong        >0        (%ld records)
  2289. #
  2290. #0      byte       0x8b
  2291. #>8     leshort      >0
  2292. #>>12   leshort    0    dBaseIV with memo 
  2293. #>>>0x04    lelong        0        (no records)
  2294. #>>>0x04    lelong        >0        (%ld records)
  2295. #
  2296. #0      byte       0x8e    
  2297. #>8     leshort      >0
  2298. #>>12   leshort    0    dBaseIV with SQL Table 
  2299. #>>>0x04    lelong        0        (no records)
  2300. #>>>0x04    lelong        >0        (%ld records)
  2301. #
  2302. #0      byte       0xb3
  2303. #>8     leshort      >0
  2304. #>>12   leshort    0    FlagShip with .dbt memo 
  2305. #>>>0x04    lelong        0        (no records)
  2306. #>>>0x04    lelong        >0        (%ld records)
  2307. #
  2308. #0      byte       0xf5
  2309. #>8     leshort      >0
  2310. #>>12   leshort    0    FoxPro with memo 
  2311. #>>>0x04    lelong        0        (no records)
  2312. #>>>0x04    lelong        >0        (%ld records)
  2313. #
  2314. #0    leshort        0x0006        DBase 3 index file
  2315.  
  2316. # MS Access database
  2317. 4      string    Standard\ Jet\ DB    Microsoft Access Database
  2318.  
  2319. # TDB database from Samba et al - Martin Pool <mbp@samba.org>
  2320. 0    string    TDB\ file        TDB database
  2321. >32    lelong    0x2601196D        version 6, little-endian
  2322. >>36    lelong    x            hash size %d bytes
  2323.  
  2324. # SE Linux policy database
  2325. 0       lelong  0xf97cff8c      SE Linux policy
  2326. >16     lelong  x               v%d
  2327. >20     lelong  1      MLS
  2328. >24     lelong  x       %d symbols
  2329. >28     lelong  x       %d ocons
  2330.  
  2331. # ICE authority file data (Wolfram Kleff)
  2332. 2    string        ICE        ICE authority data
  2333.  
  2334. # X11 Xauthority file (Wolfram Kleff)
  2335. 10    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2336. 11    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2337. 12    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2338. 13    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2339. 14    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2340. 15    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2341. 16    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2342. 17    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2343. 18    string        MIT-MAGIC-COOKIE-1    X11 Xauthority data
  2344.  
  2345. #------------------------------------------------------------------------------
  2346. # diamond:  file(1) magic for Diamond system
  2347. #
  2348. # ... diamond is a multi-media mail and electronic conferencing system....
  2349. #
  2350. # XXX - I think it was either renamed Slate, or replaced by Slate....
  2351. #
  2352. #    The full deal is too long...
  2353. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  2354. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  2355.  
  2356. #------------------------------------------------------------------------------
  2357. # diff:  file(1) magic for diff(1) output
  2358. #
  2359. 0    string        diff\     'diff' output text
  2360. 0    string        ***\         'diff' output text
  2361. 0    string        Only\ in\     'diff' output text
  2362. 0    string        Common\ subdirectories:\     'diff' output text
  2363.  
  2364. # xdelta is like diff(1) for binary files (works for text, too).
  2365. # Available from: ftp://ftp.xcf.berkeley.edu/pub/xdelta/
  2366. 0       string          %XDZ            xdelta diff file
  2367. >4      string          >%              version %.3s
  2368. #  Digital UNIX - Info
  2369. #
  2370. 0    string    !<arch>\n________64E    Alpha archive
  2371. >22    string    X            -- out of date
  2372. #
  2373. # Alpha COFF Based Executables
  2374. # The stripped stuff really needs to be an 8 byte (64 bit) compare,
  2375. # but this works
  2376. 0    leshort        0x183        COFF format alpha
  2377. >22    leshort&020000    &010000        sharable library,
  2378. >22    leshort&020000    ^010000        dynamically linked,
  2379. >24    leshort        0410        pure
  2380. >24    leshort        0413        demand paged
  2381. >8    lelong        >0        executable or object module, not stripped
  2382. >8    lelong        0
  2383. >>12    lelong        0        executable or object module, stripped
  2384. >>12    lelong        >0        executable or object module, not stripped
  2385. >27     byte            >0              - version %d.
  2386. >26     byte            >0              %d-
  2387. >28     leshort         >0              %d
  2388. #
  2389. # The next is incomplete, we could tell more about this format,
  2390. # but its not worth it.
  2391. 0    leshort        0x188    Alpha compressed COFF
  2392. 0    leshort        0x18f    Alpha u-code object
  2393. #
  2394. #
  2395. # Some other interesting Digital formats,
  2396. 0    string    \377\377\177        ddis/ddif
  2397. 0    string    \377\377\174        ddis/dots archive
  2398. 0    string    \377\377\176        ddis/dtif table data
  2399. 0    string    \033c\033        LN03 output
  2400. 0    long    04553207        X image
  2401. #
  2402. 0    string    !<PDF>!\n        profiling data file
  2403. #
  2404. # Locale data tables (MIPS and Alpha).
  2405. #
  2406. 0    short        0x0501        locale data table
  2407. >6    short        0x24        for MIPS
  2408. >6    short        0x40        for Alpha
  2409. # ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
  2410. # from http://www.atsc.org/standards/a_52a.pdf
  2411. # corrections, additions, etc. are always welcome!
  2412. #
  2413. # syncword
  2414. 0       beshort         0x0b77  ATSC A/52 aka AC-3 aka Dolby Digital stream,
  2415. # fscod
  2416. >4      byte&0xc0       0x00    48 kHz,
  2417. >4      byte&0xc0       0x40    44.1 kHz,
  2418. >4      byte&0xc0       0x80    32 kHz,
  2419. # is this one used for 96 kHz?
  2420. >4      byte&0xc0       0xc0    reserved frequency,
  2421. #
  2422. >5    byte&7 = 0        \b, complete main (CM)
  2423. >5    byte&7 = 1        \b, music and effects (ME)
  2424. >5    byte&7 = 2        \b, visually impaired (VI)
  2425. >5    byte&7 = 3        \b, hearing impaired (HI)
  2426. >5    byte&7 = 4        \b, dialogue (D)
  2427. >5    byte&7 = 5        \b, commentary (C)
  2428. >5    byte&7 = 6        \b, emergency (E)
  2429. # acmod
  2430. >6      byte&0xe0       0x00    1+1 front,
  2431. >6      byte&0xe0       0x20    1 front/0 rear,
  2432. >6      byte&0xe0       0x40    2 front/0 rear,
  2433. >6      byte&0xe0       0x60    3 front/0 rear,
  2434. >6      byte&0xe0       0x80    2 front/1 rear,
  2435. >6      byte&0xe0       0xa0    3 front/1 rear,
  2436. >6      byte&0xe0       0xc0    2 front/2 rear,
  2437. >6      byte&0xe0       0xe0    3 front/2 rear,
  2438. # lfeon (these may be incorrect)
  2439. >7      byte&0x40       0x00    LFE off,
  2440. >7      byte&0x40       0x40    LFE on,
  2441. #
  2442. >4    byte&0x3e = 0x00    \b, 32 kbit/s
  2443. >4    byte&0x3e = 0x02        \b, 40 kbit/s
  2444. >4    byte&0x3e = 0x04        \b, 48 kbit/s
  2445. >4    byte&0x3e = 0x06        \b, 56 kbit/s
  2446. >4    byte&0x3e = 0x08        \b, 64 kbit/s
  2447. >4    byte&0x3e = 0x0a        \b, 80 kbit/s
  2448. >4    byte&0x3e = 0x0c        \b, 96 kbit/s
  2449. >4    byte&0x3e = 0x0e        \b, 112 kbit/s
  2450. >4    byte&0x3e = 0x10        \b, 128 kbit/s
  2451. >4    byte&0x3e = 0x12        \b, 160 kbit/s
  2452. >4    byte&0x3e = 0x14        \b, 192 kbit/s
  2453. >4    byte&0x3e = 0x16        \b, 224 kbit/s
  2454. >4    byte&0x3e = 0x18        \b, 256 kbit/s
  2455. >4    byte&0x3e = 0x1a        \b, 320 kbit/s
  2456. >4    byte&0x3e = 0x1c        \b, 384 kbit/s
  2457. >4    byte&0x3e = 0x1e        \b, 448 kbit/s
  2458. >4    byte&0x3e = 0x20        \b, 512 kbit/s
  2459. >4    byte&0x3e = 0x22        \b, 576 kbit/s
  2460. >4    byte&0x3e = 0x24        \b, 640 kbit/s
  2461. # dsurmod (these may be incorrect)
  2462. >6      beshort&0x0180  0x0000  Dolby Surround not indicated
  2463. >6      beshort&0x0180  0x0080  not Dolby Surround encoded
  2464. >6      beshort&0x0180  0x0100  Dolby Surround encoded
  2465. >6      beshort&0x0180  0x0180  reserved Dolby Surround mode
  2466.  
  2467. #------------------------------------------------------------------------------
  2468. # dump:  file(1) magic for dump file format--for new and old dump filesystems
  2469. #
  2470. # We specify both byte orders in order to recognize byte-swapped dumps.
  2471. #
  2472. 24    belong    60012        new-fs dump file (big endian),
  2473. >4    bedate    x        Previous dump %s,
  2474. >8    bedate    x        This dump %s,
  2475. >12    belong    >0        Volume %ld,
  2476. >692    belong    0        Level zero, type:
  2477. >692    belong    >0        Level %d, type:
  2478. >0    belong    1        tape header,
  2479. >0    belong    2        beginning of file record,
  2480. >0    belong    3        map of inodes on tape,
  2481. >0    belong    4        continuation of file record,
  2482. >0    belong    5        end of volume,
  2483. >0    belong    6        map of inodes deleted,
  2484. >0    belong    7        end of medium (for floppy),
  2485. >676    string    >\0        Label %s,
  2486. >696    string    >\0        Filesystem %s,
  2487. >760    string    >\0        Device %s,
  2488. >824    string    >\0        Host %s,
  2489. >888    belong    >0        Flags %x
  2490.  
  2491. 24    belong    60011        old-fs dump file (big endian),
  2492. #>4    bedate    x        Previous dump %s,
  2493. #>8    bedate    x        This dump %s,
  2494. >12    belong    >0        Volume %ld,
  2495. >692    belong    0        Level zero, type:
  2496. >692    belong    >0        Level %d, type:
  2497. >0    belong    1        tape header,
  2498. >0    belong    2        beginning of file record,
  2499. >0    belong    3        map of inodes on tape,
  2500. >0    belong    4        continuation of file record,
  2501. >0    belong    5        end of volume,
  2502. >0    belong    6        map of inodes deleted,
  2503. >0    belong    7        end of medium (for floppy),
  2504. >676    string    >\0        Label %s,
  2505. >696    string    >\0        Filesystem %s,
  2506. >760    string    >\0        Device %s,
  2507. >824    string    >\0        Host %s,
  2508. >888    belong    >0        Flags %x
  2509.  
  2510. 24    lelong    60012        new-fs dump file (little endian),
  2511. >4    ledate    x        This dump %s,
  2512. >8    ledate    x        Previous dump %s,
  2513. >12    lelong    >0        Volume %ld,
  2514. >692    lelong    0        Level zero, type:
  2515. >692    lelong    >0        Level %d, type:
  2516. >0    lelong    1        tape header,
  2517. >0    lelong    2        beginning of file record,
  2518. >0    lelong    3        map of inodes on tape,
  2519. >0    lelong    4        continuation of file record,
  2520. >0    lelong    5        end of volume,
  2521. >0    lelong    6        map of inodes deleted,
  2522. >0    lelong    7        end of medium (for floppy),
  2523. >676    string    >\0        Label %s,
  2524. >696    string    >\0        Filesystem %s,
  2525. >760    string    >\0        Device %s,
  2526. >824    string    >\0        Host %s,
  2527. >888    lelong    >0        Flags %x
  2528.  
  2529. 24    lelong    60011        old-fs dump file (little endian),
  2530. #>4    ledate    x        Previous dump %s,
  2531. #>8    ledate    x        This dump %s,
  2532. >12    lelong    >0        Volume %ld,
  2533. >692    lelong    0        Level zero, type:
  2534. >692    lelong    >0        Level %d, type:
  2535. >0    lelong    1        tape header,
  2536. >0    lelong    2        beginning of file record,
  2537. >0    lelong    3        map of inodes on tape,
  2538. >0    lelong    4        continuation of file record,
  2539. >0    lelong    5        end of volume,
  2540. >0    lelong    6        map of inodes deleted,
  2541. >0    lelong    7        end of medium (for floppy),
  2542. >676    string    >\0        Label %s,
  2543. >696    string    >\0        Filesystem %s,
  2544. >760    string    >\0        Device %s,
  2545. >824    string    >\0        Host %s,
  2546. >888    lelong    >0        Flags %x
  2547.  
  2548. #------------------------------------------------------------------------------
  2549. # Dyadic: file(1) magic for Dyalog APL.
  2550. #
  2551. 0     byte    0xaa
  2552. >1    byte    <4        Dyalog APL
  2553. >>1    byte    0x00        incomplete workspace
  2554. >>1    byte    0x01        component file
  2555. >>1    byte    0x02        external variable
  2556. >>1    byte    0x03        workspace
  2557. >>2    byte    x        version %d
  2558. >>3    byte    x        .%d
  2559.  
  2560. #------------------------------------------------------------------------------
  2561. # T602 editor documents 
  2562. # by David Necas <yeti@physics.muni.cz>
  2563. 0    string    @CT\     T602 document data,
  2564. >4    string    0    Kamenicky
  2565. >4    string    1    CP 852
  2566. >4    string    2    KOI8-CS
  2567. >4    string    >2    unknown encoding
  2568.  
  2569. # Vi IMproved Encrypted file 
  2570. # by David Necas <yeti@physics.muni.cz>
  2571. 0    string    VimCrypt~    Vim encrypted file data
  2572.  
  2573. #------------------------------------------------------------------------------
  2574. # elf:  file(1) magic for ELF executables
  2575. #
  2576. # We have to check the byte order flag to see what byte order all the
  2577. # other stuff in the header is in.
  2578. #
  2579. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  2580. #
  2581. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  2582. 0    string        \177ELF        ELF
  2583. >4    byte        0        invalid class
  2584. >4    byte        1        32-bit
  2585. # only for MIPS - in the future, the ABI field of e_flags should be used.
  2586. >>18    leshort        8
  2587. >>>36    lelong        &0x20        N32
  2588. >>18    leshort        10
  2589. >>>36    lelong        &0x20        N32
  2590. >>18    beshort        8
  2591. >>>36    belong        &0x20        N32
  2592. >>18    beshort        10
  2593. >>>36    belong        &0x20        N32
  2594. >4    byte        2        64-bit
  2595. >5    byte        0        invalid byte order
  2596. >5    byte        1        LSB
  2597. # The official e_machine number for MIPS is now #8, regardless of endianness.
  2598. # The second number (#10) will be deprecated later. For now, we still
  2599. # say something if #10 is encountered, but only gory details for #8.
  2600. >>18    leshort        8
  2601. # only for 32-bit
  2602. >>>4    byte        1
  2603. >>>>36  lelong&0xf0000000    0x00000000    MIPS-I
  2604. >>>>36  lelong&0xf0000000    0x10000000    MIPS-II
  2605. >>>>36  lelong&0xf0000000    0x20000000    MIPS-III
  2606. >>>>36  lelong&0xf0000000    0x30000000    MIPS-IV
  2607. >>>>36  lelong&0xf0000000    0x40000000    MIPS-V
  2608. >>>>36  lelong&0xf0000000    0x60000000    MIPS32
  2609. >>>>36  lelong&0xf0000000    0x70000000    MIPS64
  2610. >>>>36  lelong&0xf0000000    0x80000000    MIPS32 rel2
  2611. >>>>36  lelong&0xf0000000    0x90000000    MIPS64 rel2
  2612. # only for 64-bit
  2613. >>>4    byte        2
  2614. >>>>48  lelong&0xf0000000    0x00000000    MIPS-I
  2615. >>>>48  lelong&0xf0000000    0x10000000    MIPS-II
  2616. >>>>48  lelong&0xf0000000    0x20000000    MIPS-III
  2617. >>>>48  lelong&0xf0000000    0x30000000    MIPS-IV
  2618. >>>>48  lelong&0xf0000000    0x40000000    MIPS-V
  2619. >>>>48  lelong&0xf0000000    0x60000000    MIPS32
  2620. >>>>48  lelong&0xf0000000    0x70000000    MIPS64 
  2621. >>>>48  lelong&0xf0000000    0x80000000    MIPS32 rel2
  2622. >>>>48  lelong&0xf0000000    0x90000000    MIPS64 rel2
  2623. >>16    leshort        0        no file type,
  2624. >>16    leshort        1        relocatable,
  2625. >>16    leshort        2        executable,
  2626. >>16    leshort        3        shared object,
  2627. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  2628. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  2629. >>16    leshort        4        core file
  2630. # Core file detection is not reliable.
  2631. #>>>(0x38+0xcc) string    >\0        of '%s'
  2632. #>>>(0x38+0x10) lelong    >0        (signal %d),
  2633. >>16    leshort        &0xff00        processor-specific,
  2634. >>18    leshort        0        no machine,
  2635. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  2636. >>18    leshort        2        SPARC - invalid byte order,
  2637. >>18    leshort        3        Intel 80386,
  2638. >>18    leshort        4        Motorola
  2639. >>>36    lelong        &0x01000000    68000 - invalid byte order,
  2640. >>>36    lelong        &0x00810000    CPU32 - invalid byte order,
  2641. >>>36    lelong        0        68020 - invalid byte order,
  2642. >>18    leshort        5        Motorola 88000 - invalid byte order,
  2643. >>18    leshort        6        Intel 80486,
  2644. >>18    leshort        7        Intel 80860,
  2645. >>18    leshort        8        MIPS,
  2646. >>18    leshort        9        Amdahl - invalid byte order,
  2647. >>18    leshort        10        MIPS (deprecated),
  2648. >>18    leshort        11        RS6000 - invalid byte order,
  2649. >>18    leshort        15        PA-RISC - invalid byte order,
  2650. >>>50    leshort        0x0214        2.0
  2651. >>>48    leshort        &0x0008        (LP64),
  2652. >>18    leshort        16        nCUBE,
  2653. >>18    leshort        17        Fujitsu VPP500,
  2654. >>18    leshort        18        SPARC32PLUS,
  2655. >>18    leshort        20        PowerPC,
  2656. >>18    leshort        22        IBM S/390,
  2657. >>18    leshort        36        NEC V800,
  2658. >>18    leshort        37        Fujitsu FR20,
  2659. >>18    leshort        38        TRW RH-32,
  2660. >>18    leshort        39        Motorola RCE,
  2661. >>18    leshort        40        ARM,
  2662. >>18    leshort        41        Alpha,
  2663. >>18    leshort        0xa390        IBM S/390 (obsolete),
  2664. >>18    leshort        42        Hitachi SH,
  2665. >>18    leshort        43        SPARC V9 - invalid byte order,
  2666. >>18    leshort        44        Siemens Tricore Embedded Processor,
  2667. >>18    leshort        45        Argonaut RISC Core, Argonaut Technologies Inc.,
  2668. >>18    leshort        46        Hitachi H8/300,
  2669. >>18    leshort        47        Hitachi H8/300H,
  2670. >>18    leshort        48        Hitachi H8S,
  2671. >>18    leshort        49        Hitachi H8/500,
  2672. >>18    leshort        50        IA-64 (Intel 64 bit architecture)
  2673. >>18    leshort        51        Stanford MIPS-X,
  2674. >>18    leshort        52        Motorola Coldfire,
  2675. >>18    leshort        53        Motorola M68HC12,
  2676. >>18    leshort        62        AMD x86-64,
  2677. >>18    leshort        75        Digital VAX,
  2678. >>18    leshort        97        NatSemi 32k,
  2679. >>18    leshort        0x9026        Alpha (unofficial),
  2680. >>20    lelong        0        invalid version
  2681. >>20    lelong        1        version 1
  2682. >>36    lelong        1        MathCoPro/FPU/MAU Required
  2683. >5    byte        2        MSB
  2684. # only for MIPS - see comment in little-endian section above.
  2685. >>18    beshort        8
  2686. # only for 32-bit
  2687. >>>4    byte        1
  2688. >>>>36  belong&0xf0000000    0x00000000    MIPS-I
  2689. >>>>36  belong&0xf0000000    0x10000000    MIPS-II
  2690. >>>>36  belong&0xf0000000    0x20000000    MIPS-III
  2691. >>>>36  belong&0xf0000000    0x30000000    MIPS-IV
  2692. >>>>36  belong&0xf0000000    0x40000000    MIPS-V
  2693. >>>>36  belong&0xf0000000    0x60000000    MIPS32
  2694. >>>>36  belong&0xf0000000    0x70000000    MIPS64
  2695. >>>>36  belong&0xf0000000    0x80000000    MIPS32 rel2
  2696. >>>>36  belong&0xf0000000    0x90000000    MIPS64 rel2
  2697. # only for 64-bit
  2698. >>>4    byte        2
  2699. >>>>48    belong&0xf0000000    0x00000000    MIPS-I
  2700. >>>>48    belong&0xf0000000    0x10000000    MIPS-II
  2701. >>>>48    belong&0xf0000000    0x20000000    MIPS-III
  2702. >>>>48    belong&0xf0000000    0x30000000    MIPS-IV
  2703. >>>>48    belong&0xf0000000    0x40000000    MIPS-V
  2704. >>>>48    belong&0xf0000000    0x60000000    MIPS32
  2705. >>>>48    belong&0xf0000000    0x70000000    MIPS64 
  2706. >>>>48    belong&0xf0000000    0x80000000    MIPS32 rel2
  2707. >>>>48    belong&0xf0000000    0x90000000    MIPS64 rel2
  2708. >>16    beshort        0        no file type,
  2709. >>16    beshort        1        relocatable,
  2710. >>16    beshort        2        executable,
  2711. >>16    beshort        3        shared object,
  2712. >>16    beshort        4        core file,
  2713. #>>>(0x38+0xcc) string    >\0        of '%s'
  2714. #>>>(0x38+0x10) belong    >0        (signal %d),
  2715. >>16    beshort        &0xff00        processor-specific,
  2716. >>18    beshort        0        no machine,
  2717. >>18    beshort        1        AT&T WE32100,
  2718. >>18    beshort        2        SPARC,
  2719. >>18    beshort        3        Intel 80386 - invalid byte order,
  2720. >>18    beshort        4        Motorola
  2721. >>>36    belong        &0x01000000    68000,
  2722. >>>36    belong        &0x00810000    CPU32,
  2723. >>>36    belong        0        68020,
  2724. >>18    beshort        5        Motorola 88000,
  2725. >>18    beshort        6        Intel 80486 - invalid byte order,
  2726. >>18    beshort        7        Intel 80860,
  2727. >>18    beshort        8        MIPS,
  2728. >>18    beshort        9        Amdahl,
  2729. >>18    beshort        10        MIPS (deprecated),
  2730. >>18    beshort        11        RS6000,
  2731. >>18    beshort        15        PA-RISC
  2732. >>>50    beshort        0x0214        2.0
  2733. >>>48    beshort        &0x0008        (LP64)
  2734. >>18    beshort        16        nCUBE,
  2735. >>18    beshort        17        Fujitsu VPP500,
  2736. >>18    beshort        18        SPARC32PLUS,
  2737. >>>36    belong&0xffff00    &0x000100    V8+ Required,
  2738. >>>36    belong&0xffff00    &0x000200    Sun UltraSPARC1 Extensions Required,
  2739. >>>36    belong&0xffff00    &0x000400    HaL R1 Extensions Required,
  2740. >>>36    belong&0xffff00    &0x000800    Sun UltraSPARC3 Extensions Required,
  2741. >>18    beshort        20        PowerPC or cisco 4500,
  2742. >>18    beshort        21        cisco 7500,
  2743. >>18    beshort        22        IBM S/390,
  2744. >>18    beshort        24        cisco SVIP,
  2745. >>18    beshort        25        cisco 7200,
  2746. >>18    beshort        36        NEC V800 or cisco 12000,
  2747. >>18    beshort        37        Fujitsu FR20,
  2748. >>18    beshort        38        TRW RH-32,
  2749. >>18    beshort        39        Motorola RCE,
  2750. >>18    beshort        40        ARM,
  2751. >>18    beshort        41        Alpha,
  2752. >>18    beshort        42        Hitachi SH,
  2753. >>18    beshort        43        SPARC V9,
  2754. >>18    beshort        44        Siemens Tricore Embedded Processor,
  2755. >>18    beshort        45        Argonaut RISC Core, Argonaut Technologies Inc.,
  2756. >>18    beshort        46        Hitachi H8/300,
  2757. >>18    beshort        47        Hitachi H8/300H,
  2758. >>18    beshort        48        Hitachi H8S,
  2759. >>18    beshort        49        Hitachi H8/500,
  2760. >>18    beshort        50        Intel Merced Processor,
  2761. >>18    beshort        51        Stanford MIPS-X,
  2762. >>18    beshort        52        Motorola Coldfire,
  2763. >>18    beshort        53        Motorola M68HC12,
  2764. >>18    beshort        73        Cray NV1,
  2765. >>18    beshort        75        Digital VAX,
  2766. >>18    beshort        97        NatSemi 32k,
  2767. >>18    beshort        0x9026        Alpha (unofficial),
  2768. >>18    beshort        0xa390        IBM S/390 (obsolete),
  2769. >>20    belong        0        invalid version
  2770. >>20    belong        1        version 1
  2771. >>36    belong        1        MathCoPro/FPU/MAU Required
  2772. # Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
  2773. # like proper ELF, but extracting the string had bad results.
  2774. >4      byte            <0x80
  2775. >>8    string        >\0        (%s)
  2776. >8    string        \0
  2777. >>7    byte        0        (SYSV)
  2778. >>7    byte        1        (HP-UX)
  2779. >>7    byte        2        (NetBSD)
  2780. >>7    byte        3        (GNU/Linux)
  2781. >>7    byte        4        (GNU/Hurd)
  2782. >>7    byte        5        (86Open)
  2783. >>7    byte        6        (Solaris)
  2784. >>7    byte        7        (Monterey)
  2785. >>7    byte        8        (IRIX)
  2786. >>7    byte        9        (FreeBSD)
  2787. >>7    byte        10        (Tru64)
  2788. >>7    byte        11        (Novell Modesto)
  2789. >>7    byte        12        (OpenBSD)
  2790. >>7    byte        97        (ARM)
  2791. >>7    byte        255        (embedded)
  2792.  
  2793. #------------------------------------------------------------------------------
  2794. # encore:  file(1) magic for Encore machines
  2795. #
  2796. # XXX - needs to have the byte order specified (NS32K was little-endian,
  2797. # dunno whether they run the 88K in little-endian mode or not).
  2798. #
  2799. 0    short        0x154        Encore
  2800. >20    short        0x107        executable
  2801. >20    short        0x108        pure executable
  2802. >20    short        0x10b        demand-paged executable
  2803. >20    short        0x10f        unsupported executable
  2804. >12    long        >0        not stripped
  2805. >22    short        >0        - version %ld
  2806. >22    short        0        -
  2807. #>4    date        x        stamp %s
  2808. 0    short        0x155        Encore unsupported executable
  2809. >12    long        >0        not stripped
  2810. >22    short        >0        - version %ld
  2811. >22    short        0        -
  2812. #>4    date        x        stamp %s
  2813.  
  2814. #------------------------------------------------------------------------------
  2815. # Epoc 32 : file(1) magic for Epoc Documents [psion/osaris
  2816. # Stefan Praszalowicz (hpicollo@worldnet.fr)
  2817. #0    lelong        0x10000037    Epoc32
  2818. >4    lelong        0x1000006D
  2819. >>8    lelong        0x1000007F    Word
  2820. >>8    lelong        0x10000088    Sheet
  2821. >>8    lelong        0x1000007D    Sketch
  2822. >>8    lelong        0x10000085    TextEd
  2823.  
  2824. #------------------------------------------------------------------------------
  2825. # fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
  2826. # From Roger Leigh <roger@whinlatter.uklinux.net>
  2827. 0       string          FCS1.0          Flow Cytometry Standard (FCS) data, version 1.0
  2828. 0       string          FCS2.0          Flow Cytometry Standard (FCS) data, version 2.0
  2829. 0       string          FCS3.0          Flow Cytometry Standard (FCS) data, version 3.0
  2830.  
  2831.  
  2832. #------------------------------------------------------------------------------
  2833. # filesystems:  file(1) magic for different filesystems
  2834. #
  2835. 0    string    \366\366\366\366    PC formatted floppy with no filesystem
  2836. # Sun disk labels
  2837. # From /usr/include/sun/dklabel.h:
  2838. 0774    beshort        0xdabe        Sun disk label
  2839. >0    string        x        '%s
  2840. >>31      string        >\0        \b%s
  2841. >>>63      string        >\0        \b%s
  2842. >>>>95     string        >\0        \b%s
  2843. >0    string        x        \b'
  2844. >0734    short        >0        %d rpm,
  2845. >0736    short        >0        %d phys cys,
  2846. >0740    short        >0        %d alts/cyl,
  2847. >0746    short        >0        %d interleave,
  2848. >0750    short        >0        %d data cyls,
  2849. >0752    short        >0        %d alt cyls,
  2850. >0754    short        >0        %d heads/partition,
  2851. >0756    short        >0        %d sectors/track,
  2852. >0764    long        >0        start cyl %ld,
  2853. >0770    long        x        %ld blocks
  2854. # Is there a boot block written 1 sector in?
  2855. >512    belong&077777777    0600407    \b, boot block present
  2856. 0x1FE    leshort    0xAA55            x86 boot sector
  2857. >2    string    OSBS            \b, OS/BS MBR
  2858. # J\xf6rg Jenderek <joerg.jenderek@gmx.net>
  2859. >0x8C    string    Invalid\ partition\ table    \b, MS-DOS MBR
  2860. >0x9D    string    Invalid\ partition\ table    \b, DR-DOS MBR, version 7.01 to 7.03
  2861. >0x10F    string    Ung\201ltige\ Partitionstabelle    \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
  2862. >0x8B    string    Ung\201ltige\ Partitionstabelle    \b, MS-DOS MBR, german version 5.00 to 4.00.950
  2863. >0x145    string    Default:\ F            \b, FREE-DOS MBR
  2864. >0    string    \0\0\0\0        \b, extended partition table
  2865. # JuMP short     bootcodeoffset NOP assembler instructions will usually be EB xx 90
  2866. # older drives may use E9 xx xx
  2867. >0        lelong&0x009000EB    0x009000EB 
  2868. >0        lelong&0x000000E9    0x000000E9 
  2869. >>1        ubyte            >37    \b, code offset 0x%x
  2870. # mtools-3.9.8/msdos.h
  2871. # usual values are marked with comments to get only informations of strange FAT systems
  2872. # valid sectorsize are from 32 to 2048
  2873. >>>11        uleshort    <2049    
  2874. >>>>11        uleshort    >31    
  2875. >>>>>3        string        >\0        \b, OEM-ID "%8.8s"
  2876. >>>>>11        uleshort    >512        \b, Bytes/sector %u
  2877. #>>>>>11    uleshort    =512        \b, Bytes/sector %u=512 (usual)
  2878. >>>>>11        uleshort    <512        \b, Bytes/sector %u
  2879. >>>>>13        ubyte        >1        \b, sectors/cluster %u
  2880. #>>>>>13    ubyte        =1        \b, sectors/cluster %u (usual on Floppies)
  2881. >>>>>14        uleshort    >32        \b, reserved sectors %u
  2882. #>>>>>14    uleshort    =32        \b, reserved sectors %u (usual Fat32)
  2883. #>>>>>14    uleshort    >1        \b, reserved sectors %u
  2884. #>>>>>14    uleshort    =1        \b, reserved sectors %u (usual FAT12,FAT16)
  2885. >>>>>14        uleshort    <1        \b, reserved sectors %u
  2886. >>>>>16        ubyte        >2        \b, FATs %u
  2887. #>>>>>16    ubyte        =2        \b, FATs %u (usual)
  2888. >>>>>16        ubyte        =1        \b, FAT  %u
  2889. >>>>>16        ubyte        >0
  2890. >>>>>17        uleshort    >0        \b, root entries %u
  2891. #>>>>>17    uleshort    =0        \b, root entries %u=0 (usual Fat32)
  2892. >>>>>19        uleshort    >0        \b, sectors %u (volumes <=32 MB) 
  2893. #>>>>>19    uleshort    =0        \b, sectors %u=0 (usual Fat32)
  2894. >>>>>21        ubyte        >0xF0        \b, Media descriptor 0x%x
  2895. #>>>>>21    ubyte        =0xF0        \b, Media descriptor 0x%x (usual floppy)
  2896. >>>>>21        ubyte        <0xF0        \b, Media descriptor 0x%x
  2897. >>>>>22        uleshort    >0        \b, sectors/FAT %u
  2898. #>>>>>22    uleshort    =0        \b, sectors/FAT %u=0 (usual Fat32)
  2899. >>>>>26        ubyte        >2        \b, heads %u
  2900. #>>>>>26    ubyte        =2        \b, heads %u (usual floppy)
  2901. >>>>>26        ubyte        =1        \b, heads %u
  2902. >>>>>28        ulelong        >0        \b, hidden sectors %u
  2903. #>>>>>28    ulelong        =0        \b, hidden sectors %u (usual floppy)
  2904. >>>>>32        ulelong        >0        \b, sectors %u (volumes > 32 MB) 
  2905. #>>>>>32    ulelong        =0        \b, sectors %u (volumes > 32 MB) 
  2906. # FAT<32 specific 
  2907. # NOT le FAT3=NOT 3TAF=0xCCABBEB9
  2908. >>>>>82        ulelong&0xCCABBEB9    >0
  2909. >>>>>>36    ubyte        >0x80        \b, physical drive 0x%x
  2910. #>>>>>>36    ubyte        =0x80        \b, physical drive 0x%x=0x80 (usual harddisk)
  2911. >>>>>>36    ubyte&0x7F    >0        \b, physical drive 0x%x
  2912. #>>>>>>36    ubyte        =0        \b, physical drive 0x%x=0 (usual floppy)
  2913. >>>>>>37    ubyte        >0        \b, reserved 0x%x
  2914. #>>>>>>37    ubyte        =0        \b, reserved 0x%x
  2915. >>>>>>38    ubyte        >0x29        \b, dos < 4.0 BootSector (0x%x)
  2916. >>>>>>38    ubyte        <0x29        \b, dos < 4.0 BootSector (0x%x)
  2917. >>>>>>38    ubyte        =0x29
  2918. >>>>>>>39    ulelong        x        \b, serial number 0x%x
  2919. >>>>>>>43    string        <NO\ NAME    \b, label: "%11.11s"
  2920. >>>>>>>43    string        >NO\ NAME    \b, label: "%11.11s"
  2921. >>>>>>>43    string        =NO\ NAME    \b, unlabeled
  2922. >>>>>>54    string        FAT1        \b, FAT
  2923. >>>>>>>54    string        FAT12        \b (12 bit)
  2924. >>>>>>>54    string        FAT16        \b (16 bit)
  2925. # FAT32 specific
  2926. >>>>>82        string        FAT32        \b, FAT (32 bit)
  2927. >>>>>>36    ulelong        x        \b, sectors/FAT %u
  2928. >>>>>>40    uleshort    >0        \b, extension flags %u
  2929. #>>>>>>40    uleshort    =0        \b, extension flags %u
  2930. >>>>>>42    uleshort    >0        \b, fsVersion %u
  2931. #>>>>>>42    uleshort    =0        \b, fsVersion %u (usual)
  2932. >>>>>>44    ulelong        >2        \b, rootdir cluster %u
  2933. #>>>>>>44    ulelong        =2        \b, rootdir cluster %u
  2934. #>>>>>>44    ulelong        =1        \b, rootdir cluster %u
  2935. >>>>>>48    uleshort    >1        \b, infoSector %u
  2936. #>>>>>>48    uleshort    =1        \b, infoSector %u (usual)
  2937. >>>>>>48    uleshort    <1        \b, infoSector %u
  2938. >>>>>>50    uleshort    >6        \b, Backup boot sector %u
  2939. #>>>>>>50    uleshort    =6        \b, Backup boot sector %u (usual) 
  2940. >>>>>>50    uleshort    <6        \b, Backup boot sector %u
  2941. >>>>>>54    ulelong        >0        \b, reserved1 0x%x
  2942. >>>>>>58    ulelong        >0        \b, reserved2 0x%x
  2943. >>>>>>62    ulelong        >0        \b, reserved3 0x%x
  2944. # same structure as FAT1X 
  2945. >>>>>>64    ubyte        >0x80        \b, physical drive 0x%x
  2946. #>>>>>>64    ubyte        =0x80        \b, physical drive 0x%x=80 (usual harddisk)
  2947. >>>>>>64    ubyte&0x7F    >0        \b, physical drive 0x%x
  2948. #>>>>>>64    ubyte        =0        \b, physical drive 0x%x=0 (usual floppy)
  2949. >>>>>>65    ubyte        >0        \b, reserved 0x%x
  2950. >>>>>>66    ubyte        >0x29        \b, dos < 4.0 BootSector (0x%x)
  2951. >>>>>>66    ubyte        <0x29        \b, dos < 4.0 BootSector (0x%x)
  2952. >>>>>>66    ubyte        =0x29
  2953. >>>>>>>67    ulelong        x        \b, serial number 0x%x
  2954. >>>>>>>71    string        <NO\ NAME    \b, label: "%11.11s"
  2955. >>>>>>71    string        >NO\ NAME    \b, label: "%11.11s"
  2956. >>>>>>71    string        =NO\ NAME    \b, unlabeled
  2957. ### FATs end
  2958. >0x200    lelong    0x82564557        \b, BSD disklabel
  2959.  
  2960. # Minix filesystems - Juan Cespedes <cespedes@debian.org>
  2961. 0x410    leshort        0x137f        Minix filesystem
  2962. 0x410    beshort        0x137f        Minix filesystem (big endian),
  2963. >0x402    beshort        !0        \b, %d zones
  2964. >0x1e    string        minix        \b, bootable
  2965. 0x410    leshort        0x138f        Minix filesystem, 30 char names
  2966. 0x410    leshort        0x2468        Minix filesystem, version 2
  2967. 0x410    leshort        0x2478        Minix filesystem, version 2, 30 char names
  2968.  
  2969. # romfs filesystems - Juan Cespedes <cespedes@debian.org>
  2970. 0    string        -rom1fs-\0    romfs filesystem, version 1
  2971. >8    belong    x            %d bytes,
  2972. >16    string    x            named %s.
  2973.  
  2974. # netboot image - Juan Cespedes <cespedes@debian.org>
  2975. 0    lelong        0x1b031336L    Netboot image,
  2976. >4    lelong&0xFFFFFF00    0
  2977. >>4    lelong&0x100    0x000        mode 2
  2978. >>4    lelong&0x100    0x100        mode 3
  2979. >4    lelong&0xFFFFFF00    !0    unknown mode
  2980.  
  2981. 0x18b    string    OS/2    OS/2 Boot Manager
  2982.  
  2983. 9564    lelong        0x00011954    Unix Fast File system (little-endian),
  2984. >8404    string        x        last mounted on %s,
  2985. #>9504    ledate        x        last checked at %s,
  2986. >8224    ledate        x        last written at %s,
  2987. >8401    byte        x        clean flag %d,
  2988. >8228    lelong        x        number of blocks %d,
  2989. >8232    lelong        x        number of data blocks %d,
  2990. >8236    lelong        x        number of cylinder groups %d,
  2991. >8240    lelong        x        block size %d,
  2992. >8244    lelong        x        fragment size %d,
  2993. >8252    lelong        x        minimum percentage of free blocks %d,
  2994. >8256    lelong        x        rotational delay %dms,
  2995. >8260    lelong        x        disk rotational speed %drps,
  2996. >8320    lelong        0        TIME optimization
  2997. >8320    lelong        1        SPACE optimization
  2998.  
  2999. 9564    belong        0x00011954    Unix Fast File system (big-endian),
  3000. >7168   long        0x4c41424c    Apple UFS Volume
  3001. >>7186  string        x        named %s,
  3002. >>7176  belong        x        volume label version %d,
  3003. >>7180  bedate        x        created on %s,
  3004. >8404    string        x        last mounted on %s,
  3005. #>9504    bedate        x        last checked at %s,
  3006. >8224    bedate        x        last written at %s,
  3007. >8401    byte        x        clean flag %d,
  3008. >8228    belong        x        number of blocks %d,
  3009. >8232    belong        x        number of data blocks %d,
  3010. >8236    belong        x        number of cylinder groups %d,
  3011. >8240    belong        x        block size %d,
  3012. >8244    belong        x        fragment size %d,
  3013. >8252    belong        x        minimum percentage of free blocks %d,
  3014. >8256    belong        x        rotational delay %dms,
  3015. >8260    belong        x        disk rotational speed %drps,
  3016. >8320    belong        0        TIME optimization
  3017. >8320    belong        1        SPACE optimization
  3018.  
  3019. # ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
  3020. 0x438    leshort        0xEF53        Linux
  3021. >0x44c    lelong        x        rev %d
  3022. >0x43e    leshort        x        \b.%d
  3023. >0x45c    lelong        ^0x0000004    ext2 filesystem data
  3024. >>0x43a    leshort        ^0x0000001    (mounted or unclean)
  3025. >0x45c    lelong        &0x0000004    ext3 filesystem data
  3026. >>0x460    lelong        &0x0000004    (needs journal recovery)
  3027. >0x43a    leshort        &0x0000002    (errors)
  3028. >0x460    lelong        &0x0000001    (compressed)
  3029. #>0x460    lelong        &0x0000002    (filetype)
  3030. #>0x464    lelong        &0x0000001    (sparse_super)
  3031. >0x464    lelong        &0x0000002    (large files)
  3032.  
  3033. # SGI disk labels - Nathan Scott <nathans@debian.org>
  3034. 0    belong        0x0BE5A941    SGI disk label (volume header)
  3035.  
  3036. # SGI XFS filesystem - Nathan Scott <nathans@debian.org>
  3037. 0    belong        0x58465342    SGI XFS filesystem data
  3038. >0x4    belong        x        (blksz %d,
  3039. >0x68    beshort        x        inosz %d,
  3040. >0x64    beshort        ^0x2004        v1 dirs)
  3041. >0x64    beshort        &0x2004        v2 dirs)
  3042.  
  3043. ############################################################################
  3044. # Minix-ST kernel floppy
  3045. 0x800    belong        0x46fc2700    Atari-ST Minix kernel image
  3046. >19    string        \240\5\371\5\0\011\0\2\0    \b, 720k floppy
  3047. >19    string        \320\2\370\5\0\011\0\1\0    \b, 360k floppy
  3048.  
  3049. ############################################################################
  3050. # Hmmm, is this a better way of detecting _standard_ floppy images ?
  3051. 19    string        \320\2\360\3\0\011\0\1\0    DOS floppy 360k
  3052. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  3053. 19    string        \240\5\371\3\0\011\0\2\0    DOS floppy 720k
  3054. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  3055. 19    string        \100\013\360\011\0\022\0\2\0    DOS floppy 1440k
  3056. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  3057.  
  3058. 19    string        \240\5\371\5\0\011\0\2\0    DOS floppy 720k, IBM
  3059. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  3060. 19    string        \100\013\371\5\0\011\0\2\0    DOS floppy 1440k, mkdosfs
  3061. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  3062.  
  3063. 19    string        \320\2\370\5\0\011\0\1\0    Atari-ST floppy 360k
  3064. 19    string        \240\5\371\5\0\011\0\2\0    Atari-ST floppy 720k
  3065.  
  3066. #  Valid media descriptor bytes for MS-DOS:
  3067. #
  3068. #     Byte   Capacity   Media Size and Type
  3069. #     -------------------------------------------------
  3070. #
  3071. #     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
  3072. #     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
  3073. #     F9     720K       3.5-inch, 2-sided, 9-sector
  3074. #     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
  3075. #     FD     360K       5.25-inch, 2-sided, 9-sector
  3076. #     FF     320K       5.25-inch, 2-sided, 8-sector
  3077. #     FC     180K       5.25-inch, 1-sided, 9-sector
  3078. #     FE     160K       5.25-inch, 1-sided, 8-sector
  3079. #     FE     250K       8-inch, 1-sided, single-density
  3080. #     FD     500K       8-inch, 2-sided, single-density
  3081. #     FE     1.2 MB     8-inch, 2-sided, double-density
  3082. #     F8     -----      Fixed disk 
  3083. #
  3084. #     FC     xxxK       Apricot 70x1x9 boot disk.
  3085. #
  3086. # Originally a bitmap:
  3087. #  xxxxxxx0    Not two sided
  3088. #  xxxxxxx1    Double sided
  3089. #  xxxxxx0x    Not 8 SPT
  3090. #  xxxxxx1x    8 SPT
  3091. #  xxxxx0xx    Not Removable drive
  3092. #  xxxxx1xx    Removable drive
  3093. #  11111xxx    Must be one.
  3094. #
  3095. # But now it's rather random:
  3096. #  111111xx    Low density disk
  3097. #        00    SS, Not 8 SPT
  3098. #        01    DS, Not 8 SPT
  3099. #        10    SS, 8 SPT
  3100. #        11    DS, 8 SPT
  3101. #
  3102. #  11111001    Double density 3╜ floppy disk, high density 5╝
  3103. #  11110000    High density 3╜ floppy disk
  3104. #  11111000    Hard disk any format
  3105. #
  3106.  
  3107. # CDROM Filesystems
  3108. 32769    string    CD001     ISO 9660 CD-ROM filesystem data
  3109. # "application id" which appears to be used as a volume label
  3110. >32808     string    >\0       '%s'
  3111. >34816     string    \000CD001\001EL\ TORITO\ SPECIFICATION    (bootable)
  3112. 37633    string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
  3113. 32776    string    CDROM     High Sierra CD-ROM filesystem data
  3114.  
  3115. # cramfs filesystem - russell@coker.com.au
  3116. 0       lelong    0x28cd3d45      Linux Compressed ROM File System data, little endian
  3117. >4      lelong  x size %d
  3118. >8      lelong  &1 version #2
  3119. >8      lelong  &2 sorted_dirs
  3120. >8      lelong  &4 hole_support
  3121. >32     lelong  x CRC 0x%x,
  3122. >36     lelong  x edition %d,
  3123. >40     lelong  x %d blocks,
  3124. >44     lelong  x %d files
  3125.  
  3126. 0       belong    0x28cd3d45      Linux Compressed ROM File System data, big endian
  3127. >4      belong  x size %d
  3128. >8      belong  &1 version #2
  3129. >8      belong  &2 sorted_dirs
  3130. >8      belong  &4 hole_support
  3131. >32     belong  x CRC 0x%x,
  3132. >36     belong  x edition %d,
  3133. >40     belong  x %d blocks,
  3134. >44     belong  x %d files
  3135.  
  3136. # reiserfs - russell@coker.com.au
  3137. 0x10034        string    ReIsErFs    ReiserFS V3.5
  3138. 0x10034        string    ReIsEr2Fs    ReiserFS V3.6
  3139. >0x1002c     leshort    x        block size %d
  3140. >0x10032    leshort    &2        (mounted or unclean)
  3141. >0x10000    lelong    x        num blocks %d
  3142. >0x10040    lelong    1        tea hash
  3143. >0x10040    lelong    2        yura hash
  3144. >0x10040    lelong    3        r5 hash
  3145.  
  3146. # JFFS - russell@coker.com.au
  3147. 0    lelong    0x34383931    Linux Journalled Flash File system, little endian
  3148. 0    belong    0x34383931    Linux Journalled Flash File system, big endian
  3149.  
  3150. # EST flat binary format (which isn't, but anyway)
  3151. # From: Mark Brown <broonie@sirena.org.uk>
  3152. 0    string    ESTFBINR    EST flat binary
  3153.  
  3154. # Aculab VoIP firmware
  3155. # From: Mark Brown <broonie@sirena.org.uk>
  3156. 0    string    VoIP\ Startup\ and    Aculab VoIP firmware
  3157. >35    string    x    format %s
  3158.  
  3159. # PPCBoot image file
  3160. # From: Mark Brown <broonie@sirena.org.uk>
  3161. 0    belong    0x27051956    PPCBoot image
  3162. >4    string  PPCBoot
  3163. >>12    string  x        version %s
  3164.  
  3165.  
  3166. #------------------------------------------------------------------------------
  3167. # flash:    file(1) magic for Macromedia Flash file format
  3168. #
  3169. # See
  3170. #
  3171. #    http://www.macromedia.com/software/flash/open/
  3172. #
  3173. 0    string        FWS        Macromedia Flash data,
  3174. >3    byte        x        version %d
  3175. 0    string        CWS        Macromedia Flash data (compressed),
  3176. >3    byte        x        version %d
  3177. #
  3178. # From Dave Wilson
  3179. 0    string AGD4\xbe\xb8\xbb\xcb\x00    Macromedia Freehand 9 Document
  3180.  
  3181. #------------------------------------------------------------------------------
  3182. # fonts:  file(1) magic for font data
  3183. #
  3184. 0    string        FONT        ASCII vfont text
  3185. 0    short        0436        Berkeley vfont data
  3186. 0    short        017001        byte-swapped Berkeley vfont data
  3187.  
  3188. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  3189. 0    string        %!PS-AdobeFont-1.    PostScript Type 1 font text
  3190. >20    string        >\0            (%s)
  3191. 6    string        %!PS-AdobeFont-1.    PostScript Type 1 font program data
  3192.  
  3193. # X11 font files in SNF (Server Natural Format) format
  3194. 0    belong        00000004        X11 SNF font data, MSB first
  3195. 0    lelong        00000004        X11 SNF font data, LSB first
  3196.  
  3197. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  3198. 0    string        STARTFONT\040        X11 BDF font text
  3199.  
  3200. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  3201. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  3202. 0    string        \001fcp            X11 Portable Compiled Font data
  3203. >12    byte        0x02            \b, LSB first
  3204. >12    byte        0x0a            \b, MSB first
  3205. 0    string        D1.0\015        X11 Speedo font data
  3206.  
  3207. #------------------------------------------------------------------------------
  3208. # FIGlet fonts and controlfiles
  3209. # From figmagic supplied with Figlet version 2.2
  3210. # "David E. O'Brien" <obrien@FreeBSD.ORG>
  3211. 0    string        flf        FIGlet font
  3212. >3    string        >2a        version %-2.2s
  3213. 0    string        flc        FIGlet controlfile
  3214. >3    string        >2a        version %-2.2s
  3215.  
  3216. # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  3217. # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
  3218. 0    belong        0x14025919    libGrx font data,
  3219. >8    leshort        x        %dx
  3220. >10    leshort        x        \b%d
  3221. >40    string        x        %s
  3222. # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  3223. 0    belong        0xff464f4e    DOS code page font data collection
  3224. 7    belong        0x00454741    DOS code page font data
  3225. 7    belong        0x00564944    DOS code page font data (from Linux?)
  3226. 4098    string        DOSFONT        DOSFONT2 encrypted font data
  3227.  
  3228. # downloadable fonts for browser (prints type) anthon@mnt.org
  3229. 0    string        PFR1        PFR1 font
  3230. >102    string        >0        \b: %s
  3231.  
  3232. # True Type fonts
  3233. 0    string    \000\001\000\000\000    TrueType font data
  3234.  
  3235. 0    string        \007\001\001\000Copyright\ (c)\ 199    Adobe Multiple Master font
  3236. 0    string        \012\001\001\000Copyright\ (c)\ 199    Adobe Multiple Master font
  3237.  
  3238. # Opentype font data from Avi Bercovich
  3239. 0    string        OTTO        OpenType font data 
  3240.  
  3241.  
  3242. #------------------------------------------------------------------------------
  3243. # frame:  file(1) magic for FrameMaker files
  3244. #
  3245. # This stuff came on a FrameMaker demo tape, most of which is
  3246. # copyright, but this file is "published" as witness the following:
  3247. #
  3248. 0    string        \<MakerFile    FrameMaker document
  3249. >11    string        5.5         (5.5
  3250. >11    string        5.0         (5.0
  3251. >11    string        4.0         (4.0
  3252. >11    string        3.0         (3.0
  3253. >11    string        2.0         (2.0
  3254. >11    string        1.0         (1.0
  3255. >14    byte        x          %c)
  3256. 0    string        \<MIFFile    FrameMaker MIF (ASCII) file
  3257. >9    string        4.0         (4.0)
  3258. >9    string        3.0         (3.0)
  3259. >9    string        2.0         (2.0)
  3260. >9    string        1.0         (1.x)
  3261. 0    string        \<MakerDictionary    FrameMaker Dictionary text
  3262. >17    string        3.0         (3.0)
  3263. >17    string        2.0         (2.0)
  3264. >17    string        1.0         (1.x)
  3265. 0    string        \<MakerScreenFont    FrameMaker Font file
  3266. >17    string        1.01         (%s)
  3267. 0    string        \<MML        FrameMaker MML file
  3268. 0    string        \<BookFile    FrameMaker Book file
  3269. >10    string        3.0         (3.0
  3270. >10    string        2.0         (2.0
  3271. >10    string        1.0         (1.0
  3272. >13    byte        x          %c)
  3273. # XXX - this book entry should be verified, if you find one, uncomment this
  3274. #0    string        \<Book\     FrameMaker Book (ASCII) file
  3275. #>6    string        3.0         (3.0)
  3276. #>6    string        2.0         (2.0)
  3277. #>6    string        1.0         (1.0)
  3278. 0    string        \<Maker    Intermediate Print File    FrameMaker IPL file
  3279.  
  3280. #------------------------------------------------------------------------------
  3281. # freebsd:  file(1) magic for FreeBSD objects
  3282. #
  3283. # All new-style FreeBSD magic numbers are in host byte order (i.e.,
  3284. # little-endian on x86).
  3285. #
  3286. # XXX - this comes from the file "freebsd" in a recent FreeBSD version of
  3287. # "file"; it, and the NetBSD stuff in "netbsd", appear to use different
  3288. # schemes for distinguishing between executable images, shared libraries,
  3289. # and object files.
  3290. #
  3291. # FreeBSD says:
  3292. #
  3293. #    Regardless of whether it's pure, demand-paged, or none of the
  3294. #    above:
  3295. #
  3296. #    if the entry point is < 4096, then it's a shared library if
  3297. #    the "has run-time loader information" bit is set, and is
  3298. #    position-independent if the "is position-independent" bit
  3299. #    is set;
  3300. #
  3301. #    if the entry point is >= 4096 (or >4095, same thing), then it's
  3302. #    an executable, and is dynamically-linked if the "has run-time
  3303. #    loader information" bit is set.
  3304. #
  3305. # On x86, NetBSD says:
  3306. #
  3307. #    If it's neither pure nor demand-paged:
  3308. #
  3309. #    if it has the "has run-time loader information" bit set, it's
  3310. #    a dynamically-linked executable;
  3311. #
  3312. #    if it doesn't have that bit set, then:
  3313. #
  3314. #        if it has the "is position-independent" bit set, it's
  3315. #        position-independent;
  3316. #
  3317. #        if the entry point is non-zero, it's an executable, otherwise
  3318. #        it's an object file.
  3319. #
  3320. #    If it's pure:
  3321. #
  3322. #    if it has the "has run-time loader information" bit set, it's
  3323. #    a dynamically-linked executable, otherwise it's just an
  3324. #    executable.
  3325. #
  3326. #    If it's demand-paged:
  3327. #
  3328. #    if it has the "has run-time loader information" bit set,
  3329. #    then:
  3330. #
  3331. #        if the entry point is < 4096, it's a shared library;
  3332. #
  3333. #        if the entry point is = 4096 or > 4096 (i.e., >= 4096),
  3334. #        it's a dynamically-linked executable);
  3335. #
  3336. #    if it doesn't have the "has run-time loader information" bit
  3337. #    set, then it's just an executable.
  3338. #
  3339. # (On non-x86, NetBSD does much the same thing, except that it uses
  3340. # 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
  3341. # pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
  3342. # had 8K pages; dunno about MIPS.)
  3343. #
  3344. # I suspect the two will differ only in perverse and uninteresting cases
  3345. # ("shared" libraries that aren't demand-paged and whose pages probably
  3346. # won't actually be shared, executables with entry points <4096).
  3347. #
  3348. # I leave it to those more familiar with FreeBSD and NetBSD to figure out
  3349. # what the right answer is (although using ">4095", FreeBSD-style, is
  3350. # probably better than separately checking for "=4096" and ">4096",
  3351. # NetBSD-style).  (The old "netbsd" file analyzed FreeBSD demand paged
  3352. # executables using the NetBSD technique.)
  3353. #
  3354. 0    lelong&0377777777    041400407    FreeBSD/i386
  3355. >20    lelong            <4096
  3356. >>3    byte&0xC0        &0x80        shared library
  3357. >>3    byte&0xC0        0x40        PIC object
  3358. >>3    byte&0xC0        0x00        object
  3359. >20    lelong            >4095
  3360. >>3    byte&0x80        0x80        dynamically linked executable
  3361. >>3    byte&0x80        0x00        executable
  3362. >16    lelong            >0        not stripped
  3363.  
  3364. 0    lelong&0377777777    041400410    FreeBSD/i386 pure
  3365. >20    lelong            <4096
  3366. >>3    byte&0xC0        &0x80        shared library
  3367. >>3    byte&0xC0        0x40        PIC object
  3368. >>3    byte&0xC0        0x00        object
  3369. >20    lelong            >4095
  3370. >>3    byte&0x80        0x80        dynamically linked executable
  3371. >>3    byte&0x80        0x00        executable
  3372. >16    lelong            >0        not stripped
  3373.  
  3374. 0    lelong&0377777777    041400413    FreeBSD/i386 demand paged
  3375. >20    lelong            <4096
  3376. >>3    byte&0xC0        &0x80        shared library
  3377. >>3    byte&0xC0        0x40        PIC object
  3378. >>3    byte&0xC0        0x00        object
  3379. >20    lelong            >4095
  3380. >>3    byte&0x80        0x80        dynamically linked executable
  3381. >>3    byte&0x80        0x00        executable
  3382. >16    lelong            >0        not stripped
  3383.  
  3384. 0    lelong&0377777777    041400314    FreeBSD/i386 compact demand paged
  3385. >20    lelong            <4096
  3386. >>3    byte&0xC0        &0x80        shared library
  3387. >>3    byte&0xC0        0x40        PIC object
  3388. >>3    byte&0xC0        0x00        object
  3389. >20    lelong            >4095
  3390. >>3    byte&0x80        0x80        dynamically linked executable
  3391. >>3    byte&0x80        0x00        executable
  3392. >16    lelong            >0        not stripped
  3393.  
  3394. # XXX gross hack to identify core files
  3395. # cores start with a struct tss; we take advantage of the following:
  3396. # byte 7:     highest byte of the kernel stack pointer, always 0xfe
  3397. #      8/9:   kernel (ring 0) ss value, always 0x0010
  3398. #      10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
  3399. #      28:    low order byte of the current PTD entry, always 0 since the
  3400. #             PTD is page-aligned
  3401. #
  3402. 7    string    \357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0    FreeBSD/i386 a.out core file
  3403. >1039    string    >\0    from '%s'
  3404.  
  3405. # /var/run/ld.so.hints
  3406. # What are you laughing about?
  3407. 0    lelong            011421044151    ld.so hints file (Little Endian
  3408. >4    lelong            >0        \b, version %d)
  3409. >4    belong            <=0        \b)
  3410. 0    belong            011421044151    ld.so hints file (Big Endian
  3411. >4    belong            >0        \b, version %d)
  3412. >4    belong            <=0        \b)
  3413.  
  3414. #
  3415. # Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
  3416. #
  3417. 0    string    SCRSHOT_    scrshot(1) screenshot,
  3418. >8    byte    x        version %d,
  3419. >9    byte    2        %d bytes in header,
  3420. >>10    byte    x        %d chars wide by
  3421. >>11    byte    x        %d chars high
  3422.  
  3423. #------------------------------------------------------------------------------
  3424. # fsav:  file(1) magic for datafellows fsav virus definition files
  3425. # Anthon van der Neut (anthon@mnt.org)
  3426. 0    beshort        0x1575        fsav (linux) macro virus
  3427. >8    leshort        >0        (%d-
  3428. >11    byte        >0        \b%02d-
  3429. >10    byte        >0        \b%02d)
  3430.  
  3431. # comment this out for now because it regognizes every file where
  3432. # the eighth character is \n
  3433. #8    byte        0x0a
  3434. #>12    byte        0x07
  3435. #>11    leshort        >0        fsav (linux) virus (%d-
  3436. #>10    byte        0        \b01-
  3437. #>10    byte        1        \b02-
  3438. #>10    byte        2        \b03-
  3439. #>10    byte        3        \b04-
  3440. #>10    byte        4        \b05-
  3441. #>10    byte        5        \b06-
  3442. #>10    byte        6        \b07-
  3443. #>10    byte        7        \b08-
  3444. #>10    byte        8        \b08-
  3445. #>10    byte        9        \b10-
  3446. #>10    byte        10        \b11-
  3447. #>10    byte        11        \b12-
  3448. #>9    byte        >0        \b%02d)
  3449. #------------------------------------------------------------------------------
  3450. # games:  file(1) for games
  3451.  
  3452. # Thomas M. Ott (ThMO)
  3453. 1    string    =WAD        DOOM data,
  3454. >0    string    =I        main wad
  3455. >0    string    =P        patch wad
  3456. >0    byte    x        unknown junk
  3457.  
  3458. # Fabio Bonelli <fabiobonelli@libero.it>
  3459. # Quake II - III data files
  3460. 0       string  IDP2            Quake II 3D Model file,
  3461. >20     long    x               %lu skin(s),
  3462. >8      long    x               (%lu x
  3463. >12     long    x         %lu),
  3464. >40     long    x               %lu frame(s),
  3465. >16     long    x               Frame size %lu bytes,
  3466. >24     long      x               %lu vertices/frame,
  3467. >28     long    x                %lu texture coordinates,
  3468. >32     long    x               %lu triangles/frame
  3469.  
  3470. 0       string  IBSP            Quake
  3471. >4      long    0x26            II Map file (BSP)
  3472. >4      long    0x2E          III Map file (BSP)
  3473.  
  3474. 0       string  IDS2            Quake II SP2 sprite file
  3475.  
  3476. #------------------------------------------------------------------------------
  3477. # gcc:  file(1) magic for GCC special files
  3478. #
  3479. 0    string        gpch        GCC precompiled header
  3480.  
  3481. # The version field is annoying.  It's 3 characters, not zero-terminated.
  3482. >5    byte        x            (version %c
  3483. >6    byte        x            \b%c
  3484. >7    byte        x            \b%c)
  3485.  
  3486. # 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
  3487. >4    byte        67            for C
  3488. >4    byte        111            for Objective C
  3489. >4    byte        43            for C++
  3490. >4    byte        79            for Objective C++
  3491. #------------------------------------------------------------------------------
  3492. # GIMP Gradient: file(1) magic for the GIMP's gradient data files
  3493. # by Federico Mena <federico@nuclecu.unam.mx>
  3494.  
  3495. 0       string          GIMP\ Gradient  GIMP gradient data
  3496.  
  3497. #------------------------------------------------------------------------------
  3498. # XCF:  file(1) magic for the XCF image format used in the GIMP developed
  3499. #       by Spencer Kimball and Peter Mattis
  3500. #       ('Bucky' LaDieu, nega@vt.edu)
  3501.  
  3502. 0    string        gimp\ xcf    GIMP XCF image data,
  3503. >9    string        file        version 0,
  3504. >9    string        v        version
  3505. >>10    string        >\0        %s,
  3506. >14    belong        x        %lu x
  3507. >18    belong        x        %lu,
  3508. >22     belong          0               RGB Color
  3509. >22     belong          1               Greyscale
  3510. >22     belong          2               Indexed Color
  3511. >22    belong        >2        Unknown Image Type.
  3512.  
  3513. #------------------------------------------------------------------------------
  3514. # XCF:  file(1) magic for the patterns used in the GIMP, developed
  3515. #       by Spencer Kimball and Peter Mattis
  3516. #       ('Bucky' LaDieu, nega@vt.edu)
  3517.  
  3518. 20      string          GPAT            GIMP pattern data,
  3519. >24     string          x               %s
  3520.  
  3521. #------------------------------------------------------------------------------
  3522. # XCF:  file(1) magic for the brushes used in the GIMP, developed
  3523. #       by Spencer Kimball and Peter Mattis
  3524. #       ('Bucky' LaDieu, nega@vt.edu)
  3525.  
  3526. 20      string          GIMP            GIMP brush data
  3527. #
  3528. # GNU nlsutils message catalog file format
  3529. #
  3530. 0    string        \336\22\4\225    GNU message catalog (little endian),
  3531. >4    lelong        x        revision %d,
  3532. >8    lelong        x        %d messages
  3533. 0    string        \225\4\22\336    GNU message catalog (big endian),
  3534. >4    belong        x        revision %d,
  3535. >8    belong        x        %d messages
  3536. # message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
  3537. 0    string        *nazgul*    Nazgul style compiled message catalog
  3538. >8    lelong        >0        \b, version %ld
  3539.  
  3540. #------------------------------------------------------------------------------
  3541. # ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  3542. #
  3543. # ACE/gr binary
  3544. 0    string    \000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003        old ACE/gr binary file
  3545. >39    byte    >0            - version %c
  3546. # ACE/gr ascii
  3547. 0    string    #\ xvgr\ parameter\ file    ACE/gr ascii file
  3548. 0    string    #\ xmgr\ parameter\ file    ACE/gr ascii file
  3549. 0    string    #\ ACE/gr\ parameter\ file    ACE/gr ascii file
  3550. # Grace projects
  3551. 0    string    #\ Grace\ project\ file        Grace project file
  3552. >23    string    @version\              (version
  3553. >>32    byte    >0                 %c
  3554. >>33    string    >\0                 \b.%.2s
  3555. >>35    string    >\0                 \b.%.2s)
  3556. # ACE/gr fit description files
  3557. 0    string    #\ ACE/gr\ fit\ description\     ACE/gr fit description file
  3558. # end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  3559.  
  3560. #------------------------------------------------------------------------------
  3561. # gringotts:  file(1) magic for Gringotts
  3562. # http://devel.pluto.linux.it/projects/Gringotts/
  3563. # author: Germano Rizzo <mano@pluto.linux.it>
  3564. #GRG3????Y
  3565. 0    string    GRG        Gringotts data file
  3566. #file format 1
  3567. >3    string        1        v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
  3568. #file format 2
  3569. >3    string        2        v.2, MCRYPT S2K, 
  3570. >>8    byte&0x70    0x00        RIJNDAEL-128 crypt,
  3571. >>8    byte&0x70    0x10        SERPENT crypt,
  3572. >>8    byte&0x70    0x20        TWOFISH crypt, 
  3573. >>8    byte&0x70    0x30        CAST-256 crypt,
  3574. >>8    byte&0x70    0x40        SAFER+ crypt,
  3575. >>8    byte&0x70    0x50        LOKI97 crypt,
  3576. >>8    byte&0x70    0x60        3DES crypt,
  3577. >>8    byte&0x70    0x70        RIJNDAEL-256 crypt,
  3578. >>8    byte&0x08    0x00        SHA1 hash,
  3579. >>8    byte&0x08    0x08        RIPEMD-160 hash,
  3580. >>8    byte&0x04    0x00        ZLib
  3581. >>8    byte&0x04    0x04        BZip2
  3582. >>8    byte&0x03    0x00        lvl.0
  3583. >>8    byte&0x03    0x01        lvl.3
  3584. >>8    byte&0x03    0x02        lvl.6
  3585. >>8    byte&0x03    0x03        lvl.9
  3586. #file format 3
  3587. >3    string        3        v.3, OpenPGP S2K, 
  3588. >>8    byte&0x70    0x00        RIJNDAEL-128 crypt,
  3589. >>8    byte&0x70    0x10        SERPENT crypt,
  3590. >>8    byte&0x70    0x20        TWOFISH crypt, 
  3591. >>8    byte&0x70    0x30        CAST-256 crypt,
  3592. >>8    byte&0x70    0x40        SAFER+ crypt,
  3593. >>8    byte&0x70    0x50        LOKI97 crypt,
  3594. >>8    byte&0x70    0x60        3DES crypt,
  3595. >>8    byte&0x70    0x70        RIJNDAEL-256 crypt,
  3596. >>8    byte&0x08    0x00        SHA1 hash,
  3597. >>8    byte&0x08    0x08        RIPEMD-160 hash,
  3598. >>8    byte&0x04    0x00        ZLib
  3599. >>8    byte&0x04    0x04        BZip2
  3600. >>8    byte&0x03    0x00        lvl.0
  3601. >>8    byte&0x03    0x01        lvl.3
  3602. >>8    byte&0x03    0x02        lvl.6
  3603. >>8    byte&0x03    0x03        lvl.9
  3604. #file format >3
  3605. >3    string        >3        v.%.1s (unknown details)
  3606.  
  3607. #------------------------------------------------------------------------------
  3608. # Hierarchical Data Format, used to facilitate scientific data exchange
  3609. # specifications at http://hdf.ncsa.uiuc.edu/
  3610.  
  3611. 0    belong        0x0e031301    Hierarchical Data Format (version 4) data
  3612. 0    string        \211HDF\r\n\032    Hierarchical Data Format (version 5) data
  3613.  
  3614. #------------------------------------------------------------------------------
  3615. # hitach-sh: file(1) magic for Hitachi Super-H
  3616. #
  3617. # Super-H COFF
  3618. #
  3619. 0    beshort        0x0500        Hitachi SH big-endian COFF
  3620. >18    beshort&0x0002    =0x0000        object
  3621. >18    beshort&0x0002    =0x0002        executable
  3622. >18    beshort&0x0008    =0x0008        \b, stripped
  3623. >18    beshort&0x0008    =0x0000        \b, not stripped
  3624. #
  3625. 0    leshort        0x0550        Hitachi SH little-endian COFF
  3626. >18    leshort&0x0002    =0x0000        object
  3627. >18    leshort&0x0002    =0x0002        executable
  3628. >18    leshort&0x0008    =0x0008        \b, stripped
  3629. >18    leshort&0x0008    =0x0000        \b, not stripped
  3630.  
  3631.  
  3632. #------------------------------------------------------------------------------
  3633. # hp:  file(1) magic for Hewlett Packard machines (see also "printer")
  3634. #
  3635. # XXX - somebody should figure out whether any byte order needs to be
  3636. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  3637. # big-endian as it was mostly 68K-based.
  3638. #
  3639. # I think the 500 series was the old stack-based machines, running a
  3640. # UNIX environment atop the "SUN kernel"; dunno whether it was
  3641. # big-endian or little-endian.
  3642. #
  3643. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  3644. # hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
  3645. # HP magic is useful for reference, but using "long" magic is a better
  3646. # practice in order to avoid collisions.
  3647. #
  3648. # Guy Harris (guy@netapp.com): some additions to this list came from
  3649. # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
  3650. # 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
  3651. # "/etc/magic", though, except for the "archive file relocatable library"
  3652. # stuff, and the 68030 and 68040 stuff isn't there at all - are they not
  3653. # used in executables, or have they just not yet updated "/etc/magic"
  3654. # completely?
  3655. #
  3656. # 0    beshort        200        hp200 (68010) BSD binary
  3657. # 0    beshort        300        hp300 (68020+68881) BSD binary
  3658. # 0    beshort        0x20c        hp200/300 HP-UX binary
  3659. # 0    beshort        0x20d        hp400 (68030) HP-UX binary
  3660. # 0    beshort        0x20e        hp400 (68040?) HP-UX binary
  3661. # 0    beshort        0x20b        PA-RISC1.0 HP-UX binary
  3662. # 0    beshort        0x210        PA-RISC1.1 HP-UX binary
  3663. # 0    beshort        0x211        PA-RISC1.2 HP-UX binary
  3664. # 0    beshort        0x214        PA-RISC2.0 HP-UX binary
  3665.  
  3666. #
  3667. # The "misc" stuff needs a byte order; the archives look suspiciously
  3668. # like the old 177545 archives (0xff65 = 0177545).
  3669. #
  3670. #### Old Apollo stuff
  3671. 0    beshort        0627        Apollo m68k COFF executable
  3672. >18    beshort        ^040000        not stripped
  3673. >22    beshort        >0        - version %ld
  3674. 0    beshort        0624        apollo a88k COFF executable
  3675. >18    beshort        ^040000        not stripped
  3676. >22    beshort        >0        - version %ld
  3677. 0       long            01203604016     TML 0123 byte-order format
  3678. 0       long            01702407010     TML 1032 byte-order format
  3679. 0       long            01003405017     TML 2301 byte-order format
  3680. 0       long            01602007412     TML 3210 byte-order format
  3681. #### PA-RISC 1.1
  3682. 0    belong         0x02100106    PA-RISC1.1 relocatable object
  3683. 0    belong         0x02100107    PA-RISC1.1 executable
  3684. >168    belong        &0x00000004    dynamically linked
  3685. >(144)    belong        0x054ef630    dynamically linked
  3686. >96    belong        >0        - not stripped
  3687.  
  3688. 0    belong         0x02100108    PA-RISC1.1 shared executable
  3689. >168    belong&0x4    0x4        dynamically linked
  3690. >(144)    belong        0x054ef630    dynamically linked
  3691. >96    belong        >0        - not stripped
  3692.  
  3693. 0    belong         0x0210010b    PA-RISC1.1 demand-load executable
  3694. >168    belong&0x4    0x4        dynamically linked
  3695. >(144)    belong        0x054ef630    dynamically linked
  3696. >96    belong        >0        - not stripped
  3697.  
  3698. 0    belong         0x0210010e    PA-RISC1.1 shared library
  3699. >96    belong        >0        - not stripped
  3700.  
  3701. 0    belong         0x0210010d    PA-RISC1.1 dynamic load library
  3702. >96    belong        >0        - not stripped
  3703.  
  3704. #### PA-RISC 2.0
  3705. 0    belong        0x02140106    PA-RISC2.0 relocatable object
  3706.  
  3707. 0       belong        0x02140107    PA-RISC2.0 executable
  3708. >168    belong        &0x00000004    dynamically linked
  3709. >(144)    belong        0x054ef630    dynamically linked
  3710. >96    belong        >0        - not stripped
  3711.  
  3712. 0       belong        0x02140108    PA-RISC2.0 shared executable
  3713. >168    belong        &0x00000004    dynamically linked
  3714. >(144)    belong        0x054ef630    dynamically linked
  3715. >96    belong        >0        - not stripped
  3716.  
  3717. 0       belong        0x0214010b    PA-RISC2.0 demand-load executable
  3718. >168    belong        &0x00000004    dynamically linked
  3719. >(144)    belong        0x054ef630    dynamically linked
  3720. >96    belong        >0        - not stripped
  3721.  
  3722. 0       belong        0x0214010e    PA-RISC2.0 shared library
  3723. >96    belong        >0        - not stripped
  3724.  
  3725. 0       belong        0x0214010d    PA-RISC2.0 dynamic load library
  3726. >96    belong        >0        - not stripped
  3727.  
  3728. #### 800
  3729. 0    belong         0x020b0106    PA-RISC1.0 relocatable object
  3730.  
  3731. 0    belong         0x020b0107    PA-RISC1.0 executable
  3732. >168    belong&0x4    0x4        dynamically linked
  3733. >(144)    belong        0x054ef630    dynamically linked
  3734. >96    belong        >0        - not stripped
  3735.  
  3736. 0    belong         0x020b0108    PA-RISC1.0 shared executable
  3737. >168    belong&0x4    0x4        dynamically linked
  3738. >(144)    belong        0x054ef630    dynamically linked
  3739. >96    belong        >0        - not stripped
  3740.  
  3741. 0    belong         0x020b010b    PA-RISC1.0 demand-load executable
  3742. >168    belong&0x4    0x4        dynamically linked
  3743. >(144)    belong        0x054ef630    dynamically linked
  3744. >96    belong        >0        - not stripped
  3745.  
  3746. 0    belong         0x020b010e    PA-RISC1.0 shared library
  3747. >96    belong        >0        - not stripped
  3748.  
  3749. 0    belong         0x020b010d    PA-RISC1.0 dynamic load library
  3750. >96    belong        >0        - not stripped
  3751.  
  3752. 0    belong        0x213c6172    archive file
  3753. >68    belong         0x020b0619    - PA-RISC1.0 relocatable library
  3754. >68    belong         0x02100619    - PA-RISC1.1 relocatable library
  3755. >68    belong         0x02110619    - PA-RISC1.2 relocatable library
  3756. >68    belong         0x02140619    - PA-RISC2.0 relocatable library
  3757.  
  3758. #### 500
  3759. 0    long        0x02080106    HP s500 relocatable executable
  3760. >16    long        >0        - version %ld
  3761.  
  3762. 0    long        0x02080107    HP s500 executable
  3763. >16    long        >0        - version %ld
  3764.  
  3765. 0    long        0x02080108    HP s500 pure executable
  3766. >16    long        >0        - version %ld
  3767.  
  3768. #### 200
  3769. 0    belong         0x020c0108    HP s200 pure executable
  3770. >4    beshort        >0        - version %ld
  3771. >8    belong        &0x80000000    save fp regs
  3772. >8    belong        &0x40000000    dynamically linked
  3773. >8    belong        &0x20000000    debuggable
  3774. >36    belong        >0        not stripped
  3775.  
  3776. 0    belong        0x020c0107    HP s200 executable
  3777. >4    beshort        >0        - version %ld
  3778. >8    belong        &0x80000000    save fp regs
  3779. >8    belong        &0x40000000    dynamically linked
  3780. >8    belong        &0x20000000    debuggable
  3781. >36    belong        >0        not stripped
  3782.  
  3783. 0    belong        0x020c010b    HP s200 demand-load executable
  3784. >4    beshort        >0        - version %ld
  3785. >8    belong        &0x80000000    save fp regs
  3786. >8    belong        &0x40000000    dynamically linked
  3787. >8    belong        &0x20000000    debuggable
  3788. >36    belong        >0        not stripped
  3789.  
  3790. 0    belong        0x020c0106    HP s200 relocatable executable
  3791. >4    beshort        >0        - version %ld
  3792. >6    beshort        >0        - highwater %d
  3793. >8    belong        &0x80000000    save fp regs
  3794. >8    belong        &0x20000000    debuggable
  3795. >8    belong        &0x10000000    PIC
  3796.  
  3797. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  3798. >4    beshort        >0        - version %ld
  3799. >36    belong        >0        not stripped
  3800.  
  3801. 0    belong        0x020a0107    HP s200 (2.x release) executable
  3802. >4    beshort        >0        - version %ld
  3803. >36    belong        >0        not stripped
  3804.  
  3805. 0    belong        0x020c010e    HP s200 shared library
  3806. >4    beshort        >0        - version %ld
  3807. >6    beshort        >0        - highwater %d
  3808. >36    belong        >0        not stripped
  3809.  
  3810. 0    belong        0x020c010d    HP s200 dynamic load library
  3811. >4    beshort        >0        - version %ld
  3812. >6    beshort        >0        - highwater %d
  3813. >36    belong        >0        not stripped
  3814.  
  3815. #### MISC
  3816. 0    long        0x0000ff65    HP old archive
  3817. 0    long        0x020aff65    HP s200 old archive
  3818. 0    long        0x020cff65    HP s200 old archive
  3819. 0    long        0x0208ff65    HP s500 old archive
  3820.  
  3821. 0    long        0x015821a6    HP core file
  3822.  
  3823. 0    long        0x4da7eee8    HP-WINDOWS font
  3824. >8    byte        >0        - version %ld
  3825. 0    string        Bitmapfile    HP Bitmapfile
  3826.  
  3827. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  3828. # XXX - see "lif"
  3829. #0    short        0x8000        lif file
  3830. 0    long        0x020c010c    compiled Lisp
  3831.  
  3832. 0    string        msgcat01    HP NLS message catalog,
  3833. >8    long        >0        %d messages
  3834.  
  3835. # addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
  3836. 0    string        HPHP48-        HP48 binary
  3837. >7    byte        >0        - Rev %c
  3838. >8    beshort        0x1129        (ADR)
  3839. >8    beshort        0x3329        (REAL)
  3840. >8    beshort        0x5529        (LREAL)
  3841. >8    beshort        0x7729        (COMPLX)
  3842. >8    beshort        0x9d29        (LCOMPLX)
  3843. >8    beshort        0xbf29        (CHAR)
  3844. >8    beshort        0xe829        (ARRAY)
  3845. >8    beshort        0x0a2a        (LNKARRAY)
  3846. >8    beshort        0x2c2a        (STRING)
  3847. >8    beshort        0x4e2a        (HXS)
  3848. >8    beshort        0x742a        (LIST)
  3849. >8    beshort        0x962a        (DIR)
  3850. >8    beshort        0xb82a        (ALG)
  3851. >8    beshort        0xda2a        (UNIT)
  3852. >8    beshort        0xfc2a        (TAGGED)
  3853. >8    beshort        0x1e2b        (GROB)
  3854. >8    beshort        0x402b        (LIB)
  3855. >8    beshort        0x622b        (BACKUP)
  3856. >8    beshort        0x882b        (LIBDATA)
  3857. >8    beshort        0x9d2d        (PROG)
  3858. >8    beshort        0xcc2d        (CODE)
  3859. >8    beshort        0x482e        (GNAME)
  3860. >8    beshort        0x6d2e        (LNAME)
  3861. >8    beshort        0x922e        (XLIB)
  3862. 0    string        %%HP:        HP48 text
  3863. >6    string        T(0)        - T(0)
  3864. >6    string        T(1)        - T(1)
  3865. >6    string        T(2)        - T(2)
  3866. >6    string        T(3)        - T(3)
  3867. >10    string        A(D)        A(D)
  3868. >10    string        A(R)        A(R)
  3869. >10    string        A(G)        A(G)
  3870. >14    string        F(.)        F(.);
  3871. >14    string        F(,)        F(,);
  3872.  
  3873. # hpBSD magic numbers
  3874. 0    beshort        200        hp200 (68010) BSD
  3875. >2    beshort        0407        impure binary
  3876. >2    beshort        0410        read-only binary
  3877. >2    beshort        0413        demand paged binary
  3878. 0    beshort        300        hp300 (68020+68881) BSD
  3879. >2    beshort        0407        impure binary
  3880. >2    beshort        0410        read-only binary
  3881. >2    beshort        0413        demand paged binary
  3882. #
  3883. # From David Gero <dgero@nortelnetworks.com>
  3884. # HP-UX 10.20 core file format from /usr/include/sys/core.h
  3885. # Unfortunately, HP-UX uses corehead blocks without specifying the order
  3886. # There are four we care about:
  3887. #     CORE_KERNEL, which starts with the string "HP-UX"
  3888. #     CORE_EXEC, which contains the name of the command
  3889. #     CORE_PROC, which contains the signal number that caused the core dump
  3890. #     CORE_FORMAT, which contains the version of the core file format (== 1)
  3891. # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
  3892. # but we include all 6 variations of the order of the first 3, and
  3893. # assume that PROC will always be last
  3894. # Order 1: KERNEL, EXEC, FORMAT, PROC
  3895. 0x10        string    HP-UX
  3896. >0        belong    2
  3897. >>0xC        belong    0x3C
  3898. >>>0x4C        belong    0x100
  3899. >>>>0x58    belong    0x44
  3900. >>>>>0xA0    belong    1
  3901. >>>>>>0xAC    belong    4
  3902. >>>>>>>0xB0    belong    1
  3903. >>>>>>>>0xB4    belong    4        core file
  3904. >>>>>>>>>0x90    string    >\0        from '%s'
  3905. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3906. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3907. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3908. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3909. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3910. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3911. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3912. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3913. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3914. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3915. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3916. # Order 2: KERNEL, FORMAT, EXEC, PROC
  3917. >>>0x4C        belong    1
  3918. >>>>0x58    belong    4
  3919. >>>>>0x5C    belong    1
  3920. >>>>>>0x60    belong    0x100
  3921. >>>>>>>0x6C    belong    0x44
  3922. >>>>>>>>0xB4    belong    4        core file
  3923. >>>>>>>>>0xA4    string    >\0        from '%s'
  3924. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3925. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3926. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3927. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3928. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3929. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3930. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3931. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3932. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3933. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3934. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3935. # Order 3: FORMAT, KERNEL, EXEC, PROC
  3936. 0x24        string    HP-UX
  3937. >0        belong    1
  3938. >>0xC        belong    4
  3939. >>>0x10        belong    1
  3940. >>>>0x14    belong    2
  3941. >>>>>0x20    belong    0x3C
  3942. >>>>>>0x60    belong    0x100
  3943. >>>>>>>0x6C    belong    0x44
  3944. >>>>>>>>0xB4    belong    4        core file
  3945. >>>>>>>>>0xA4    string    >\0        from '%s'
  3946. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3947. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3948. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3949. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3950. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3951. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3952. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3953. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3954. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3955. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3956. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3957. # Order 4: EXEC, KERNEL, FORMAT, PROC
  3958. 0x64        string    HP-UX
  3959. >0        belong    0x100
  3960. >>0xC        belong    0x44
  3961. >>>0x54        belong    2
  3962. >>>>0x60    belong    0x3C
  3963. >>>>>0xA0    belong    1
  3964. >>>>>>0xAC    belong    4
  3965. >>>>>>>0xB0    belong    1
  3966. >>>>>>>>0xB4    belong    4        core file
  3967. >>>>>>>>>0x44    string    >\0        from '%s'
  3968. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3969. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3970. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3971. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3972. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3973. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3974. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3975. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3976. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3977. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3978. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3979. # Order 5: FORMAT, EXEC, KERNEL, PROC
  3980. 0x78        string    HP-UX
  3981. >0        belong    1
  3982. >>0xC        belong    4
  3983. >>>0x10        belong    1
  3984. >>>>0x14    belong    0x100
  3985. >>>>>0x20    belong    0x44
  3986. >>>>>>0x68    belong    2
  3987. >>>>>>>0x74    belong    0x3C
  3988. >>>>>>>>0xB4    belong    4        core file
  3989. >>>>>>>>>0x58    string    >\0        from '%s'
  3990. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3991. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3992. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3993. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3994. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3995. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3996. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3997. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3998. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3999. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  4000. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  4001. # Order 6: EXEC, FORMAT, KERNEL, PROC
  4002. >0        belong    0x100
  4003. >>0xC        belong    0x44
  4004. >>>0x54        belong    1
  4005. >>>>0x60    belong    4
  4006. >>>>>0x64    belong    1
  4007. >>>>>>0x68    belong    2
  4008. >>>>>>>0x74    belong    0x2C
  4009. >>>>>>>>0xB4    belong    4        core file
  4010. >>>>>>>>>0x44    string    >\0        from '%s'
  4011. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  4012. >>>>>>>>>0xC4    belong    4        - received SIGILL
  4013. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  4014. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  4015. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  4016. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  4017. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  4018. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  4019. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  4020. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  4021. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  4022.  
  4023. # From: AMAKAWA Shuhei <sa264@cam.ac.uk>
  4024. 0    string    HPHP49-            HP49 binary
  4025.  
  4026.  
  4027. #------------------------------------------------------------------------------
  4028. # human68k:  file(1) magic for Human68k (X680x0 DOS) binary formats
  4029. # Magic too short!
  4030. #0        string    HU        Human68k
  4031. #>68        string    LZX        LZX compressed
  4032. #>>72        string    >\0        (version %s)
  4033. #>(8.L+74)    string    LZX        LZX compressed
  4034. #>>(8.L+78)    string    >\0        (version %s)
  4035. #>60        belong    >0        binded
  4036. #>(8.L+66)    string    #HUPAIR        hupair
  4037. #>0        string    HU        X executable
  4038. #>(8.L+74)    string    #LIBCV1        - linked PD LIBC ver 1
  4039. #>4        belong    >0        - base address 0x%x
  4040. #>28        belong    >0        not stripped
  4041. #>32        belong    >0        with debug information
  4042. #0        beshort    0x601a        Human68k Z executable
  4043. #0        beshort    0x6000        Human68k object file
  4044. #0        belong    0xd1000000    Human68k ar binary archive
  4045. #0        belong    0xd1010000    Human68k ar ascii archive
  4046. #0        beshort    0x0068        Human68k lib archive
  4047. #4        string    LZX        Human68k LZX compressed
  4048. #>8        string    >\0        (version %s)
  4049. #>4        string    LZX        R executable
  4050. #2        string    #HUPAIR        Human68k hupair R executable
  4051.  
  4052. #------------------------------------------------------------------------------
  4053. # ibm370:  file(1) magic for IBM 370 and compatibles.
  4054. #
  4055. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  4056. # What the heck *is* "USS/370"?
  4057. # AIX 4.1's "/etc/magic" has
  4058. #
  4059. #    0    short        0535        370 sysV executable 
  4060. #    >12    long        >0        not stripped
  4061. #    >22    short        >0        - version %d
  4062. #    >30    long        >0        - 5.2 format
  4063. #    0    short        0530        370 sysV pure executable 
  4064. #    >12    long        >0        not stripped
  4065. #    >22    short        >0        - version %d
  4066. #    >30    long        >0        - 5.2 format
  4067. #
  4068. # instead of the "USS/370" versions of the same magic numbers.
  4069. #
  4070. 0    beshort        0537        370 XA sysV executable 
  4071. >12    belong        >0        not stripped
  4072. >22    beshort        >0        - version %d
  4073. >30    belong        >0        - 5.2 format
  4074. 0    beshort        0532        370 XA sysV pure executable 
  4075. >12    belong        >0        not stripped
  4076. >22    beshort        >0        - version %d
  4077. >30    belong        >0        - 5.2 format
  4078. 0    beshort        054001        370 sysV pure executable
  4079. >12    belong        >0        not stripped
  4080. 0    beshort        055001        370 XA sysV pure executable
  4081. >12    belong        >0        not stripped
  4082. 0    beshort        056401        370 sysV executable
  4083. >12    belong        >0        not stripped
  4084. 0    beshort        057401        370 XA sysV executable
  4085. >12    belong        >0        not stripped
  4086. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  4087. >12    belong        >0        not stripped
  4088. >24     belong        >0        - version %ld
  4089. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  4090. >12    belong        >0        not stripped
  4091. >24    belong        >0        - version %ld
  4092. 0    beshort        0530        SVR2 pure executable (USS/370)
  4093. >12    belong        >0        not stripped
  4094. >24    belong        >0        - version %ld
  4095. 0    beshort        0535        SVR2 executable (USS/370)
  4096. >12    belong        >0        not stripped
  4097. >24    belong        >0        - version %ld
  4098.  
  4099. #------------------------------------------------------------------------------
  4100. # ibm6000:  file(1) magic for RS/6000 and the RT PC.
  4101. #
  4102. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  4103. >12    belong        >0        not stripped
  4104. # Breaks sun4 statically linked execs.
  4105. #0      beshort        0x0103        executable (RT Version 2) or obj module
  4106. #>2    byte        0x50        pure
  4107. #>28    belong        >0        not stripped
  4108. #>6    beshort        >0        - version %ld
  4109. 0    beshort        0x0104        shared library
  4110. 0    beshort        0x0105        ctab data
  4111. 0    beshort        0xfe04        structured file
  4112. 0    string        0xabcdef    AIX message catalog
  4113. 0    belong        0x000001f9    AIX compiled message catalog
  4114. 0    string        \<aiaff>    archive
  4115. 0    string        \<bigaf>    archive (big format)
  4116.  
  4117.  
  4118. #------------------------------------------------------------------------------
  4119. # iff:    file(1) magic for Interchange File Format (see also "audio" & "images")
  4120. #
  4121. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  4122. # Arts for file interchange.  It has also been used by Apple, SGI, and
  4123. # especially Commodore-Amiga.
  4124. #
  4125. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  4126. # FORM type, which is followed by the first chunk in the FORM.
  4127.  
  4128. 0    string        FORM        IFF data
  4129. #>4    belong        x        \b, FORM is %d bytes long
  4130. # audio formats
  4131. >8    string        AIFF        \b, AIFF audio
  4132. >8    string        AIFC        \b, AIFF-C compressed audio
  4133. >8    string        8SVX        \b, 8SVX 8-bit sampled sound voice
  4134. >8    string        SAMP        \b, SAMP sampled audio
  4135. >8    string        DTYP        \b, DTYP datatype description
  4136. >8    string        PTCH        \b, PTCH binary patch
  4137. # image formats
  4138. >8    string        ILBMBMHD    \b, ILBM interleaved image
  4139. >>20    beshort        x        \b, %d x
  4140. >>22    beshort        x        %d
  4141. >8    string        RGBN        \b, RGBN 12-bit RGB image
  4142. >8    string        RGB8        \b, RGB8 24-bit RGB image
  4143. >8    string        DR2D        \b, DR2D 2-D object
  4144. >8    string        TDDD        \b, TDDD 3-D rendering
  4145. # other formats
  4146. >8    string        FTXT        \b, FTXT formatted text
  4147.  
  4148. #------------------------------------------------------------------------------
  4149. # images:  file(1) magic for image formats (see also "iff")
  4150. #
  4151. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  4152. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  4153. # merging several one- and two-line files into here.
  4154. #
  4155. # little magic: PCX (first byte is 0x0a)
  4156.  
  4157. # Targa - matches `povray', `ppmtotga' and `xv' outputs
  4158. # by Philippe De Muyter <phdm@macqel.be>
  4159. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  4160. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  4161. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  4162. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  4163. # `tgatoppm' recognizes a superset (Index may be anything)
  4164. 1    belong&0xfff7ffff    0x01010000    Targa image data - Map
  4165. >2    byte&8            8        - RLE
  4166. >12    leshort            >0        %hd x
  4167. >14    leshort            >0        %hd
  4168. 1    belong&0xfff7ffff    0x00020000    Targa image data - RGB
  4169. >2    byte&8            8        - RLE
  4170. >12    leshort            >0        %hd x
  4171. >14    leshort            >0        %hd
  4172. 1    belong&0xfff7ffff    0x00030000    Targa image data - Mono
  4173. >2    byte&8            8        - RLE
  4174. >12    leshort            >0        %hd x
  4175. >14    leshort            >0        %hd
  4176.  
  4177. # PBMPLUS images
  4178. # The next byte following the magic is always whitespace.
  4179. 0    string        P1        Netpbm PBM image text
  4180. 0    string        P2        Netpbm PGM image text
  4181. 0    string        P3        Netpbm PPM image text
  4182. 0    string        P4        Netpbm PBM "rawbits" image data
  4183. 0    string        P5        Netpbm PGM "rawbits" image data
  4184. 0    string        P6        Netpbm PPM "rawbits" image data
  4185. 0    string        P7        Netpbm PAM image file
  4186.  
  4187. # From: bryanh@giraffe-data.com (Bryan Henderson)
  4188. 0    string        \117\072    Solitaire Image Recorder format
  4189. >4    string        \013        MGI Type 11
  4190. >4    string        \021        MGI Type 17
  4191. 0    string        .MDA        MicroDesign data
  4192. >21    byte        48        version 2
  4193. >21    byte        51        version 3
  4194. 0    string        .MDP        MicroDesign page data
  4195. >21    byte        48        version 2
  4196. >21    byte        51        version 3
  4197.  
  4198. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  4199. 0    string        IIN1        NIFF image data
  4200.  
  4201. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  4202. # The second word of TIFF files is the TIFF version number, 42, which has
  4203. # never changed.  The TIFF specification recommends testing for it.
  4204. 0    string        MM\x00\x2a    TIFF image data, big-endian
  4205. 0    string        II\x2a\x00    TIFF image data, little-endian
  4206.  
  4207. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  4208. # (Greg Roelofs, newt@uchicago.edu)
  4209. # (Albert Cahalan, acahalan@cs.uml.edu)
  4210. #
  4211. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  4212. #
  4213. 0    string        \x89PNG        PNG image data,
  4214. >4    belong        !0x0d0a1a0a    CORRUPTED,
  4215. >4    belong        0x0d0a1a0a
  4216. >>16    belong        x        %ld x
  4217. >>20    belong        x        %ld,
  4218. >>24    byte        x        %d-bit
  4219. >>25    byte        0        grayscale,
  4220. >>25    byte        2        \b/color RGB,
  4221. >>25    byte        3        colormap,
  4222. >>25    byte        4        gray+alpha,
  4223. >>25    byte        6        \b/color RGBA,
  4224. #>>26    byte        0        deflate/32K,
  4225. >>28    byte        0        non-interlaced
  4226. >>28    byte        1        interlaced
  4227. 1    string        PNG        PNG image data, CORRUPTED
  4228.  
  4229. # GIF
  4230. 0    string        GIF8        GIF image data
  4231. >4    string        7a        \b, version 8%s,
  4232. >4    string        9a        \b, version 8%s,
  4233. >6    leshort        >0        %hd x
  4234. >8    leshort        >0        %hd
  4235. #>10    byte        &0x80        color mapped,
  4236. #>10    byte&0x07    =0x00        2 colors
  4237. #>10    byte&0x07    =0x01        4 colors
  4238. #>10    byte&0x07    =0x02        8 colors
  4239. #>10    byte&0x07    =0x03        16 colors
  4240. #>10    byte&0x07    =0x04        32 colors
  4241. #>10    byte&0x07    =0x05        64 colors
  4242. #>10    byte&0x07    =0x06        128 colors
  4243. #>10    byte&0x07    =0x07        256 colors
  4244.  
  4245. # ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
  4246. # 1 plane, no encoding.
  4247. 0    string        \361\0\100\273    CMU window manager raster image data
  4248. >4    lelong        >0        %d x
  4249. >8    lelong        >0        %d,
  4250. >12    lelong        >0        %d-bit
  4251.  
  4252. # Magick Image File Format
  4253. 0    string        id=ImageMagick    MIFF image data
  4254.  
  4255. # Artisan
  4256. 0    long        1123028772    Artisan image data
  4257. >4    long        1        \b, rectangular 24-bit
  4258. >4    long        2        \b, rectangular 8-bit with colormap
  4259. >4    long        3        \b, rectangular 32-bit (24-bit with matte)
  4260.  
  4261. # FIG (Facility for Interactive Generation of figures), an object-based format
  4262. 0    string        #FIG        FIG image text
  4263. >5    string        x        \b, version %.3s
  4264.  
  4265. # PHIGS
  4266. 0    string        ARF_BEGARF        PHIGS clear text archive
  4267. 0    string        @(#)SunPHIGS        SunPHIGS
  4268. # version number follows, in the form m.n
  4269. >40    string        SunBin            binary
  4270. >32    string        archive            archive
  4271.  
  4272. # GKS (Graphics Kernel System)
  4273. 0    string        GKSM        GKS Metafile
  4274. >24    string        SunGKS        \b, SunGKS
  4275.  
  4276. # CGM image files
  4277. 0    string        BEGMF        clear text Computer Graphics Metafile
  4278. # XXX - questionable magic
  4279. 0    beshort&0xffe0    0x0020        binary Computer Graphics Metafile
  4280. 0    beshort        0x3020        character Computer Graphics Metafile
  4281.  
  4282. # MGR bitmaps  (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  4283. 0    string    yz    MGR bitmap, modern format, 8-bit aligned
  4284. 0    string    zz    MGR bitmap, old format, 1-bit deep, 16-bit aligned
  4285. 0    string    xz    MGR bitmap, old format, 1-bit deep, 32-bit aligned
  4286. 0    string    yx    MGR bitmap, modern format, squeezed
  4287.  
  4288. # Fuzzy Bitmap (FBM) images
  4289. 0    string        %bitmap\0    FBM image data
  4290. >30    long        0x31        \b, mono
  4291. >30    long        0x33        \b, color
  4292.  
  4293. # facsimile data
  4294. 1    string        PC\ Research,\ Inc    group 3 fax data
  4295. >29    byte        0        \b, normal resolution (204x98 DPI)
  4296. >29    byte        1        \b, fine resolution (204x196 DPI)
  4297. # From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
  4298. 0    string        Sfff        structured fax file
  4299.  
  4300.  
  4301. # PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt@uchicago.edu)
  4302. 0    string        BM        PC bitmap data
  4303. >14    leshort        12        \b, OS/2 1.x format
  4304. >>18    leshort        x        \b, %d x
  4305. >>20    leshort        x        %d
  4306. >14    leshort        64        \b, OS/2 2.x format
  4307. >>18    leshort        x        \b, %d x
  4308. >>20    leshort        x        %d
  4309. >14    leshort        40        \b, Windows 3.x format
  4310. >>18    lelong        x        \b, %d x
  4311. >>22    lelong        x        %d x
  4312. >>28    leshort        x        %d
  4313. # Too simple - MPi
  4314. #0    string        IC        PC icon data
  4315. #0    string        PI        PC pointer image data
  4316. #0    string        CI        PC color icon data
  4317. #0    string        CP        PC color pointer image data
  4318. # Conflicts with other entries [BABYL]
  4319. #0    string        BA        PC bitmap array data
  4320.  
  4321. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  4322. # note possible collision with C/REXX entry in c-lang; currently commented out
  4323. 0    string        /*\ XPM\ */    X pixmap image text
  4324.  
  4325. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  4326. 0    leshort        0xcc52        RLE image data,
  4327. >6    leshort        x        %d x
  4328. >8    leshort        x        %d
  4329. >2    leshort        >0        \b, lower left corner: %d
  4330. >4    leshort        >0        \b, lower right corner: %d
  4331. >10    byte&0x1    =0x1        \b, clear first
  4332. >10    byte&0x2    =0x2        \b, no background
  4333. >10    byte&0x4    =0x4        \b, alpha channel
  4334. >10    byte&0x8    =0x8        \b, comment
  4335. >11    byte        >0        \b, %d color channels
  4336. >12    byte        >0        \b, %d bits per pixel
  4337. >13    byte        >0        \b, %d color map channels
  4338.  
  4339. # image file format (Robert Potter, potter@cs.rochester.edu)
  4340. 0    string        Imagefile\ version-    iff image data
  4341. # this adds the whole header (inc. version number), informative but longish
  4342. >10    string        >\0        %s
  4343.  
  4344. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  4345. 0    belong        0x59a66a95    Sun raster image data
  4346. >4    belong        >0        \b, %d x
  4347. >8    belong        >0        %d,
  4348. >12    belong        >0        %d-bit,
  4349. #>16    belong        >0        %d bytes long,
  4350. >20    belong        0        old format,
  4351. #>20    belong        1        standard,
  4352. >20    belong        2        compressed,
  4353. >20    belong        3        RGB,
  4354. >20    belong        4        TIFF,
  4355. >20    belong        5        IFF,
  4356. >20    belong        0xffff        reserved for testing,
  4357. >24    belong        0        no colormap
  4358. >24    belong        1        RGB colormap
  4359. >24    belong        2        raw colormap
  4360. #>28    belong        >0        colormap is %d bytes long
  4361.  
  4362. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  4363. #
  4364. # See
  4365. #    http://reality.sgi.com/grafica/sgiimage.html
  4366. #
  4367. 0    beshort        474        SGI image data
  4368. #>2    byte        0        \b, verbatim
  4369. >2    byte        1        \b, RLE
  4370. #>3    byte        1        \b, normal precision
  4371. >3    byte        2        \b, high precision
  4372. >4    beshort        x        \b, %d-D
  4373. >6    beshort        x        \b, %d x
  4374. >8    beshort        x        %d
  4375. >10    beshort        x        \b, %d channel
  4376. >10    beshort        !1        \bs
  4377. >80    string        >0        \b, "%s"
  4378.  
  4379. 0    string        IT01        FIT image data
  4380. >4    belong        x        \b, %d x
  4381. >8    belong        x        %d x
  4382. >12    belong        x        %d
  4383. #
  4384. 0    string        IT02        FIT image data
  4385. >4    belong        x        \b, %d x
  4386. >8    belong        x        %d x
  4387. >12    belong        x        %d
  4388. #
  4389. 2048    string        PCD_IPI        Kodak Photo CD image pack file
  4390. >0xe02    byte&0x03    0x00        , landscape mode
  4391. >0xe02    byte&0x03    0x01        , portrait mode
  4392. >0xe02    byte&0x03    0x02        , landscape mode
  4393. >0xe02    byte&0x03    0x03        , portrait mode
  4394. 0    string        PCD_OPA        Kodak Photo CD overview pack file
  4395.  
  4396. # FITS format.  Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  4397. # FITS is the Flexible Image Transport System, the de facto standard for
  4398. # data and image transfer, storage, etc., for the astronomical community.
  4399. # (FITS floating point formats are big-endian.)
  4400. 0    string    SIMPLE\ \ =    FITS image data
  4401. >109    string    8        \b, 8-bit, character or unsigned binary integer
  4402. >108    string    16        \b, 16-bit, two's complement binary integer
  4403. >107    string    \ 32        \b, 32-bit, two's complement binary integer
  4404. >107    string    -32        \b, 32-bit, floating point, single precision
  4405. >107    string    -64        \b, 64-bit, floating point, double precision
  4406.  
  4407. # other images
  4408. 0    string    This\ is\ a\ BitMap\ file    Lisp Machine bit-array-file
  4409. 0    string        !!        Bennet Yee's "face" format
  4410.  
  4411. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  4412. # stuff.
  4413. #
  4414. 0    beshort        0x1010        PEX Binary Archive
  4415.  
  4416. # Visio drawings
  4417. 03000    string    Visio\ (TM)\ Drawing    %s
  4418.  
  4419. # Tgif files
  4420. 0    string    \%TGIF\ x         Tgif file version %s
  4421.  
  4422. # DICOM medical imaging data
  4423. 128    string    DICM            DICOM medical imaging data
  4424.  
  4425. # XWD - X Window Dump file.
  4426. #   As described in /usr/X11R6/include/X11/XWDFile.h
  4427. #   used by the xwd program.
  4428. #   Bradford Castalia, idaeim, 1/01
  4429. 4    belong    7            XWD X Window Dump image data
  4430. >100    string    >\0            \b, "%s"
  4431. >16    belong    x            \b, %dx
  4432. >20    belong    x            \b%dx
  4433. >12    belong    x            \b%d
  4434.  
  4435. # PDS - Planetary Data System
  4436. #   These files use Parameter Value Language in the header section.
  4437. #   Unfortunately, there is no certain magic, but the following
  4438. #   strings have been found to be most likely.
  4439. 0    string    NJPL1I00        PDS (JPL) image data
  4440. 2    string    NJPL1I            PDS (JPL) image data
  4441. 0    string    CCSD3ZF            PDS (CCSD) image data
  4442. 2    string    CCSD3Z            PDS (CCSD) image data
  4443. 0    string    PDS_            PDS image data
  4444. 0    string    LBLSIZE=        PDS (VICAR) image data
  4445.  
  4446. # pM8x: ATARI STAD compressed bitmap format
  4447. #
  4448. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  4449. # p M 8 5/6 xx yy zz data...
  4450. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  4451. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  4452. # most frequent byte, xx and zz are runlength escape codes, where xx is
  4453. # used for runs of yy.
  4454. #
  4455. 0    string    pM85        Atari ST STAD bitmap image data (hor)
  4456. >5    byte    0x00        (white background)
  4457. >5    byte    0xFF        (black background)
  4458. 0    string    pM86        Atari ST STAD bitmap image data (vert)
  4459. >5    byte    0x00        (white background)
  4460. >5    byte    0xFF        (black background)
  4461.  
  4462. # XXX:
  4463. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  4464. # magic.
  4465. # SGI RICE image file <mpruett@sgi.com>
  4466. #0    beshort    0x5249        RICE image
  4467. #>2    beshort    x        v%d
  4468. #>4    beshort    x        (%d x
  4469. #>6    beshort    x        %d)
  4470. #>8    beshort    0        8 bit
  4471. #>8    beshort    1        10 bit
  4472. #>8    beshort    2        12 bit
  4473. #>8    beshort    3        13 bit
  4474. #>10    beshort    0        4:2:2
  4475. #>10    beshort    1        4:2:2:4
  4476. #>10    beshort    2        4:4:4
  4477. #>10    beshort    3        4:4:4:4
  4478. #>12    beshort    1        RGB
  4479. #>12    beshort    2        CCIR601
  4480. #>12    beshort    3        RP175
  4481. #>12    beshort    4        YUV
  4482.  
  4483. #------------------------------------------------------------------------------
  4484. #
  4485. # Marco Schmidt (marcoschmidt@users.sourceforge.net) -- an image  file format
  4486. # for the EPOC operating system, which is used with PDAs like those from Psion
  4487. #
  4488. # see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description
  4489. # of various EPOC file formats
  4490.  
  4491. 0    string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file
  4492.  
  4493. # PCX image files
  4494. # From: Dan Fandrich <dan@coneharvesters.com>
  4495. 0    beshort        0x0a00    PCX ver. 2.5 image data
  4496. 0    beshort        0x0a02    PCX ver. 2.8 image data, with palette
  4497. 0    beshort        0x0a03    PCX ver. 2.8 image data, without palette
  4498. 0    beshort        0x0a04    PCX for Windows image data
  4499. 0    beshort        0x0a05    PCX ver. 3.0 image data
  4500. >4    leshort        x      bounding box [%hd,
  4501. >6    leshort        x      %hd] -
  4502. >8    leshort        x      [%hd,
  4503. >10    leshort        x      %hd],
  4504. >65    byte        >1    %d planes each of
  4505. >3    byte        x    %hhd-bit
  4506. >68    byte        0    image,
  4507. >68    byte        1    colour,
  4508. >68    byte        2    grayscale,
  4509. >68    byte        >2    image,
  4510. >68    byte        <0    image,
  4511. >12    leshort        >0    %hd x
  4512. >>14    leshort        x      %hd dpi,
  4513. >2    byte        0    uncompressed
  4514. >2    byte        1    RLE compressed
  4515.  
  4516. # Adobe Photoshop
  4517. 0    string        8BPS Adobe Photoshop Image
  4518.  
  4519. # XV thumbnail indicator (ThMO)
  4520. 0    string        P7\ 332        XV thumbnail image data
  4521.  
  4522. # NITF is defined by United States MIL-STD-2500A
  4523. 0    string    NITF    National Imagery Transmission Format
  4524. >25    string    >\0    dated %.14s
  4525.  
  4526. # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
  4527. 0    belong        0x00010008    GEM Image data
  4528. >12    beshort        x        %d x
  4529. >14    beshort        x        %d,
  4530. >4    beshort        x        %d planes,
  4531. >8    beshort        x        %d x
  4532. >10    beshort        x        %d pixelsize
  4533.  
  4534. # GEM Metafile (Wolfram Kleff)
  4535. 0    lelong        0x0018FFFF    GEM Metafile data
  4536. >4    leshort        x        version %d
  4537.  
  4538. #
  4539. # SMJPEG. A custom Motion JPEG format used by Loki Entertainment
  4540. # Software Torbjorn Andersson <d91tan@Update.UU.SE>.
  4541. #
  4542. 0    string    \0\nSMJPEG    SMJPEG
  4543. >8    belong    x        %d.x data
  4544. # According to the specification you could find any number of _TXT
  4545. # headers here, but I can't think of any way of handling that. None of
  4546. # the SMJPEG files I tried it on used this feature. Even if such a
  4547. # file is encountered the output should still be reasonable.
  4548. >16    string    _SND        \b,
  4549. >>24    beshort    >0        %d Hz
  4550. >>26    byte    8        8-bit
  4551. >>26    byte    16        16-bit
  4552. >>28    string    NONE        uncompressed
  4553. # >>28    string    APCM        ADPCM compressed
  4554. >>27    byte    1        mono
  4555. >>28    byte    2        stereo
  4556. # Help! Isn't there any way to avoid writing this part twice?
  4557. >>32    string    _VID        \b,
  4558. # >>>48    string    JFIF        JPEG
  4559. >>>40    belong    >0        %d frames
  4560. >>>44    beshort    >0        (%d x
  4561. >>>46    beshort    >0        %d)
  4562. >16    string    _VID        \b,
  4563. # >>32    string    JFIF        JPEG
  4564. >>24    belong    >0        %d frames
  4565. >>28    beshort    >0        (%d x
  4566. >>30    beshort    >0        %d)
  4567.  
  4568. 0    string    Paint\ Shop\ Pro\ Image\ File    Paint Shop Pro Image File
  4569.  
  4570. # "thumbnail file" (icon)
  4571. # descended from "xv", but in use by other applications as well (Wolfram Kleff)
  4572. 0       string          P7\ 332         XV "thumbnail file" (icon) data
  4573.  
  4574. # taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
  4575. 0       string          KiSS            KISS/GS
  4576. >4      byte            16              color
  4577. >>5     byte            x               %d bit
  4578. >>8     leshort         x               %d colors
  4579. >>10    leshort         x               %d groups
  4580. >4      byte            32              cell
  4581. >>5     byte            x               %d bit
  4582. >>8     leshort         x               %d x
  4583. >>10    leshort         x               %d
  4584. >>12    leshort         x               +%d
  4585. >>14    leshort         x               +%d
  4586.  
  4587. # Webshots (www.webshots.com), by John Harrison
  4588. 0       string          C\253\221g\230\0\0\0 Webshots Desktop .wbz file
  4589.  
  4590. # Hercules DASD image files
  4591. # From Jan Jaeger <jj@septa.nl>
  4592. 0       string  CKD_P370        Hercules CKD DASD image file
  4593. >8      long    x               \b, %d heads per cylinder
  4594. >12     long    x               \b, track size %d bytes
  4595. >16     byte    x               \b, device type 33%2.2X
  4596.  
  4597. 0       string  CKD_C370        Hercules compressed CKD DASD image file
  4598. >8      long    x               \b, %d heads per cylinder
  4599. >12     long    x               \b, track size %d bytes
  4600. >16     byte    x               \b, device type 33%2.2X
  4601.  
  4602. 0       string  CKD_S370        Hercules CKD DASD shadow file
  4603. >8      long    x               \b, %d heads per cylinder
  4604. >12     long    x               \b, track size %d bytes
  4605. >16     byte    x               \b, device type 33%2.2X
  4606.  
  4607. # Squeak images and - etoffi@softhome.net
  4608. 0 string \146\031\0\0  Squeak image data
  4609. 0 string 'From\040Squeak  Squeak program text
  4610.  
  4611. # partimage: file(1) magic for PartImage files (experimental, incomplete)
  4612. # Author: Hans-Joachim Baader <hjb@pro-linux.de>
  4613. 0        string    PaRtImAgE-VoLuMe    PartImage
  4614. >0x0020        string    0.6.1        file version %s
  4615. >>0x0060    lelong    >-1        volume %ld
  4616. #>>0x0064 8 byte identifier
  4617. #>>0x007c reserved
  4618. >>0x0200    string    >\0        type %s
  4619. >>0x1400    string    >\0        device %s,
  4620. >>0x1600    string    >\0        original filename %s,
  4621. # Some fields omitted
  4622. >>0x2744    lelong    0        not compressed
  4623. >>0x2744    lelong    1        gzip compressed
  4624. >>0x2744    lelong    2        bzip2 compressed
  4625. >>0x2744    lelong    >2        compressed with unknown algorithm
  4626. >0x0020        string    >0.6.1        file version %s
  4627. >0x0020        string    <0.6.1        file version %s
  4628.  
  4629. # DCX is multi-page PCX, using a simple header of up to 1024
  4630. # offsets for the respective PCX components.
  4631. # From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
  4632. 0    lelong    987654321    DCX multi-page PCX image data
  4633.  
  4634. #------------------------------------------------------------------------------
  4635. # intel:  file(1) magic for x86 Unix
  4636. #
  4637. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  4638. # is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
  4639. # Windows as well.
  4640. #
  4641. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  4642. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  4643. # as well, if, as, and when IBM makes it portable.
  4644. #
  4645. # The `versions' should be un-commented if they work for you.
  4646. # (Was the problem just one of endianness?)
  4647. #
  4648. 0    leshort        0502        basic-16 executable
  4649. >12    lelong        >0        not stripped
  4650. #>22    leshort        >0        - version %ld
  4651. 0    leshort        0503        basic-16 executable (TV)
  4652. >12    lelong        >0        not stripped
  4653. #>22    leshort        >0        - version %ld
  4654. 0    leshort        0510        x86 executable
  4655. >12    lelong        >0        not stripped
  4656. 0    leshort        0511        x86 executable (TV)
  4657. >12    lelong        >0        not stripped
  4658. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  4659. >12    lelong        >0        not stripped
  4660. #>22    leshort        >0        - version %ld
  4661. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  4662. >12    lelong        >0        not stripped
  4663. #>22    leshort        >0        - version %ld
  4664. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  4665. 0    leshort        =0514        80386 COFF executable
  4666. >12    lelong        >0        not stripped
  4667. >22    leshort        >0        - version %ld
  4668.  
  4669. #------------------------------------------------------------------------------
  4670. # interleaf:  file(1) magic for InterLeaf TPS:
  4671. #
  4672. 0    string        =\210OPS    Interleaf saved data
  4673. 0    string        =<!OPS        Interleaf document text
  4674. >5    string        ,\ Version\ =    \b, version
  4675. >>17    string        >\0        %.3s
  4676.  
  4677. #------------------------------------------------------------------------------
  4678. # island:  file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
  4679. # "/etc/magic":
  4680. # From: guy@netapp.com (Guy Harris)
  4681. #
  4682. 4    string        pgscriptver    IslandWrite document
  4683. 13    string        DrawFile    IslandDraw document
  4684.  
  4685.  
  4686. #------------------------------------------------------------------------------
  4687. # ispell:  file(1) magic for ispell
  4688. #
  4689. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
  4690. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  4691. # (No other current magic entries collide.)
  4692. #
  4693. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  4694. #
  4695. 0    leshort&0xFFFC    0x9600        little endian ispell
  4696. >0    byte        0        hash file (?),
  4697. >0    byte        1        3.0 hash file,
  4698. >0    byte        2        3.1 hash file,
  4699. >0    byte        3        hash file (?),
  4700. >2    leshort        0x00        8-bit, no capitalization, 26 flags
  4701. >2    leshort        0x01        7-bit, no capitalization, 26 flags
  4702. >2    leshort        0x02        8-bit, capitalization, 26 flags
  4703. >2    leshort        0x03        7-bit, capitalization, 26 flags
  4704. >2    leshort        0x04        8-bit, no capitalization, 52 flags
  4705. >2    leshort        0x05        7-bit, no capitalization, 52 flags
  4706. >2    leshort        0x06        8-bit, capitalization, 52 flags
  4707. >2    leshort        0x07        7-bit, capitalization, 52 flags
  4708. >2    leshort        0x08        8-bit, no capitalization, 128 flags
  4709. >2    leshort        0x09        7-bit, no capitalization, 128 flags
  4710. >2    leshort        0x0A        8-bit, capitalization, 128 flags
  4711. >2    leshort        0x0B        7-bit, capitalization, 128 flags
  4712. >2    leshort        0x0C        8-bit, no capitalization, 256 flags
  4713. >2    leshort        0x0D        7-bit, no capitalization, 256 flags
  4714. >2    leshort        0x0E        8-bit, capitalization, 256 flags
  4715. >2    leshort        0x0F        7-bit, capitalization, 256 flags
  4716. >4    leshort        >0        and %d string characters
  4717. 0    beshort&0xFFFC    0x9600        big endian ispell
  4718. >1    byte        0        hash file (?),
  4719. >1    byte        1        3.0 hash file,
  4720. >1    byte        2        3.1 hash file,
  4721. >1    byte        3        hash file (?),
  4722. >2    beshort        0x00        8-bit, no capitalization, 26 flags
  4723. >2    beshort        0x01        7-bit, no capitalization, 26 flags
  4724. >2    beshort        0x02        8-bit, capitalization, 26 flags
  4725. >2    beshort        0x03        7-bit, capitalization, 26 flags
  4726. >2    beshort        0x04        8-bit, no capitalization, 52 flags
  4727. >2    beshort        0x05        7-bit, no capitalization, 52 flags
  4728. >2    beshort        0x06        8-bit, capitalization, 52 flags
  4729. >2    beshort        0x07        7-bit, capitalization, 52 flags
  4730. >2    beshort        0x08        8-bit, no capitalization, 128 flags
  4731. >2    beshort        0x09        7-bit, no capitalization, 128 flags
  4732. >2    beshort        0x0A        8-bit, capitalization, 128 flags
  4733. >2    beshort        0x0B        7-bit, capitalization, 128 flags
  4734. >2    beshort        0x0C        8-bit, no capitalization, 256 flags
  4735. >2    beshort        0x0D        7-bit, no capitalization, 256 flags
  4736. >2    beshort        0x0E        8-bit, capitalization, 256 flags
  4737. >2    beshort        0x0F        7-bit, capitalization, 256 flags
  4738. >4    beshort        >0        and %d string characters
  4739. # ispell 4.0 hash files  kromJx <kromJx@crosswinds.net>
  4740. # Ispell 4.0
  4741. 0       string          ISPL            ispell
  4742. >4      long            x               hash file version %d,
  4743. >8      long            x               lexletters %d,
  4744. >12     long            x               lexsize %d,
  4745. >16     long            x               hashsize %d,
  4746. >20     long            x               stblsize %d
  4747. #------------------------------------------------------------
  4748. # Java ByteCode
  4749. # From Larry Schwimmer (schwim@cs.stanford.edu)
  4750. 0    belong        0xcafebabe    compiled Java class data,
  4751. >6    beshort x    version %d.
  4752. >4    beshort x    \b%d
  4753. #------------------------------------------------------------
  4754. # Java serialization
  4755. # From Martin Pool (m.pool@pharos.com.au)
  4756. 0    beshort        0xaced        Java serialization data
  4757. >2    beshort        >0x0004        \b, version %d
  4758.  
  4759. #------------------------------------------------------------------------------
  4760. # JPEG images
  4761. # SunOS 5.5.1 had
  4762. #
  4763. #    0    string        \377\330\377\340    JPEG file
  4764. #    0    string        \377\330\377\356    JPG file
  4765. #
  4766. # both of which turn into "JPEG image data" here.
  4767. #
  4768. 0    beshort        0xffd8        JPEG image data
  4769. >6    string        JFIF        \b, JFIF standard
  4770. >6    string        Exif        \b, EXIF standard
  4771. # The following added by Erik Rossen <rossen@freesurf.ch> 1999-09-06
  4772. # in a vain attempt to add image size reporting for JFIF.  Note that these
  4773. # tests are not fool-proof since some perfectly valid JPEGs are currently
  4774. # impossible to specify in magic(4) format.
  4775. # First, a little JFIF version info:
  4776. >11    byte        x        \b %d.
  4777. >12    byte        x        \b%02d
  4778. # Next, the resolution or aspect ratio of the image:
  4779. #>13    byte        0        \b, aspect ratio
  4780. #>13    byte        1        \b, resolution (DPI)
  4781. #>13    byte        2        \b, resolution (DPCM)
  4782. #>4    beshort        x        \b, segment length %d
  4783. # Next, show thumbnail info, if it exists:
  4784. >18    byte        !0        \b, thumbnail %dx
  4785. >>19    byte        x        \b%d
  4786. # Here things get sticky.  We can do ONE MORE marker segment with
  4787. # indirect addressing, and that's all.  It would be great if we could
  4788. # do pointer arithemetic like in an assembler language.  Christos?
  4789. # And if there was some sort of looping construct to do searches, plus a few
  4790. # named accumulators, it would be even more effective...
  4791. # At least we can show a comment if no other segments got inserted before:
  4792. >(4.S+5)    byte        0xFE
  4793. >>(4.S+8)    string        >\0        \b, "%s"
  4794. #>(4.S+5)    byte        0xFE        \b, comment
  4795. #>>(4.S+6)    beshort        x        \b length=%d
  4796. #>>(4.S+8)    string        >\0        \b, "%s"
  4797. # Or, we can show the encoding type (I've included only the three most common)
  4798. # and image dimensions if we are lucky and the SOFn (image segment) is here:
  4799. >(4.S+5)    byte        0xC0        \b, baseline
  4800. >>(4.S+6)    byte        x        \b, precision %d
  4801. >>(4.S+7)    beshort        x        \b, %dx
  4802. >>(4.S+9)    beshort        x        \b%d
  4803. >(4.S+5)    byte        0xC1        \b, extended sequential
  4804. >>(4.S+6)    byte        x        \b, precision %d
  4805. >>(4.S+7)    beshort        x        \b, %dx
  4806. >>(4.S+9)    beshort        x        \b%d
  4807. >(4.S+5)    byte        0xC2        \b, progressive
  4808. >>(4.S+6)    byte        x        \b, precision %d
  4809. >>(4.S+7)    beshort        x        \b, %dx
  4810. >>(4.S+9)    beshort        x        \b%d
  4811. # I've commented-out quantisation table reporting.  I doubt anyone cares yet.
  4812. #>(4.S+5)    byte        0xDB        \b, quantisation table
  4813. #>>(4.S+6)    beshort        x        \b length=%d
  4814. #>14    beshort        x        \b, %d x
  4815. #>16    beshort        x        \b %d
  4816.  
  4817. # HSI is Handmade Software's proprietary JPEG encoding scheme
  4818. 0    string        hsi1        JPEG image data, HSI proprietary
  4819.  
  4820. # From: David Santinoli <david@santinoli.com>
  4821. 0    string        \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A    JPEG 2000 image data
  4822.  
  4823. #------------------------------------------------------------------------------
  4824. # karma:  file(1) magic for Karma data files
  4825. #
  4826. # From <rgooch@atnf.csiro.au>
  4827.  
  4828. 0    string        KarmaRHD Version    Karma Data Structure Version
  4829. >16    belong        x        %lu
  4830. #------------------------------------------------------------------------------
  4831. # DEC SRC Virtual Paper: Lectern files
  4832. # Karl M. Hegbloom <karlheg@inetarena.com>
  4833. 0    string    lect    DEC SRC Virtual Paper Lectern file
  4834.  
  4835. #------------------------------------------------------------------------------
  4836. # lex:  file(1) magic for lex
  4837. #
  4838. #    derived empirically, your offsets may vary!
  4839. 53    string        yyprevious    C program text (from lex)
  4840. >3    string        >\0         for %s
  4841. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  4842. 21    string        generated\ by\ flex    C program text (from flex)
  4843. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  4844. 0    string        %{        lex description text
  4845.  
  4846. #------------------------------------------------------------------------------
  4847. # lif:  file(1) magic for lif
  4848. #
  4849. # (Daniel Quinlan <quinlan@yggdrasil.com>)
  4850. #
  4851. 0    beshort        0x8000        lif file
  4852.  
  4853. #------------------------------------------------------------------------------
  4854. # linux:  file(1) magic for Linux files
  4855. #
  4856. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  4857. # The following basic Linux magic is useful for reference, but using
  4858. # "long" magic is a better practice in order to avoid collisions.
  4859. #
  4860. # 2    leshort        100        Linux/i386
  4861. # >0    leshort        0407        impure executable (OMAGIC)
  4862. # >0    leshort        0410        pure executable (NMAGIC)
  4863. # >0    leshort        0413        demand-paged executable (ZMAGIC)
  4864. # >0    leshort        0314        demand-paged executable (QMAGIC)
  4865. #
  4866. 0    lelong        0x00640107    Linux/i386 impure executable (OMAGIC)
  4867. >16    lelong        0        \b, stripped
  4868. 0    lelong        0x00640108    Linux/i386 pure executable (NMAGIC)
  4869. >16    lelong        0        \b, stripped
  4870. 0    lelong        0x0064010b    Linux/i386 demand-paged executable (ZMAGIC)
  4871. >16    lelong        0        \b, stripped
  4872. 0    lelong        0x006400cc    Linux/i386 demand-paged executable (QMAGIC)
  4873. >16    lelong        0        \b, stripped
  4874. #
  4875. 0    string        \007\001\000    Linux/i386 object file
  4876. >20    lelong        >0x1020        \b, DLL library
  4877. # Linux-8086 stuff:
  4878. 0    string        \01\03\020\04    Linux-8086 impure executable
  4879. >28    long        !0        not stripped
  4880. 0    string        \01\03\040\04    Linux-8086 executable
  4881. >28    long        !0        not stripped
  4882. #
  4883. 0    string        \243\206\001\0    Linux-8086 object file
  4884. #
  4885. 0    string        \01\03\020\20    Minix-386 impure executable
  4886. >28    long        !0        not stripped
  4887. 0    string        \01\03\040\20    Minix-386 executable
  4888. >28    long        !0        not stripped
  4889. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  4890. 216    lelong        0421        Linux/i386 core file
  4891. >220    string        >\0        of '%s'
  4892. >200    lelong        >0        (signal %d)
  4893. #
  4894. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  4895. # this can be overridden by the DOS executable (COM) entry
  4896. # Too simple, MPi
  4897. #2    string        LILO        Linux/i386 LILO boot/chain loader
  4898. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  4899. 0    leshort        0x0436        Linux/i386 PC Screen Font data,
  4900. >2    byte        0        256 characters, no directory,
  4901. >2    byte        1        512 characters, no directory,
  4902. >2    byte        2        256 characters, Unicode directory,
  4903. >2    byte        3        512 characters, Unicode directory,
  4904. >3    byte        >0        8x%d
  4905. # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
  4906. 4086    string        SWAP-SPACE    Linux/i386 swap file
  4907. # according to man page of mkswap (8) March 1999
  4908. 4086    string        SWAPSPACE2    Linux/i386 swap file (new style)
  4909. >0x400    long        x        %d (4K pages)
  4910. >0x404    long        x        size %d pages
  4911. # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  4912. #
  4913. #    from Erik Troan (ewt@redhat.com) examining od dumps, so this
  4914. #        could be wrong
  4915. #      updated by David Mosberger (davidm@azstarnet.com) based on
  4916. #      GNU BFD and MIPS info found below.
  4917. #
  4918. 0    leshort        0x0183        ECOFF alpha
  4919. >24    leshort        0407        executable
  4920. >24    leshort        0410        pure
  4921. >24    leshort        0413        demand paged
  4922. >8    long        >0        not stripped
  4923. >8    long        0        stripped
  4924. >23    leshort        >0        - version %ld.
  4925. #
  4926. # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
  4927. # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  4928. # and Nicolßs Lichtmaier <nick@debian.org>
  4929. # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  4930. # Linux kernel boot images (i386 arch) (Wolfram Kleff)
  4931. 514    string        HdrS        Linux kernel
  4932. >510    leshort        0xAA55        x86 boot executable
  4933. >>518    leshort        >=3D0x200
  4934. >>529    byte        0        zImage,
  4935. >>>529    byte        1        bzImage,
  4936. >>>(526.s+0x200) string    >\0        version %s,
  4937. >>498    leshort        1        RO-rootFS,
  4938. >>498    leshort        0        RW-rootFS,
  4939. >>508    leshort        >0        root_dev 0x%X,
  4940. >>502    leshort        >0        swap_dev 0x%X,
  4941. >>504    leshort        >0        RAMdisksize %u KB,
  4942. >>506    leshort        0xFFFF        Normal VGA
  4943. >>506    leshort        0xFFFE        Extended VGA
  4944. >>506    leshort        0xFFFD        Prompt for Videomode
  4945. >>506    leshort        >0        Video mode %d
  4946. # This also matches new kernels, which were caught above by "HdrS".
  4947. 0        belong    0xb8c0078e    Linux kernel
  4948. >0x1e3        string    Loading        version 1.3.79 or older
  4949. >0x1e9        string    Loading        from prehistoric times
  4950.  
  4951. # System.map files - Nicol├ís Lichtmaier <nick@debian.org>
  4952. 8    string    \ A\ _text    Linux kernel symbol map text
  4953.  
  4954. # LSM entries - Nicol├ís Lichtmaier <nick@debian.org>
  4955. 0    string    Begin3    Linux Software Map entry text
  4956. 0    string    Begin4    Linux Software Map entry text (new format)
  4957.  
  4958. # From Matt Zimmerman
  4959. 0       belong  0x4f4f4f4d      User-mode Linux COW file
  4960. >4      belong  x               \b, version %d
  4961. >8      string  >\0             \b, backing file %s
  4962.  
  4963. ############################################################################
  4964. # Linux kernel versions
  4965.  
  4966. 0        string        \xb8\xc0\x07\x8e\xd8\xb8\x00\x90    Linux
  4967. >497        leshort        0        x86 boot sector
  4968. >>514        belong        0x8e    of a kernel from the dawn of time!
  4969. >>514        belong        0x908ed8b4    version 0.99-1.1.42
  4970. >>514        belong        0x908ed8b8    for memtest86
  4971.  
  4972. >497        leshort        !0        x86 kernel
  4973. >>504        leshort        >0        RAMdisksize=%u KB
  4974. >>502        leshort        >0        swap=0x%X
  4975. >>508        leshort        >0        root=0x%X
  4976. >>>498        leshort        1        \b-ro
  4977. >>>498        leshort        0        \b-rw
  4978. >>506        leshort        0xFFFF        vga=normal
  4979. >>506        leshort        0xFFFE        vga=extended
  4980. >>506        leshort        0xFFFD        vga=ask
  4981. >>506        leshort        >0        vga=%d
  4982. >>514        belong        0x908ed881    version 1.1.43-1.1.45
  4983. >>514        belong        0x15b281cd
  4984. >>>0xa8e    belong        0x55AA5a5a    version 1.1.46-1.2.13,1.3.0
  4985. >>>0xa99    belong        0x55AA5a5a    version 1.3.1,2
  4986. >>>0xaa3    belong        0x55AA5a5a    version 1.3.3-1.3.30
  4987. >>>0xaa6    belong        0x55AA5a5a    version 1.3.31-1.3.41
  4988. >>>0xb2b    belong        0x55AA5a5a    version 1.3.42-1.3.45
  4989. >>>0xaf7    belong        0x55AA5a5a    version 1.3.46-1.3.72
  4990. >>514        string        HdrS
  4991. >>>518        leshort        >0x1FF
  4992. >>>>529        byte        0        \b, zImage
  4993. >>>>529        byte        1        \b, bzImage
  4994. >>>>(526.s+0x200) string     >\0        \b, version %s
  4995.  
  4996. # Linux boot sector thefts.
  4997. 0        belong        0xb8c0078e    Linux
  4998. >0x1e6        belong        0x454c4b53    ELKS Kernel
  4999. >0x1e6        belong        !0x454c4b53    style boot sector
  5000.  
  5001. ############################################################################
  5002. # Linux 8086 executable
  5003. 0    lelong&0xFF0000FF 0xC30000E9    Linux-Dev86 executable, headerless
  5004. >5    string        .        
  5005. >>4    string        >\0        \b, libc version %s
  5006.  
  5007. 0    lelong&0xFF00FFFF 0x4000301    Linux-8086 executable
  5008. >2    byte&0x01    !0        \b, unmapped zero page
  5009. >2    byte&0x20    0        \b, impure
  5010. >2    byte&0x20    !0
  5011. >>2    byte&0x10    !0        \b, A_EXEC
  5012. >2    byte&0x02    !0        \b, A_PAL
  5013. >2    byte&0x04    !0        \b, A_NSYM
  5014. >2    byte&0x08    !0        \b, A_STAND
  5015. >2    byte&0x40    !0        \b, A_PURE
  5016. >2    byte&0x80    !0        \b, A_TOVLY
  5017. >28     long            !0              \b, not stripped
  5018. >37    string        .        
  5019. >>36    string        >\0        \b, libc version %s
  5020.  
  5021. # 0    lelong&0xFF00FFFF 0x10000301    ld86 I80386 executable
  5022. # 0    lelong&0xFF00FFFF 0xB000301    ld86 M68K executable
  5023. # 0    lelong&0xFF00FFFF 0xC000301    ld86 NS16K executable
  5024. # 0    lelong&0xFF00FFFF 0x17000301    ld86 SPARC executable
  5025.  
  5026.  
  5027. #------------------------------------------------------------------------------
  5028. # lisp:  file(1) magic for lisp programs
  5029. #
  5030. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  5031.  
  5032. # This is a guess, but a good one.
  5033. 0    string    ;;            Lisp/Scheme program text
  5034.  
  5035. # Emacs 18 - this is always correct, but not very magical.
  5036. 0    string    \012(            Emacs v18 byte-compiled Lisp data
  5037. # Emacs 19+ - ver. recognition added by Ian Springer
  5038. # Also applies to XEmacs 19+ .elc files; could tell them apart if we had regexp
  5039. # support or similar - Chris Chittleborough <cchittleborough@yahoo.com.au>
  5040. 0    string    ;ELC            
  5041. >4    byte    >19            
  5042. >4    byte    <32            Emacs/XEmacs v%d byte-compiled Lisp data
  5043.  
  5044. # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
  5045. 0    string    (SYSTEM::VERSION\040'    CLISP byte-compiled Lisp program text
  5046. 0    long    0x70768BD2        CLISP memory image data
  5047. 0    long    0xD28B7670        CLISP memory image data, other endian
  5048.  
  5049. # Files produced by GNU gettext
  5050. 0    long    0xDE120495        GNU-format message catalog data
  5051. 0    long    0x950412DE        GNU-format message catalog data
  5052.  
  5053. #.com and .bin for MIT scheme 
  5054. 0    string    \372\372\372\372    MIT scheme (library?)
  5055.  
  5056. # From: David Allouche <david@allouche.net>
  5057. 0    string    \<TeXmacs|    TeXmacs document text
  5058. #------------------------------------------------------------------------------
  5059. # mach file description
  5060. #
  5061. 0    belong        0xcafebabe    Mach-O fat file
  5062. >4    belong        1        with 1 architecture
  5063. >4    belong        >1
  5064. >>4    belong        x        with %ld architectures        
  5065. #
  5066. 0    belong        0xfeedface    Mach-O
  5067. >12    belong        1        object
  5068. >12    belong        2        executable
  5069. >12    belong        3        shared library
  5070. >12    belong        4        core
  5071. >12    belong        5        preload executable
  5072. >12    belong        6               dynamically linked shared library
  5073. >12    belong        7               dynamic linker
  5074. >12    belong        8        bundle
  5075. >12    belong        >8
  5076. >>12    belong        x        filetype=%ld
  5077. >4    belong        <0
  5078. >>4    belong        x        architecture=%ld
  5079. >4    belong        1        vax
  5080. >4    belong        2        romp
  5081. >4    belong        3        architecture=3
  5082. >4    belong        4        ns32032
  5083. >4    belong        5        ns32332
  5084. >4    belong        6        for m68k architecture
  5085. # from NeXTstep 3.0 <mach/machine.h>
  5086. # i.e. mc680x0_all, ignore
  5087. # >>8    belong        1        (mc68030)
  5088. >>8    belong        2        (mc68040)
  5089. >>8    belong        3        (mc68030 only)
  5090. >4    belong        7        i386
  5091. >4    belong        8        mips
  5092. >4    belong        9        ns32532
  5093. >4    belong        10        architecture=10
  5094. >4    belong        11        hp pa-risc
  5095. >4    belong        12        acorn
  5096. >4    belong        13        m88k
  5097. >4    belong        14        sparc
  5098. >4    belong        15        i860-big
  5099. >4    belong        16        i860
  5100. >4    belong        17        rs6000
  5101. >4    belong        18        ppc
  5102. >4    belong        >18
  5103. >>4    belong        x        architecture=%ld
  5104.  
  5105. #------------------------------------------------------------------------------
  5106. # macintosh description
  5107. #
  5108. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  5109. # Daniel Quinlan, quinlan@yggdrasil.com
  5110. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  5111. >41    string    x                    \b, version %.3s
  5112.  
  5113. # Stuffit archives are the de facto standard of compression for Macintosh
  5114. # files obtained from most archives. (franklsm@tuns.ca)
  5115. 0    string        SIT!            StuffIt Archive (data)
  5116. >2    string        x            : %s
  5117. 0    string        SITD            StuffIt Deluxe (data)
  5118. >2    string        x            : %s
  5119. 0    string        Seg            StuffIt Deluxe Segment (data)
  5120. >2    string        x            : %s
  5121.  
  5122. # Newer StuffIt archives (grant@netbsd.org)
  5123. 0    string        StuffIt            StuffIt Archive
  5124. >162    string        >0            : %s
  5125.  
  5126. # Macintosh Applications and Installation binaries (franklsm@tuns.ca)
  5127. 0    string        APPL            Macintosh Application (data)
  5128. >2    string        x            \b: %s
  5129.  
  5130. # Macintosh System files (franklsm@tuns.ca)
  5131. 0    string        zsys            Macintosh System File (data)
  5132. 0    string        FNDR            Macintosh Finder (data)
  5133. 0    string        libr            Macintosh Library (data)
  5134. >2    string        x            : %s
  5135. 0    string        shlb            Macintosh Shared Library (data)
  5136. >2    string        x            : %s
  5137. 0    string        cdev            Macintosh Control Panel (data)
  5138. >2    string        x            : %s
  5139. 0    string        INIT            Macintosh Extension (data)
  5140. >2    string        x            : %s
  5141. 0    string        FFIL            Macintosh Truetype Font (data)
  5142. >2    string        x            : %s
  5143. 0    string        LWFN            Macintosh Postscript Font (data)
  5144. >2    string        x            : %s
  5145.  
  5146. # Additional Macintosh Files (franklsm@tuns.ca)
  5147. 0    string        PACT            Macintosh Compact Pro Archive (data)
  5148. >2    string        x            : %s
  5149. 0    string        ttro            Macintosh TeachText File (data)
  5150. >2    string        x            : %s
  5151. 0    string        TEXT            Macintosh TeachText File (data)
  5152. >2    string        x            : %s
  5153. 0    string        PDF            Macintosh PDF File (data)
  5154. >2    string        x            : %s
  5155.  
  5156. # MacBinary format (Eric Fischer, enf@pobox.com)
  5157. #
  5158. # Unfortunately MacBinary doesn't really have a magic number prior
  5159. # to the MacBinary III format.  The checksum is really the way to
  5160. # do it, but the magic file format isn't up to the challenge.
  5161. #
  5162. # 0    byte        0
  5163. # 1    byte                # filename length
  5164. # 2    string                # filename
  5165. # 65    string                # file type
  5166. # 69    string                # file creator
  5167. # 73    byte                # Finder flags
  5168. # 74    byte        0
  5169. # 75    beshort                # vertical posn in window
  5170. # 77    beshort                # horiz posn in window
  5171. # 79    beshort                # window or folder ID
  5172. # 81    byte                # protected?
  5173. # 82    byte        0
  5174. # 83    belong                # length of data segment
  5175. # 87    belong                # length of resource segment
  5176. # 91    belong                # file creation date
  5177. # 95    belong                # file modification date
  5178. # 99    beshort                # length of comment after resource
  5179. # 101    byte                # new Finder flags
  5180. # 102    string        mBIN        # (only in MacBinary III)
  5181. # 106    byte                # char. code of file name
  5182. # 107    byte                # still more Finder flags
  5183. # 116    belong                # total file length
  5184. # 120    beshort                # length of add'l header
  5185. # 122    byte        129        # for MacBinary II
  5186. # 122    byte        130        # for MacBinary III
  5187. # 123    byte        129        # minimum version that can read fmt
  5188. # 124    beshort                # checksum
  5189. #
  5190. # This attempts to use the version numbers as a magic number, requiring
  5191. # that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
  5192. # be 0x81.  This works for the files I have, but maybe not for everyone's.
  5193.  
  5194. # Unfortunately, this magic is quite weak - MPi
  5195. #122    beshort&0xFCFF    0x8081        Macintosh MacBinary data
  5196.  
  5197. # MacBinary I doesn't have the version number field at all, but MacBinary II
  5198. # has been in use since 1987 so I hope there aren't many really old files
  5199. # floating around that this will miss.  The original spec calls for using
  5200. # the nulls in 0, 74, and 82 as the magic number.
  5201. #
  5202. # Another possibility, that would also work for MacBinary I, is to use
  5203. # the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
  5204. # have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
  5205. # and that 74 will be 0.  So something like
  5206. # 71     belong&0x80804EFF 0x00000000     Macintosh MacBinary data
  5207. # >73    byte&0x01    0x01        \b, inited
  5208. # >73    byte&0x02    0x02        \b, changed
  5209. # >73    byte&0x04    0x04        \b, busy
  5210. # >73    byte&0x08    0x08        \b, bozo
  5211. # >73    byte&0x10    0x10        \b, system
  5212. # >73    byte&0x10    0x20        \b, bundle
  5213. # >73    byte&0x10    0x40        \b, invisible
  5214. # >73    byte&0x10    0x80        \b, locked
  5215. # >65    string        x        \b, type "%4.4s"
  5216. # >65    string        8BIM        (PhotoShop)
  5217. # >65    string        ALB3        (PageMaker 3)
  5218. # >65    string        ALB4        (PageMaker 4)
  5219. # >65    string        ALT3        (PageMaker 3)
  5220. # >65    string        APPL        (application)
  5221. # >65    string        AWWP        (AppleWorks word processor)
  5222. # >65    string        CIRC        (simulated circuit)
  5223. # >65    string        DRWG        (MacDraw)
  5224. # >65    string        EPSF        (Encapsulated PostScript)
  5225. # >65    string        FFIL        (font suitcase)
  5226. # >65    string        FKEY        (function key)
  5227. # >65    string        FNDR        (Macintosh Finder)
  5228. # >65    string        GIFf        (GIF image)
  5229. # >65    string        Gzip        (GNU gzip)
  5230. # >65    string        INIT        (system extension)
  5231. # >65    string        LIB\         (library)
  5232. # >65    string        LWFN        (PostScript font)
  5233. # >65    string        MSBC        (Microsoft BASIC)
  5234. # >65    string        PACT        (Compact Pro archive)
  5235. # >65    string        PDF\         (Portable Document Format)
  5236. # >65    string        PICT        (picture)
  5237. # >65    string        PNTG        (MacPaint picture)
  5238. # >65    string        PREF        (preferences)
  5239. # >65    string        PROJ        (Think C project)
  5240. # >65    string        QPRJ        (Think Pascal project)
  5241. # >65    string        SCFL        (Defender scores)
  5242. # >65    string        SCRN        (startup screen)
  5243. # >65    string        SITD        (StuffIt Deluxe)
  5244. # >65    string        SPn3        (SuperPaint)
  5245. # >65    string        STAK        (HyperCard stack)
  5246. # >65    string        Seg\         (StuffIt segment)
  5247. # >65    string        TARF        (Unix tar archive)
  5248. # >65    string        TEXT        (ASCII)
  5249. # >65    string        TIFF        (TIFF image)
  5250. # >65    string        TOVF        (Eudora table of contents)
  5251. # >65    string        WDBN        (Microsoft Word word processor)
  5252. # >65    string        WORD        (MacWrite word processor)
  5253. # >65    string        XLS\         (Microsoft Excel)
  5254. # >65    string        ZIVM        (compress (.Z))
  5255. # >65    string        ZSYS        (Pre-System 7 system file)
  5256. # >65    string        acf3        (Aldus FreeHand)
  5257. # >65    string        cdev        (control panel)
  5258. # >65    string        dfil        (Desk Acessory suitcase)
  5259. # >65    string        libr        (library)
  5260. # >65    string        nX^d        (WriteNow word processor)
  5261. # >65    string        nX^w        (WriteNow dictionary)
  5262. # >65    string        rsrc        (resource)
  5263. # >65    string        scbk        (Scrapbook)
  5264. # >65    string        shlb        (shared library)
  5265. # >65    string        ttro        (SimpleText read-only)
  5266. # >65    string        zsys        (system file)
  5267. # >69    string        x        \b, creator "%4.4s"
  5268. # # Somewhere, Apple has a repository of registered Creator IDs.  These are
  5269. # # just the ones that I happened to have files from and was able to identify.
  5270. # >69    string        8BIM        (Adobe Photoshop)
  5271. # >69    string        ALD3        (PageMaker 3)
  5272. # >69    string        ALD4        (PageMaker 4)
  5273. # >69    string        ALFA        (Alpha editor)
  5274. # >69    string        APLS        (Apple Scanner)
  5275. # >69    string        APSC        (Apple Scanner)
  5276. # >69    string        BRKL        (Brickles)
  5277. # >69    string        BTFT        (BitFont)
  5278. # >69    string        CCL2         (Common Lisp 2)
  5279. # >69    string        CCL\         (Common Lisp)
  5280. # >69    string        CDmo        (The Talking Moose)
  5281. # >69    string        CPCT        (Compact Pro)
  5282. # >69    string        CSOm        (Eudora)
  5283. # >69    string        DMOV        (Font/DA Mover)
  5284. # >69    string        DSIM        (DigSim)
  5285. # >69    string        EDIT        (Macintosh Edit)
  5286. # >69    string        ERIK        (Macintosh Finder)
  5287. # >69    string        EXTR        (self-extracting archive)
  5288. # >69    string        Gzip        (GNU gzip)
  5289. # >69    string        KAHL        (Think C)
  5290. # >69    string        LWFU        (LaserWriter Utility)
  5291. # >69    string        LZIV        (compress)
  5292. # >69    string        MACA        (MacWrite)
  5293. # >69    string        MACS        (Macintosh operating system)
  5294. # >69    string        MAcK        (MacKnowledge terminal emulator)
  5295. # >69    string        MLND        (Defender)
  5296. # >69    string        MPNT        (MacPaint)
  5297. # >69    string        MSBB        (Microsoft BASIC (binary))
  5298. # >69    string        MSWD        (Microsoft Word)
  5299. # >69    string        NCSA        (NCSA Telnet)
  5300. # >69    string        PJMM        (Think Pascal)
  5301. # >69    string        PSAL        (Hunt the Wumpus)
  5302. # >69    string        PSI2        (Apple File Exchange)
  5303. # >69    string        R*ch        (BBEdit)
  5304. # >69    string        RMKR        (Resource Maker)
  5305. # >69    string        RSED        (Resource Editor)
  5306. # >69    string        Rich        (BBEdit)
  5307. # >69    string        SIT!        (StuffIt)
  5308. # >69    string        SPNT        (SuperPaint)
  5309. # >69    string        Unix        (NeXT Mac filesystem)
  5310. # >69    string        VIM!        (Vim editor)
  5311. # >69    string        WILD        (HyperCard)
  5312. # >69    string        XCEL        (Microsoft Excel)
  5313. # >69    string        aCa2        (Fontographer)
  5314. # >69    string        aca3        (Aldus FreeHand)
  5315. # >69    string        dosa        (Macintosh MS-DOS file system)
  5316. # >69    string        movr        (Font/DA Mover)
  5317. # >69    string        nX^n        (WriteNow)
  5318. # >69    string        pdos        (Apple ProDOS file system)
  5319. # >69    string        scbk        (Scrapbook)
  5320. # >69    string        ttxt        (SimpleText)
  5321. # >69    string        ufox        (Foreign File Access)
  5322.  
  5323. # Just in case...
  5324.  
  5325. 102    string        mBIN        MacBinary III data with surprising version number
  5326.  
  5327. # sas magic from Bruce Foster (bef@nwu.edu)
  5328. #
  5329. #0    string        SAS        SAS
  5330. #>8    string        x        %s
  5331. 0    string        SAS        SAS
  5332. >24    string        DATA        data file
  5333. >24    string        CATALOG        catalog
  5334. >24    string        INDEX        data file index
  5335. >24    string        VIEW        data view
  5336. # sas 7+ magic from Reinhold Koch (reinhold.koch@roche.com)
  5337. #
  5338. 0x54    string          SAS             SAS 7+
  5339. >0x9C   string          DATA            data file
  5340. >0x9C   string          CATALOG         catalog
  5341. >0x9C   string          INDEX           data file index
  5342. >0x9C   string          VIEW            data view
  5343.  
  5344. # spss magic for SPSS system and portable files, 
  5345. #     from Bruce Foster (bef@nwu.edu).
  5346.  
  5347. 0    long        0xc1e2c3c9    SPSS Portable File
  5348. >40    string         x        %s
  5349.  
  5350. 0    string        $FL2        SPSS System File
  5351. >24    string        x        %s
  5352.  
  5353. # Macintosh filesystem data
  5354. # From "Tom N Harris" <telliamed@mac.com>
  5355. # Fixed HFS+ and Partition map magic: Ethan Benson <erbenson@alaska.net>
  5356. # The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
  5357. # entries depend on the data arithmetic added after v.35
  5358. # There's also some Pascal strings in here, ditto...
  5359.  
  5360. # The boot block signature, according to IM:Files, is 
  5361. # "for HFS volumes, this field always contains the value 0x4C4B."
  5362. # But if this is true for MFS or HFS+ volumes, I don't know.
  5363. # Alternatively, the boot block is supposed to be zeroed if it's
  5364. # unused, so a simply >0 should suffice.
  5365.  
  5366. 0x400    beshort            0xD2D7        Macintosh MFS data
  5367. >0    beshort            0x4C4B        (bootable)
  5368. >0x40a    beshort            &0x8000        (locked)
  5369. >0x402    beldate-0x7C25B080    x        created: %s,
  5370. >0x406    beldate-0x7C25B080    >0        last backup: %s,
  5371. >0x414    belong            x        block size: %d,
  5372. >0x412    beshort            x        number of blocks: %d,
  5373. >0x424    pstring            x        volume name: %s
  5374.  
  5375. # "BD" is has many false positives
  5376. #0x400    beshort            0x4244        Macintosh HFS data
  5377. #>0    beshort            0x4C4B        (bootable)
  5378. #>0x40a    beshort            &0x8000        (locked)
  5379. #>0x40a    beshort            ^0x0100        (mounted)
  5380. #>0x40a    beshort            &0x0200        (spared blocks)
  5381. #>0x40a    beshort            &0x0800        (unclean)
  5382. #>0x47C    beshort            0x482B        (Embedded HFS+ Volume)
  5383. #>0x402    beldate-0x7C25B080    x        created: %s,
  5384. #>0x406    beldate-0x7C25B080    x        last modified: %s,
  5385. #>0x440    beldate-0x7C25B080    >0        last backup: %s,
  5386. #>0x414    belong            x        block size: %d,
  5387. #>0x412    beshort            x        number of blocks: %d,
  5388. #>0x424    pstring            x        volume name: %s
  5389.  
  5390. 0x400    beshort            0x482B        Macintosh HFS Extended
  5391. >&0    beshort            x        version %d data
  5392. >0    beshort            0x4C4B        (bootable)
  5393. >0x404    belong            ^0x00000100    (mounted)
  5394. >&2    belong            &0x00000200    (spared blocks)
  5395. >&2    belong            &0x00000800    (unclean)
  5396. >&2    belong            &0x00008000    (locked)
  5397. >&6    string            x        last mounted by: '%.4s',
  5398. # really, that should be treated as a belong and we print a string
  5399. # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
  5400. >&14    beldate-0x7C25B080    x        created: %s,
  5401. # only the creation date is local time, all other timestamps in HFS+ are UTC.
  5402. >&18    bedate-0x7C25B080    x        last modified: %s,
  5403. >&22    bedate-0x7C25B080    >0        last backup: %s,
  5404. >&26    bedate-0x7C25B080    >0        last checked: %s,
  5405. >&38    belong            x        block size: %d,
  5406. >&42    belong            x        number of blocks: %d,
  5407. >&46    belong            x        free blocks: %d
  5408.  
  5409. # I don't think this is really necessary since it doesn't do much and 
  5410. # anything with a valid driver descriptor will also have a valid
  5411. # partition map
  5412. #0        beshort        0x4552        Apple Device Driver data
  5413. #>&24        beshort        =1        \b, MacOS
  5414.  
  5415. # Is that the partition type a cstring or a pstring? Well, IM says "strings 
  5416. # shorter than 32 bytes must be terminated with NULL" so I'll treat it as a 
  5417. # cstring. Of course, partitions can contain more than four entries, but 
  5418. # what're you gonna do?
  5419. 0x200        beshort        0x504D        Apple Partition data
  5420. >0x2        beshort        x        block size: %d,
  5421. >0x230        string        x        first type: %s,
  5422. >0x210        string        x        name: %s,
  5423. >0x254        belong        x        number of blocks: %d,
  5424. >0x400        beshort        0x504D        
  5425. >>0x430        string        x        second type: %s,
  5426. >>0x410        string        x        name: %s,
  5427. >>0x454        belong        x        number of blocks: %d,
  5428. >>0x800        beshort        0x504D        
  5429. >>>0x830    string        x        third type: %s,
  5430. >>>0x810    string        x        name: %s,
  5431. >>>0x854    belong        x        number of blocks: %d,
  5432. >>>0xa00    beshort        0x504D        
  5433. >>>>0xa30    string        x        fourth type: %s,
  5434. >>>>0xa10    string        x        name: %s,
  5435. >>>>0xa54    belong        x        number of blocks: %d
  5436. # AFAIK, only the signature is different
  5437. 0x200        beshort        0x5453        Apple Old Partition data
  5438. >0x2        beshort        x        block size: %d,
  5439. >0x230        string        x        first type: %s,
  5440. >0x210        string        x        name: %s,
  5441. >0x254        belong        x        number of blocks: %d,
  5442. >0x400        beshort        0x504D        
  5443. >>0x430        string        x        second type: %s,
  5444. >>0x410        string        x        name: %s,
  5445. >>0x454        belong        x        number of blocks: %d,
  5446. >>0x800        beshort        0x504D        
  5447. >>>0x830    string        x        third type: %s,
  5448. >>>0x810    string        x        name: %s,
  5449. >>>0x854    belong        x        number of blocks: %d,
  5450. >>>0xa00    beshort        0x504D        
  5451. >>>>0xa30    string        x        fourth type: %s,
  5452. >>>>0xa10    string        x        name: %s,
  5453. >>>>0xa54    belong        x        number of blocks: %d
  5454.  
  5455. #------------------------------------------------------------------------------
  5456. # magic:  file(1) magic for magic files
  5457. #
  5458. 0    string        #\ Magic    magic text file for file(1) cmd
  5459. 0    lelong        0xF11E041C    magic binary file for file(1) cmd
  5460. >4    lelong        x        (version %d) (little endian)
  5461. 0    belong        0xF11E041C    magic binary file for file(1) cmd
  5462. >4    belong        x        (version %d) (big endian)
  5463.  
  5464. #------------------------------------------------------------------------------
  5465. # mail.news:  file(1) magic for mail and news
  5466. #
  5467. # Unfortunately, saved netnews also has From line added in some news software.
  5468. #0    string        From         mail text
  5469. # There are tests to ascmagic.c to cope with mail and news.
  5470. 0    string        Relay-Version:     old news text
  5471. 0    string        #!\ rnews    batched news text
  5472. 0    string        N#!\ rnews    mailed, batched news text
  5473. 0    string        Forward\ to     mail forwarding text
  5474. 0    string        Pipe\ to     mail piping text
  5475. 0    string        Return-Path:    smtp mail text
  5476. 0    string        Path:        news text
  5477. 0    string        Xref:        news text
  5478. 0    string        From:        news or mail text
  5479. 0    string        Article     saved news text
  5480. 0    string        BABYL        Emacs RMAIL text
  5481. 0    string        Received:    RFC 822 mail text
  5482. 0    string        MIME-Version:    MIME entity text
  5483. #0    string        Content-    MIME entity text
  5484.  
  5485. # TNEF files...
  5486. 0    lelong        0x223E9F78    Transport Neutral Encapsulation Format
  5487.  
  5488. # From: Kevin Sullivan <ksulliva@psc.edu>
  5489. 0    string        *mbx*        MBX mail folder
  5490.  
  5491. # From: Simon Matter <simon.matter@invoca.ch>
  5492. 0    string        \241\002\213\015skiplist\ file\0\0\0    Cyrus skiplist DB
  5493.  
  5494. # JAM(mbp) Fidonet message area databases
  5495. # JHR file
  5496. 0    string    JAM\0            JAM message area header file
  5497. >12    leshort >0            (%d messages)
  5498.  
  5499. # Squish Fidonet message area databases
  5500. # SQD file (requires at least one message in the area)
  5501. 256    leshort    0xAFAE4453        Squish message area data file
  5502. >4    leshort    >0            (%d messages)
  5503.  
  5504. #------------------------------------------------------------------------------
  5505. # maple:  file(1) magic for maple files
  5506. # "H. Nanosecond" <aldomel@ix.netcom.com>
  5507. # Maple V release 4, a multi-purpose math program
  5508. #
  5509.  
  5510. # maple library .lib
  5511. 0    string    \000MVR4\nI    MapleVr4 library
  5512.  
  5513. # .ind
  5514. # no magic for these :-(
  5515. # they are compiled indexes for maple files
  5516.  
  5517. # .hdb 
  5518. 0    string    \000\004\000\000    Maple help database
  5519.  
  5520. # .mhp
  5521. # this has the form <PACKAGE=name>
  5522. 0    string    \<PACKAGE=    Maple help file
  5523. 0    string    \<HELP\ NAME=    Maple help file
  5524. 0    string    \n\<HELP\ NAME=    Maple help file with extra carriage return at start (yuck)
  5525. 0    string    #\ Newton    Maple help file, old style
  5526. 0    string    #\ daub    Maple help file, old style
  5527. 0    string    #===========    Maple help file, old style
  5528.  
  5529. # .mws
  5530. 0    string    \000\000\001\044\000\221    Maple worksheet
  5531. #this is anomalous
  5532. 0    string    WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000    Maple worksheet, but weird
  5533. # this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
  5534. # that is {VERSION major_version miunor_version computer_type version_string}
  5535. 0    string    {VERSION\     Maple worksheet
  5536. >9    string    >\0    version %.1s.
  5537. >>10    string
  5538. >>>11    string    >\0    %.1s
  5539.  
  5540. # .mps
  5541. 0    string    \0\0\001$    Maple something
  5542. # from byte 4 it is either 'nul E' or 'soh R'
  5543. # I think 'nul E' means a file that was saved as  a different name
  5544. # a sort of revision marking
  5545. # 'soh R' means new 
  5546. >4    string    \000\105    An old revision
  5547. >4    string    \001\122    The latest save
  5548.  
  5549. # .mpl
  5550. # some of these are the same as .mps above
  5551. #0000000 000 000 001 044 000 105 same as .mps
  5552. #0000000 000 000 001 044 001 122 same as .mps
  5553.  
  5554. 0    string    #\n##\ <SHAREFILE=    Maple something
  5555. 0    string    \n#\n##\ <SHAREFILE=    Maple something
  5556. 0    string    ##\ <SHAREFILE=    Maple something
  5557. 0    string    #\r##\ <SHAREFILE=    Maple something
  5558. 0    string    \r#\r##\ <SHAREFILE=    Maple something
  5559. 0    string    #\ \r##\ <DESCRIBE>    Maple something anomalous.
  5560.  
  5561. #------------------------------------------------------------------------------
  5562. # mathematica:  file(1) magic for mathematica files
  5563. # "H. Nanosecond" <aldomel@ix.netcom.com>
  5564. # Mathematica a multi-purpose math program
  5565. # versions 2.2 and 3.0
  5566.  
  5567. #mathematica .mb
  5568. 0    string    \064\024\012\000\035\000\000\000    Mathematica version 2 notebook
  5569. 0    string    \064\024\011\000\035\000\000\000    Mathematica version 2 notebook
  5570.  
  5571. # .ma
  5572. # multiple possibilites:
  5573.  
  5574. 0    string    (*^\n\n::[\011frontEndVersion\ =\     Mathematica notebook
  5575. #>41    string    >\0    %s
  5576.  
  5577. #0    string    (*^\n\n::[\011palette    Mathematica notebook version 2.x
  5578.  
  5579. #0    string    (*^\n\n::[\011Information    Mathematica notebook version 2.x
  5580. #>675    string    >\0    %s #doesn't work well
  5581.  
  5582. # there may be 'cr' instread of 'nl' in some does this matter?
  5583.  
  5584. # generic:
  5585. 0    string    (*^\r\r::[\011    Mathematica notebook version 2.x
  5586. 0    string    \(\*\^\r\n\r\n\:\:\[\011    Mathematica notebook version 2.x
  5587. 0    string    (*^\015            Mathematica notebook version 2.x
  5588. 0    string    (*^\n\r\n\r::[\011    Mathematica notebook version 2.x
  5589. 0    string    (*^\r::[\011    Mathematica notebook version 2.x
  5590. 0    string    (*^\r\n::[\011    Mathematica notebook version 2.x
  5591. 0    string    (*^\n\n::[\011    Mathematica notebook version 2.x
  5592. 0    string    (*^\n::[\011    Mathematica notebook version 2.x
  5593.  
  5594.  
  5595. # Mathematica .mx files
  5596.  
  5597. #0    string    (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)    Mathematica binary file
  5598. 0    string    (*This\ is\ a\ Mathematica\ binary\     Mathematica binary file
  5599. #>71    string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000    
  5600. # >71... is optional
  5601. >88    string    >\0    from %s
  5602.  
  5603.  
  5604. # Mathematica files PBF:
  5605. # 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
  5606. 0    string    MMAPBF\000\001\000\000\000\203\000\001\000    Mathematica PBF (fonts I think)
  5607.  
  5608. # .ml files  These are menu resources I think
  5609. # these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
  5610. # how to put that into a magic rule?
  5611. 4    string    \ A~    MAthematica .ml file
  5612.  
  5613. # .nb files
  5614. #too long 0    string    (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook    Mathematica 3.0 notebook
  5615. 0    string    (***********************    Mathematica 3.0 notebook
  5616.  
  5617. # other (* matches it is a comment start in these langs
  5618. 0    string    (*    Mathematica, or Pascal,  Modula-2 or 3 code text
  5619.  
  5620. #########################
  5621. # MatLab v5
  5622. 0       string  MATLAB  Matlab v5 mat-file
  5623. >126    short   0x494d  (big endian)
  5624. >>124   beshort x       version 0x%04x
  5625. >126    short   0x4d49  (little endian)
  5626. >>124   leshort x       version 0x%04x
  5627.  
  5628. #------------------------------------------------------------------------------
  5629. # Mavroyanopoulos Nikos <nmav@hellug.gr>
  5630. # mcrypt:   file(1) magic for mcrypt 2.2.x;
  5631. 0    string        \0m\3        mcrypt 2.5 encrypted data,
  5632. >4    string        >\0        algorithm: %s,
  5633. >>&1    leshort        >0        keysize: %d bytes,
  5634. >>>&0    string        >\0        mode: %s,
  5635.  
  5636. 0    string        \0m\2        mcrypt 2.2 encrypted data,
  5637. >3    byte        0        algorithm: blowfish-448,
  5638. >3    byte        1        algorithm: DES,
  5639. >3    byte        2        algorithm: 3DES,
  5640. >3    byte        3        algorithm: 3-WAY,
  5641. >3    byte        4        algorithm: GOST,
  5642. >3    byte        6        algorithm: SAFER-SK64,
  5643. >3    byte        7        algorithm: SAFER-SK128,
  5644. >3    byte        8        algorithm: CAST-128,
  5645. >3    byte        9        algorithm: xTEA,
  5646. >3    byte        10        algorithm: TWOFISH-128,
  5647. >3    byte        11        algorithm: RC2,
  5648. >3    byte        12        algorithm: TWOFISH-192,
  5649. >3    byte        13        algorithm: TWOFISH-256,
  5650. >3    byte        14        algorithm: blowfish-128,
  5651. >3    byte        15        algorithm: blowfish-192,
  5652. >3    byte        16        algorithm: blowfish-256,
  5653. >3    byte        100        algorithm: RC6,
  5654. >3    byte        101        algorithm: IDEA,
  5655. >4    byte        0        mode: CBC,
  5656. >4    byte        1        mode: ECB,
  5657. >4    byte        2        mode: CFB,
  5658. >4    byte        3        mode: OFB,
  5659. >4    byte        4        mode: nOFB,
  5660. >5    byte        0        keymode: 8bit
  5661. >5    byte        1        keymode: 4bit
  5662. >5    byte        2        keymode: SHA-1 hash
  5663. >5    byte        3        keymode: MD5 hash
  5664. #------------------------------------------------------------------------------
  5665. # mime:  file(1) magic for MIME encoded files
  5666. #
  5667. 0    string        Content-Type:\
  5668. >14    string        >\0        %s
  5669. 0    string        Content-Type:
  5670. >13    string        >\0        %s
  5671.  
  5672. #------------------------------------------------------------------------------
  5673. # mips:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
  5674. #                         Dec Ultrix (MIPS)
  5675. # all of SGI's *current* machines and OSes run in big-endian mode on the
  5676. # MIPS machines, as far as I know.
  5677. #
  5678. # XXX - what is the blank "-" line?
  5679. #
  5680. # kbd file definitions
  5681. 0    string    kbd!map        kbd map file
  5682. >8    byte    >0        Ver %d:
  5683. >10    short    >0        with %d table(s)
  5684. 0    belong    0407        old SGI 68020 executable
  5685. 0    belong    0410        old SGI 68020 pure executable
  5686. 0    beshort    0x8765        disk quotas file
  5687. 0    beshort    0x0506        IRIS Showcase file
  5688. >2    byte    0x49        -
  5689. >3    byte    x        - version %ld
  5690. 0    beshort    0x0226        IRIS Showcase template
  5691. >2    byte    0x63        -
  5692. >3    byte    x        - version %ld
  5693. 0    belong    0x5343464d    IRIS Showcase file
  5694. >4    byte    x        - version %ld
  5695. 0    belong    0x5443464d    IRIS Showcase template
  5696. >4    byte    x        - version %ld
  5697. 0    belong    0xdeadbabe    IRIX Parallel Arena
  5698. >8    belong    >0        - version %ld
  5699. #
  5700. 0    beshort    0x0160        MIPSEB ECOFF executable
  5701. >20    beshort    0407        (impure)
  5702. >20    beshort    0410        (swapped)
  5703. >20    beshort    0413        (paged)
  5704. >8    belong    >0        not stripped
  5705. >8    belong    0        stripped
  5706. >22    byte    x        - version %ld
  5707. >23    byte    x        .%ld
  5708. #
  5709. 0    beshort    0x0162        MIPSEL-BE ECOFF executable
  5710. >20    beshort    0407        (impure)
  5711. >20    beshort    0410        (swapped)
  5712. >20    beshort    0413        (paged)
  5713. >8    belong    >0        not stripped
  5714. >8    belong    0        stripped
  5715. >23    byte    x        - version %d
  5716. >22    byte    x        .%ld
  5717. #
  5718. 0    beshort    0x6001        MIPSEB-LE ECOFF executable
  5719. >20    beshort    03401        (impure)
  5720. >20    beshort    04001        (swapped)
  5721. >20    beshort    05401        (paged)
  5722. >8    belong    >0        not stripped
  5723. >8    belong    0        stripped
  5724. >23    byte    x        - version %d
  5725. >22    byte    x        .%ld
  5726. #
  5727. 0    beshort    0x6201        MIPSEL ECOFF executable
  5728. >20    beshort    03401        (impure)
  5729. >20    beshort    04001        (swapped)
  5730. >20    beshort    05401        (paged)
  5731. >8    belong    >0        not stripped
  5732. >8    belong    0        stripped
  5733. >23    byte    x        - version %ld
  5734. >22    byte    x        .%ld
  5735. #
  5736. # MIPS 2 additions
  5737. #
  5738. 0    beshort    0x0163        MIPSEB MIPS-II ECOFF executable
  5739. >20    beshort    0407        (impure)
  5740. >20    beshort    0410        (swapped)
  5741. >20    beshort    0413        (paged)
  5742. >8    belong    >0        not stripped
  5743. >8    belong    0        stripped
  5744. >22    byte    x        - version %ld
  5745. >23    byte    x        .%ld
  5746. #
  5747. 0    beshort    0x0166        MIPSEL-BE MIPS-II ECOFF executable
  5748. >20    beshort    0407        (impure)
  5749. >20    beshort    0410        (swapped)
  5750. >20    beshort    0413        (paged)
  5751. >8    belong    >0        not stripped
  5752. >8    belong    0        stripped
  5753. >22    byte    x        - version %ld
  5754. >23    byte    x        .%ld
  5755. #
  5756. 0    beshort    0x6301        MIPSEB-LE MIPS-II ECOFF executable
  5757. >20    beshort    03401        (impure)
  5758. >20    beshort    04001        (swapped)
  5759. >20    beshort    05401        (paged)
  5760. >8    belong    >0        not stripped
  5761. >8    belong    0        stripped
  5762. >23    byte    x        - version %ld
  5763. >22    byte    x        .%ld
  5764. #
  5765. 0    beshort    0x6601        MIPSEL MIPS-II ECOFF executable
  5766. >20    beshort    03401        (impure)
  5767. >20    beshort    04001        (swapped)
  5768. >20    beshort    05401        (paged)
  5769. >8    belong    >0        not stripped
  5770. >8    belong    0        stripped
  5771. >23    byte    x        - version %ld
  5772. >22    byte    x        .%ld
  5773. #
  5774. # MIPS 3 additions
  5775. #
  5776. 0    beshort    0x0140        MIPSEB MIPS-III ECOFF executable
  5777. >20    beshort    0407        (impure)
  5778. >20    beshort    0410        (swapped)
  5779. >20    beshort    0413        (paged)
  5780. >8    belong    >0        not stripped
  5781. >8    belong    0        stripped
  5782. >22    byte    x        - version %ld
  5783. >23    byte    x        .%ld
  5784. #
  5785. 0    beshort    0x0142        MIPSEL-BE MIPS-III ECOFF executable
  5786. >20    beshort    0407        (impure)
  5787. >20    beshort    0410        (swapped)
  5788. >20    beshort    0413        (paged)
  5789. >8    belong    >0        not stripped
  5790. >8    belong    0        stripped
  5791. >22    byte    x        - version %ld
  5792. >23    byte    x        .%ld
  5793. #
  5794. 0    beshort    0x4001        MIPSEB-LE MIPS-III ECOFF executable
  5795. >20    beshort    03401        (impure)
  5796. >20    beshort    04001        (swapped)
  5797. >20    beshort    05401        (paged)
  5798. >8    belong    >0        not stripped
  5799. >8    belong    0        stripped
  5800. >23    byte    x        - version %ld
  5801. >22    byte    x        .%ld
  5802. #
  5803. 0    beshort    0x4201        MIPSEL MIPS-III ECOFF executable
  5804. >20    beshort    03401        (impure)
  5805. >20    beshort    04001        (swapped)
  5806. >20    beshort    05401        (paged)
  5807. >8    belong    >0        not stripped
  5808. >8    belong    0        stripped
  5809. >23    byte    x        - version %ld
  5810. >22    byte    x        .%ld
  5811. #
  5812. 0    beshort    0x180        MIPSEB Ucode
  5813. 0    beshort    0x182        MIPSEL-BE Ucode
  5814. # 32bit core file
  5815. 0    belong    0xdeadadb0    IRIX core dump
  5816. >4    belong    1        of
  5817. >16    string    >\0        '%s'
  5818. # 64bit core file
  5819. 0    belong    0xdeadad40    IRIX 64-bit core dump
  5820. >4    belong    1        of
  5821. >16    string    >\0        '%s'
  5822. # N32bit core file
  5823. 0       belong    0xbabec0bb    IRIX N32 core dump
  5824. >4      belong    1               of
  5825. >16     string    >\0             '%s'
  5826. # New style crash dump file
  5827. 0    string    \x43\x72\x73\x68\x44\x75\x6d\x70    IRIX vmcore dump of
  5828. >36    string    >\0                    '%s'
  5829. # Trusted IRIX info
  5830. 0    string    SGIAUDIT    SGI Audit file
  5831. >8    byte    x        - version %d
  5832. >9    byte    x        .%ld
  5833. #
  5834. 0    string    WNGZWZSC    Wingz compiled script
  5835. 0    string    WNGZWZSS    Wingz spreadsheet
  5836. 0    string    WNGZWZHP    Wingz help file
  5837. #
  5838. 0    string    \#Inventor V    IRIS Inventor 1.0 file
  5839. 0    string    \#Inventor V2    Open Inventor 2.0 file
  5840. # GLF is OpenGL stream encoding
  5841. 0    string    glfHeadMagic();        GLF_TEXT
  5842. 4    belong    0x7d000000        GLF_BINARY_LSB_FIRST
  5843. 4    belong    0x0000007d        GLF_BINARY_MSB_FIRST
  5844. # GLS is OpenGL stream encoding; GLS is the successor of GLF
  5845. 0    string    glsBeginGLS(        GLS_TEXT
  5846. 4    belong    0x10000000        GLS_BINARY_LSB_FIRST
  5847. 4    belong    0x00000010        GLS_BINARY_MSB_FIRST
  5848.  
  5849. #------------------------------------------------------------------------------
  5850. # mirage:  file(1) magic for Mirage executables
  5851. #
  5852. # XXX - byte order?
  5853. #
  5854. 0    long    31415        Mirage Assembler m.out executable
  5855. #-----------------------------------------------------------------------------
  5856. # misctools:  file(1) magic for miscelanous UNIX tools.
  5857. #
  5858. 0    string        %%!!        X-Post-It-Note text
  5859. 0    string          BEGIN:VCALENDAR         vCalendar calendar file
  5860.  
  5861. #------------------------------------------------------------------------------
  5862. # mkid:  file(1) magic for mkid(1) databases
  5863. #
  5864. # ID is the binary tags database produced by mkid(1).
  5865. #
  5866. # XXX - byte order?
  5867. #
  5868. 0    string        \311\304    ID tags data
  5869. >2    short        >0        version %d
  5870.  
  5871. #------------------------------------------------------------------------------
  5872. # mlssa: file(1) magic for MLSSA datafiles
  5873. #
  5874. 0        lelong        0xffffabcd    MLSSA datafile,
  5875. >4        leshort        x        algorithm %d,
  5876. >10        lelong        x        %d samples
  5877.  
  5878. #------------------------------------------------------------------------------
  5879. # mmdf:  file(1) magic for MMDF mail files
  5880. #
  5881. 0    string    \001\001\001\001    MMDF mailbox
  5882. #------------------------------------------------------------------------------
  5883. # modem:  file(1) magic for modem programs
  5884. #
  5885. # From: Florian La Roche <florian@knorke.saar.de>
  5886. 4    string        Research,    Digifax-G3-File
  5887. >29    byte        1        , fine resolution
  5888. >29    byte        0        , normal resolution
  5889.  
  5890. 0    short        0x0100        raw G3 data, byte-padded
  5891. 0    short        0x1400        raw G3 data
  5892. #
  5893. # Magic data for vgetty voice formats
  5894. # (Martin Seine & Marc Eberhard)
  5895.  
  5896. #
  5897. # raw modem data version 1
  5898. #
  5899. 0    string    RMD1      raw modem data
  5900. >4   string    >\0       (%s /
  5901. >20  short     >0        compression type 0x%04x)
  5902.  
  5903. #
  5904. # portable voice format 1
  5905. #
  5906. 0    string    PVF1\n         portable voice format
  5907. >5   string    >\0       (binary %s)
  5908.  
  5909. #
  5910. # portable voice format 2
  5911. #
  5912. 0    string    PVF2\n         portable voice format
  5913. >5   string >\0          (ascii %s)
  5914.  
  5915.  
  5916. #------------------------------------------------------------------------------
  5917. # motorola:  file(1) magic for Motorola 68K and 88K binaries
  5918. #
  5919. # 68K
  5920. #
  5921. 0    beshort        0520        mc68k COFF
  5922. >18    beshort        ^00000020    object
  5923. >18    beshort        &00000020    executable
  5924. >12    belong        >0        not stripped
  5925. >168    string        .lowmem        Apple toolbox
  5926. >20    beshort        0407        (impure)
  5927. >20    beshort        0410        (pure)
  5928. >20    beshort        0413        (demand paged)
  5929. >20    beshort        0421        (standalone)
  5930. 0    beshort        0521        mc68k executable (shared)
  5931. >12    belong        >0        not stripped
  5932. 0    beshort        0522        mc68k executable (shared demand paged)
  5933. >12    belong        >0        not stripped
  5934. #
  5935. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  5936. #
  5937. 0    beshort        0554        68K BCS executable
  5938. #
  5939. # 88K
  5940. #
  5941. # Motorola/88Open BCS
  5942. #
  5943. 0    beshort        0555        88K BCS executable
  5944. #
  5945. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  5946. 0   string      S0          Motorola S-Record; binary data in text format
  5947.  
  5948. # ATARI ST relocatable PRG
  5949. #
  5950. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001
  5951. # (according to Roland Waldi, Oct 21, 1987)
  5952. # besides the magic 0x601a, the text segment size is checked to be
  5953. # not larger than 1 MB (which is a lot on ST).
  5954. # The additional 0x601b distinction I took from Doug Lee's magic.
  5955. 0    belong&0xFFFFFFF0    0x601A0000    Atari ST M68K contiguous executable
  5956. >2    belong            x        (txt=%ld,
  5957. >6    belong            x        dat=%ld,
  5958. >10    belong            x        bss=%ld,
  5959. >14    belong            x        sym=%ld)
  5960. 0    belong&0xFFFFFFF0    0x601B0000    Atari ST M68K non-contig executable
  5961. >2    belong            x        (txt=%ld,
  5962. >6    belong            x        dat=%ld,
  5963. >10    belong            x        bss=%ld,
  5964. >14    belong            x        sym=%ld)
  5965.  
  5966. # Atari ST/TT... program format (sent by Wolfram Kleff <kleff@cs.uni-bonn.de>)
  5967. 0       beshort         0x601A          Atari 68xxx executable,
  5968. >2      belong          x               text len %lu,
  5969. >6      belong          x               data len %lu,
  5970. >10     belong          x               BSS len %lu,
  5971. >14     belong          x               symboltab len %lu,
  5972. >18     belong          0
  5973. >22     belong          &0x01           fastload flag,
  5974. >22     belong          &0x02           may be loaded to alternate RAM,
  5975. >22     belong          &0x04           malloc may be from alternate RAM,
  5976. >22     belong          x               flags: 0x%lX,
  5977. >26     beshort         0               no relocation tab
  5978. >26     beshort         !0              + relocation tab
  5979. >30     string          SFX             [Self-Extracting LZH SFX archive]
  5980. >38     string          SFX             [Self-Extracting LZH SFX archive]
  5981. >44     string          ZIP!            [Self-Extracting ZIP SFX archive]
  5982.  
  5983. 0       beshort         0x0064          Atari 68xxx CPX file
  5984. >8      beshort         x               (version %04lx)
  5985.  
  5986. #------------------------------------------------------------------------------
  5987. # msdos:  file(1) magic for MS-DOS files
  5988. #
  5989.  
  5990. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  5991. 0    string/c    @echo\ off    MS-DOS batch file text
  5992.  
  5993. # XXX - according to Microsoft's spec, at an offset of 0x3c in a
  5994. # PE-format executable is the offset in the file of the PE header;
  5995. # unfortunately, that's a little-endian offset, and there's no way
  5996. # to specify an indirect offset with a specified byte order.
  5997. # So, for now, we assume the standard MS-DOS stub, which puts the
  5998. # PE header at 0x80 = 128.
  5999. #
  6000. # Required OS version and subsystem version were 4.0 on some NT 3.51
  6001. # executables built with Visual C++ 4.0, so it's not clear that
  6002. # they're interesting.  The user version was 0.0, but there's
  6003. # probably some linker directive to set it.  The linker version was
  6004. # 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
  6005. #
  6006. 128    string        PE\0\0    MS Windows PE
  6007. >150    leshort&0x0100    >0    32-bit
  6008. >132    leshort        0x0    unknown processor
  6009. >132    leshort        0x14c    Intel 80386
  6010. >132    leshort        0x166    MIPS R4000
  6011. >132    leshort        0x184    Alpha
  6012. >132    leshort        0x268    Motorola 68000
  6013. >132    leshort        0x1f0    PowerPC
  6014. >132    leshort        0x290    PA-RISC
  6015. >148    leshort        >27
  6016. >>220    leshort        0    unknown subsystem
  6017. >>220    leshort        1    native
  6018. >>220    leshort        2    GUI
  6019. >>220    leshort        3    console
  6020. >>220    leshort        7    POSIX
  6021. >150    leshort&0x2000    =0    executable
  6022. #>>136    ledate        x    stamp %s,
  6023. >>150    leshort&0x0001    >0    not relocatable
  6024. #>>150    leshort&0x0004    =0    with line numbers,
  6025. #>>150    leshort&0x0008    =0    with local symbols,
  6026. #>>150    leshort&0x0200    =0    with debug symbols,
  6027. >>150    leshort&0x1000    >0    system file
  6028. #>>148    leshort        >0
  6029. #>>>154    byte        x    linker %d
  6030. #>>>155    byte        x    \b.%d,
  6031. #>>148    leshort        >27
  6032. #>>>192    leshort        x    requires OS %d
  6033. #>>>194    leshort        x    \b.%d,
  6034. #>>>196    leshort        x    user version %d
  6035. #>>>198    leshort        x    \b.%d,
  6036. #>>>200    leshort        x    subsystem version %d
  6037. #>>>202    leshort        x    \b.%d,
  6038. >150    leshort&0x2000    >0    DLL
  6039. #>>136    ledate        x    stamp %s,
  6040. >>150    leshort&0x0001    >0    not relocatable
  6041. #>>150    leshort&0x0004    =0    with line numbers,
  6042. #>>150    leshort&0x0008    =0    with local symbols,
  6043. #>>150    leshort&0x0200    =0    with debug symbols,
  6044. >>150    leshort&0x1000    >0    system file
  6045. #>>148    leshort        >0
  6046. #>>>154    byte        x    linker %d
  6047. #>>>155    byte        x    \b.%d,
  6048. #>>148    leshort        >27
  6049. #>>>192    leshort        x    requires OS %d
  6050. #>>>194    leshort        x    \b.%d,
  6051. #>>>196    leshort        x    user version %d
  6052. #>>>198    leshort        x    \b.%d,
  6053. #>>>200    leshort        x    subsystem version %d
  6054. #>>>202    leshort        x    \b.%d,
  6055. 0    leshort        0x14c    MS Windows COFF Intel 80386 object file
  6056. #>4    ledate        x    stamp %s
  6057. 0    leshort        0x166    MS Windows COFF MIPS R4000 object file
  6058. #>4    ledate        x    stamp %s
  6059. 0    leshort        0x184    MS Windows COFF Alpha object file
  6060. #>4    ledate        x    stamp %s
  6061. 0    leshort        0x268    MS Windows COFF Motorola 68000 object file
  6062. #>4    ledate        x    stamp %s
  6063. 0    leshort        0x1f0    MS Windows COFF PowerPC object file
  6064. #>4    ledate        x    stamp %s
  6065. 0    leshort        0x290    MS Windows COFF PA-RISC object file
  6066. #>4    ledate        x    stamp %s
  6067.  
  6068. # .EXE formats (Greg Roelofs, newt@uchicago.edu)
  6069. #
  6070. 0    string    MZ        MS-DOS executable (EXE)
  6071. >24    string    @        \b, OS/2 or MS Windows
  6072. >>0xe7    string    LH/2\ Self-Extract    \b, %s
  6073. >>0xe9    string    PKSFX2        \b, %s
  6074. >>122    string    Windows\ self-extracting\ ZIP    \b, %s
  6075. >0x1c    string    RJSX\xff\xff    \b, ARJ SFX
  6076. >0x1c    string    diet\xf9\x9c    \b, diet compressed
  6077. >0x1c    string    LZ09        \b, LZEXE v0.90 compressed
  6078. >0x1c    string    LZ91        \b, LZEXE v0.91 compressed
  6079. >0x1e    string    Copyright\ 1989-1990\ PKWARE\ Inc.    \b, PKSFX
  6080. # JM: 0x1e "PKLITE Copr. 1990-92 PKWARE Inc. All Rights Reserved\7\0\0\0"
  6081. >0x1e    string    PKLITE\ Copr.    \b, %.6s compressed
  6082. >0x24    string    LHa's\ SFX    \b, %.15s
  6083. >0x24    string    LHA's\ SFX    \b, %.15s
  6084. >1638    string    -lh5-        \b, LHa SFX archive v2.13S
  6085. >7195    string    Rar!        \b, RAR self-extracting archive
  6086. #
  6087. # [GRR 950118:  file 3.15 has a buffer-size limitation; offsets bigger than
  6088. #   8161 bytes are ignored.  To make the following entries work, increase
  6089. #   HOWMANY in file.h to 32K at least, and maybe to 70K or more for OS/2,
  6090. #   NT/Win32 and VMS.]
  6091. # [GRR:  some company sells a self-extractor/displayer for image data(!)]
  6092. #
  6093. >11696    string    PK\003\004    \b, PKZIP SFX archive v1.1
  6094. >13297    string    PK\003\004    \b, PKZIP SFX archive v1.93a
  6095. >15588    string    PK\003\004    \b, PKZIP2 SFX archive v1.09
  6096. >15770    string    PK\003\004    \b, PKZIP SFX archive v2.04g
  6097. >28374    string    PK\003\004    \b, PKZIP2 SFX archive v1.02
  6098. #
  6099. # Info-ZIP self-extractors
  6100. #    these are the DOS versions:
  6101. >25115    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  6102. >26331    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  6103. #    these are the OS/2 versions (OS/2 is flagged above):
  6104. >47031    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  6105. >49845    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  6106. #    this is the NT/Win32 version:
  6107. >69120    string    PK\003\004    \b, Info-ZIP NT SFX archive v5.12 w/decryption
  6108. #
  6109. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  6110. >49801    string    \x79\xff\x80\xff\x76\xff    \b, CODEC archive v3.21
  6111. >>49824    leshort        =1            \b, 1 file
  6112. >>49824    leshort        >1            \b, %u files
  6113.  
  6114. # .COM formats (Daniel Quinlan, quinlan@yggdrasil.com)
  6115. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  6116. # but it isn't feasible to match all COM files since there must be at least
  6117. # two dozen different one-byte "magics".
  6118. #0    byte        0xe9        MS-DOS executable (COM)
  6119. #>6    string    SFX\ of\ LHarc    (%s)
  6120. #0    byte        0x8c        MS-DOS executable (COM)
  6121. # 0xeb conflicts with "sequent" magic
  6122. #0    byte        0xeb        MS-DOS executable (COM)
  6123. #0    byte        0xb8        MS-DOS executable (COM)
  6124.  
  6125. # miscellaneous formats
  6126. 0    string        LZ        MS-DOS executable (built-in)
  6127. #0    byte        0xf0        MS-DOS program library data
  6128. #
  6129.  
  6130. #
  6131. # Windows Registry files.
  6132. #
  6133. 0    string        regf        Windows NT registry file
  6134. 0    string        CREG        Windows 95 registry file
  6135.  
  6136. # Popular applications
  6137. 2080    string    Microsoft\ Word\ 6.0\ Document    %s
  6138. 2080    string    Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
  6139. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Word)
  6140. 2112    string    MSWordDoc            Microsoft Word document data
  6141. #
  6142. 0    belong    0x31be0000            Microsoft Word Document
  6143. #
  6144. 0       string  PO^Q`                Microsoft Word 6.0 Document
  6145. #
  6146. 0    string    \376\067\0\043            Microsoft Office Document
  6147. 0    string    \320\317\021\340\241\261\032\341    Microsoft Office Document
  6148. 0    string    \333\245-\0\0\0            Microsoft Office Document
  6149. #
  6150. 2080    string    Microsoft\ Excel\ 5.0\ Worksheet    %s
  6151. #
  6152. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
  6153. 2114    string    Biff5        Microsoft Excel 5.0 Worksheet
  6154. #
  6155. 0    belong    0x00001a00    Lotus 1-2-3
  6156. >4    belong    0x00100400    wk3 document data
  6157. >4    belong    0x02100400    wk4 document data
  6158. >4    belong    0x07800100    fm3 or fmb document data
  6159. >4    belong    0x07800000    fm3 or fmb document data
  6160. #
  6161. 0    belong    0x00000200     Lotus 1-2-3
  6162. >4    belong    0x06040600    wk1 document data
  6163. >4    belong    0x06800200    fmt document data
  6164.  
  6165. # Help files
  6166. 0    string    ?_\3\0        MS Windows Help Data
  6167.  
  6168. #  DeIsL1.isu what this is I don't know
  6169. 0    string    \161\250\000\000\001\002    DeIsL1.isu whatever that is
  6170.  
  6171. # Winamp .avs
  6172. #0    string    Nullsoft\ AVS\ Preset\ \060\056\061\032    A plug in for Winamp ms-windows Freeware media player
  6173. 0    string    Nullsoft\ AVS\ Preset\     Winamp plug in
  6174.  
  6175. # Hyper terminal:
  6176. 0    string    HyperTerminal\     hyperterm
  6177. >15    string    1.0\ --\ HyperTerminal\ data\ file    MS-windows Hyperterminal
  6178.  
  6179. # Windows Metafont .WMF
  6180. 0    string    \327\315\306\232\000\000\000\000\000\000    ms-windows metafont .wmf
  6181.  
  6182. #tz3 files whatever that is (MS Works files)
  6183. 0    string    \003\001\001\004\070\001\000\000    tz3 ms-works file
  6184. 0    string    \003\002\001\004\070\001\000\000    tz3 ms-works file
  6185. 0    string    \003\003\001\004\070\001\000\000    tz3 ms-works file
  6186.  
  6187. # PGP sig files .sig
  6188. #0 string \211\000\077\003\005\000\063\237\127 065 to  \027\266\151\064\005\045\101\233\021\002 PGP sig
  6189. 0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
  6190. 0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
  6191. 0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
  6192. 0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
  6193. 0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
  6194. 0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
  6195.  
  6196. # windows zips files .dmf
  6197. 0    string    MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 Ms-windows special zipped file
  6198.  
  6199.  
  6200. # Windows help file FTG FTS
  6201. 0    string    \164\146\115\122\012\000\000\000\001\000\000\000    ms-windows help cache
  6202.  
  6203. # grp old windows 3.1 group files
  6204. 0 string  \120\115\103\103    Ms-windows 3.1 group files
  6205.  
  6206.  
  6207. # lnk files windows symlinks
  6208. 0    string    \114\000\000\000\001\024\002\000\000\000\000\000\300\000\000\000\000\000\000\106    ms-Windows shortcut
  6209.  
  6210. #ico files
  6211. 0    string    \102\101\050\000\000\000\056\000\000\000\000\000\000\000    Icon for ms-windows
  6212.  
  6213. # Windows icons (Ian Springer <ips@fpk.hp.com>)
  6214. 0    string    \000\000\001\000    ms-windows icon resource
  6215. >4    byte    1            - 1 icon
  6216. >4    byte    >1            - %d icons
  6217. >>6    byte    >0            \b, %dx
  6218. >>>7    byte    >0            \b%d
  6219. >>8    byte    0            \b, 256-colors
  6220. >>8    byte    >0            \b, %d-colors
  6221.  
  6222.  
  6223. # .chr files
  6224. 0    string    PK\010\010BGI    Borland font 
  6225. >4    string    >\0    %s
  6226. # then there is a copyright notice
  6227.  
  6228.  
  6229. # .bgi files
  6230. 0    string    pk\010\010BGI    Borland device 
  6231. >4    string    >\0    %s
  6232. # then there is a copyright notice
  6233.  
  6234.  
  6235. # recycled/info the windows trash bin index
  6236. 9    string    \000\000\000\030\001\000\000\000 ms-windows recycled bin info
  6237.  
  6238.  
  6239. ##### put in Either Magic/font or Magic/news
  6240. # Acroread or something  files wrongly identified as G3  .pfm
  6241. # these have the form \000 \001 any? \002 \000 \000
  6242. # or \000 \001 any? \022 \000 \000
  6243. #0    string  \000\001 pfm?
  6244. #>3    string  \022\000\000Copyright\  yes
  6245. #>3    string  \002\000\000Copyright\  yes
  6246. #>3    string  >\0     oops, not a font file. Cancel that.
  6247. #it clashes with ttf files so put it lower down.
  6248.  
  6249. # From Doug Lee via a FreeBSD pr
  6250. 9    string        GERBILDOC    First Choice document
  6251. 9    string        GERBILDB    First Choice database
  6252. 9    string        GERBILCLIP    First Choice database
  6253. 0    string        GERBIL        First Choice device file
  6254. 9    string        RABBITGRAPH    RabbitGraph file
  6255. 0    string        DCU1        Borland Delphi .DCU file
  6256. 0    string        !<spell>    MKS Spell hash list (old format)
  6257. 0    string        !<spell2>    MKS Spell hash list
  6258. # Too simple - MPi
  6259. #0    string        AH        Halo(TM) bitmapped font file
  6260. 0    lelong        0x08086b70    TurboC BGI file
  6261. 0    lelong        0x08084b50    TurboC Font file
  6262.  
  6263. # WARNING: below line conflicts with Infocom game data Z-machine 3
  6264. 0    byte        0x03        DBase 3 data file
  6265. >0x04    lelong        0        (no records)
  6266. >0x04    lelong        >0        (%ld records)
  6267. 0    byte        0x83        DBase 3 data file with memo(s)
  6268. >0x04    lelong        0        (no records)
  6269. >0x04    lelong        >0        (%ld records)
  6270. 0    leshort        0x0006        DBase 3 index file
  6271. 0    string        PMCC        Windows 3.x .GRP file
  6272. 1    string        RDC-meg        MegaDots 
  6273. >8    byte        >0x2F        version %c
  6274. >9    byte        >0x2F        \b.%c file
  6275. 0    lelong        0x4C
  6276. >4    lelong        0x00021401    Windows shortcut file
  6277.  
  6278. # DOS EPS Binary File Header
  6279. # From: Ed Sznyter <ews@Black.Market.NET>
  6280. 0    belong        0xC5D0D3C6    DOS EPS Binary File
  6281. >4    long        >0        Postscript starts at byte %d
  6282. >>8    long        >0        length %d
  6283. >>>12    long        >0        Metafile starts at byte %d
  6284. >>>>16    long        >0        length %d
  6285. >>>20    long        >0        TIFF starts at byte %d
  6286. >>>>24    long        >0        length %d
  6287.  
  6288. # TNEF magic From "Joomy" <joomy@se-ed.net> 
  6289. 0    leshort        0x223e9f78    TNEF
  6290.  
  6291. # HtmlHelp files (.chm)
  6292. 0    string  ITSF\003\000\000\000\x60\000\000\000\001\000\000\000    MS Windows HtmlHelp Data
  6293.  
  6294. # GFA-BASIC (Wolfram Kleff)
  6295. 2    string        GFA-BASIC3    GFA-BASIC 3 data
  6296.  
  6297. # DJGPP compiled files
  6298. # v >2, uses DPMI & small(2k) stub (Robert vd Boon, rjvdboon@europe.com)
  6299. 0x200    string        go32stub    DOS-executable compiled w/DJGPP
  6300. >0x20c    string        >0        (stub v%.4s)
  6301. >>0x8b2    string        djp        [compressed w/%s
  6302. >>>&1    string        >\0        %.4s]
  6303. >>0x8ad    string        UPX        [compressed w/%s
  6304. >>>&1    string        >\0        %.4s]
  6305. >>0x1c    string        pmodedj        stubbed with %s
  6306.  
  6307. # QDOS
  6308. 4    belong        0x4AFB        QDOS executable
  6309. >9    pstring        x        '%s'
  6310. 0    beshort        0xFB01        QDOS object
  6311. >2    pstring        x        '%s'
  6312.  
  6313. #------------------------------------------------------------------------------
  6314. # msvc:  file(1) magic for msvc
  6315. # "H. Nanosecond" <aldomel@ix.netcom.com>
  6316. # Microsoft visual C
  6317. # I have version 1.0
  6318.  
  6319. # .aps
  6320. 0    string    HWB\000\377\001\000\000\000    Microsoft Visual C .APS file
  6321.  
  6322. # .ide
  6323. #too long 0    string    \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316    MSVC .ide
  6324. 0    string    \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157    MSVC .ide
  6325.  
  6326. # .res
  6327. 0    string    \000\000\000\000\040\000\000\000\377    MSVC .res
  6328. 0    string    \377\003\000\377\001\000\020\020\350    MSVC .res
  6329. 0    string    \377\003\000\377\001\000\060\020\350    MSVC .res
  6330.  
  6331. #.lib
  6332. 0    string    \360\015\000\000    Microsoft Visual C library
  6333. 0    string    \360\075\000\000    Microsoft Visual C library
  6334. 0    string    \360\175\000\000    Microsoft Visual C library
  6335.  
  6336. #.pch
  6337. 0    string    DTJPCH0\000\022\103\006\200    Microsoft Visual C .pch
  6338.  
  6339. # .pdb
  6340. # too long 0    string    Microsoft\ C/C++\ program\ database\ 
  6341. 0    string    Microsoft\ C/C++\     MSVC program database
  6342. >18    string    program\ database\     
  6343. >33    string    >\0    ver %s
  6344.  
  6345. #.sbr
  6346. 0    string    \000\002\000\007\000    MSVC .sbr
  6347. >5    string     >\0    %s
  6348.  
  6349. #.bsc
  6350. 0    string    \002\000\002\001    MSVC .bsc
  6351.  
  6352. #.wsp
  6353. 0    string    1.00\ .0000.0000\000\003    MSVC .wsp version 1.0000.0000
  6354. # these seem to start with the version and contain menus
  6355.  
  6356. #-----------------------------------------------------------------------------
  6357. # natinst:  file(1) magic for National Instruments Code Files
  6358.  
  6359. #
  6360. # From <egamez@fcfm.buap.mx> Enrique Gßmez-Flores
  6361. # version 1
  6362. # Many formats still missing, we use, for the moment LabVIEW
  6363. # We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
  6364. #
  6365. 0       string          RSRC            National Instruments,
  6366. # Check if it's a LabVIEW File
  6367. >8      string          LV              LabVIEW File,
  6368. # Check wich kind of file is
  6369. >>10    string          SB              Code Resource File, data
  6370. >>10    string          IN              Virtual Instrument Program, data
  6371. >>10    string          AR              VI Library, data
  6372. # This is for Menu Libraries
  6373. >8      string          LMNULBVW        Portable File Names, data
  6374. # This is for General Resources
  6375. >8      string          rsc             Resources File, data
  6376. # This is for VXI Package
  6377. 0       string          VMAP            National Instruments, VXI File, data
  6378.  
  6379. #------------------------------------------------------------------------------
  6380. # ncr:  file(1) magic for NCR Tower objects
  6381. #
  6382. # contributed by
  6383. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  6384. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  6385. #
  6386. 0    beshort        000610    Tower/XP rel 2 object
  6387. >12       belong        >0    not stripped
  6388. >20       beshort        0407    executable
  6389. >20       beshort        0410    pure executable
  6390. >22       beshort        >0    - version %ld
  6391. 0    beshort        000615    Tower/XP rel 2 object
  6392. >12       belong        >0    not stripped
  6393. >20       beshort        0407    executable
  6394. >20       beshort        0410    pure executable
  6395. >22       beshort        >0    - version %ld
  6396. 0    beshort        000620    Tower/XP rel 3 object
  6397. >12       belong        >0    not stripped
  6398. >20       beshort        0407    executable
  6399. >20       beshort        0410    pure executable
  6400. >22       beshort        >0    - version %ld
  6401. 0    beshort        000625    Tower/XP rel 3 object
  6402. >12       belong        >0    not stripped
  6403. >20       beshort        0407    executable
  6404. >20       beshort        0410    pure executable
  6405. >22       beshort        >0    - version %ld
  6406. 0    beshort        000630    Tower32/600/400 68020 object
  6407. >12       belong        >0    not stripped
  6408. >20       beshort        0407    executable
  6409. >20       beshort        0410    pure executable
  6410. >22       beshort        >0    - version %ld
  6411. 0    beshort        000640    Tower32/800 68020
  6412. >18       beshort        &020000    w/68881 object
  6413. >18       beshort        &040000    compatible object
  6414. >18       beshort        &~060000    object
  6415. >20       beshort        0407    executable
  6416. >20       beshort        0413    pure executable
  6417. >12       belong        >0    not stripped
  6418. >22       beshort        >0    - version %ld
  6419. 0    beshort        000645    Tower32/800 68010
  6420. >18       beshort        &040000    compatible object
  6421. >18       beshort        &~060000 object
  6422. >20       beshort        0407    executable
  6423. >20       beshort        0413    pure executable
  6424. >12       belong        >0    not stripped
  6425. >22       beshort        >0    - version %ld
  6426.  
  6427. #------------------------------------------------------------------------------
  6428. # netbsd:  file(1) magic for NetBSD objects
  6429. #
  6430. # All new-style magic numbers are in network byte order.
  6431. #
  6432.  
  6433. 0    lelong            000000407    a.out NetBSD little-endian object file
  6434. >16    lelong            >0        not stripped
  6435. 0    belong            000000407    a.out NetBSD big-endian object file
  6436. >16    belong            >0        not stripped
  6437.  
  6438. 0    belong&0377777777    041400413    a.out NetBSD/i386 demand paged
  6439. >0    byte            &0x80        
  6440. >>20    lelong            <4096        shared library
  6441. >>20    lelong            =4096        dynamically linked executable
  6442. >>20    lelong            >4096        dynamically linked executable
  6443. >0    byte            ^0x80        executable
  6444. >16    lelong            >0        not stripped
  6445. 0    belong&0377777777    041400410    a.out NetBSD/i386 pure
  6446. >0    byte            &0x80        dynamically linked executable
  6447. >0    byte            ^0x80        executable
  6448. >16    lelong            >0        not stripped
  6449. 0    belong&0377777777    041400407    a.out NetBSD/i386
  6450. >0    byte            &0x80        dynamically linked executable
  6451. >0    byte            ^0x80
  6452. >>0    byte            &0x40        position independent
  6453. >>20    lelong            !0        executable
  6454. >>20    lelong            =0        object file
  6455. >16    lelong            >0        not stripped
  6456. 0    belong&0377777777    041400507    a.out NetBSD/i386 core
  6457. >12    string            >\0        from '%s'
  6458. >32    lelong            !0        (signal %d)
  6459.  
  6460. 0    belong&0377777777    041600413    a.out NetBSD/m68k demand paged
  6461. >0    byte            &0x80        
  6462. >>20    belong            <8192        shared library
  6463. >>20    belong            =8192        dynamically linked executable
  6464. >>20    belong            >8192        dynamically linked executable
  6465. >0    byte            ^0x80        executable
  6466. >16    belong            >0        not stripped
  6467. 0    belong&0377777777    041600410    a.out NetBSD/m68k pure
  6468. >0    byte            &0x80        dynamically linked executable
  6469. >0    byte            ^0x80        executable
  6470. >16    belong            >0        not stripped
  6471. 0    belong&0377777777    041600407    a.out NetBSD/m68k
  6472. >0    byte            &0x80        dynamically linked executable
  6473. >0    byte            ^0x80
  6474. >>0    byte            &0x40        position independent
  6475. >>20    belong            !0        executable
  6476. >>20    belong            =0        object file
  6477. >16    belong            >0        not stripped
  6478. 0    belong&0377777777    041600507    a.out NetBSD/m68k core
  6479. >12    string            >\0        from '%s'
  6480. >32    belong            !0        (signal %d)
  6481.  
  6482. 0    belong&0377777777    042000413    a.out NetBSD/m68k4k demand paged
  6483. >0    byte            &0x80        
  6484. >>20    belong            <4096        shared library
  6485. >>20    belong            =4096        dynamically linked executable
  6486. >>20    belong            >4096        dynamically linked executable
  6487. >0    byte            ^0x80        executable
  6488. >16    belong            >0        not stripped
  6489. 0    belong&0377777777    042000410    a.out NetBSD/m68k4k pure
  6490. >0    byte            &0x80        dynamically linked executable
  6491. >0    byte            ^0x80        executable
  6492. >16    belong            >0        not stripped
  6493. 0    belong&0377777777    042000407    a.out NetBSD/m68k4k
  6494. >0    byte            &0x80        dynamically linked executable
  6495. >0    byte            ^0x80
  6496. >>0    byte            &0x40        position independent
  6497. >>20    belong            !0        executable
  6498. >>20    belong            =0        object file
  6499. >16    belong            >0        not stripped
  6500. 0    belong&0377777777    042000507    a.out NetBSD/m68k4k core
  6501. >12    string            >\0        from '%s'
  6502. >32    belong            !0        (signal %d)
  6503.  
  6504. 0    belong&0377777777    042200413    a.out NetBSD/ns32532 demand paged
  6505. >0    byte            &0x80        
  6506. >>20    lelong            <4096        shared library
  6507. >>20    lelong            =4096        dynamically linked executable
  6508. >>20    lelong            >4096        dynamically linked executable
  6509. >0    byte            ^0x80        executable
  6510. >16    lelong            >0        not stripped
  6511. 0    belong&0377777777    042200410    a.out NetBSD/ns32532 pure
  6512. >0    byte            &0x80        dynamically linked executable
  6513. >0    byte            ^0x80        executable
  6514. >16    lelong            >0        not stripped
  6515. 0    belong&0377777777    042200407    a.out NetBSD/ns32532
  6516. >0    byte            &0x80        dynamically linked executable
  6517. >0    byte            ^0x80
  6518. >>0    byte            &0x40        position independent
  6519. >>20    lelong            !0        executable
  6520. >>20    lelong            =0        object file
  6521. >16    lelong            >0        not stripped
  6522. 0    belong&0377777777    042200507    a.out NetBSD/ns32532 core
  6523. >12    string            >\0        from '%s'
  6524. >32    lelong            !0        (signal %d)
  6525.  
  6526. 0    belong&0377777777    045200507    a.out NetBSD/powerpc core
  6527. >12    string            >\0        from '%s'
  6528.  
  6529. 0    belong&0377777777    042400413    a.out NetBSD/sparc demand paged
  6530. >0    byte            &0x80        
  6531. >>20    belong            <8192        shared library
  6532. >>20    belong            =8192        dynamically linked executable
  6533. >>20    belong            >8192        dynamically linked executable
  6534. >0    byte            ^0x80        executable
  6535. >16    belong            >0        not stripped
  6536. 0    belong&0377777777    042400410    a.out NetBSD/sparc pure
  6537. >0    byte            &0x80        dynamically linked executable
  6538. >0    byte            ^0x80        executable
  6539. >16    belong            >0        not stripped
  6540. 0    belong&0377777777    042400407    a.out NetBSD/sparc
  6541. >0    byte            &0x80        dynamically linked executable
  6542. >0    byte            ^0x80
  6543. >>0    byte            &0x40        position independent
  6544. >>20    belong            !0        executable
  6545. >>20    belong            =0        object file
  6546. >16    belong            >0        not stripped
  6547. 0    belong&0377777777    042400507    a.out NetBSD/sparc core
  6548. >12    string            >\0        from '%s'
  6549. >32    belong            !0        (signal %d)
  6550.  
  6551. 0    belong&0377777777    042600413    a.out NetBSD/pmax demand paged
  6552. >0    byte            &0x80        
  6553. >>20    lelong            <4096        shared library
  6554. >>20    lelong            =4096        dynamically linked executable
  6555. >>20    lelong            >4096        dynamically linked executable
  6556. >0    byte            ^0x80        executable
  6557. >16    lelong            >0        not stripped
  6558. 0    belong&0377777777    042600410    a.out NetBSD/pmax pure
  6559. >0    byte            &0x80        dynamically linked executable
  6560. >0    byte            ^0x80        executable
  6561. >16    lelong            >0        not stripped
  6562. 0    belong&0377777777    042600407    a.out NetBSD/pmax
  6563. >0    byte            &0x80        dynamically linked executable
  6564. >0    byte            ^0x80
  6565. >>0    byte            &0x40        position independent
  6566. >>20    lelong            !0        executable
  6567. >>20    lelong            =0        object file
  6568. >16    lelong            >0        not stripped
  6569. 0    belong&0377777777    042600507    a.out NetBSD/pmax core
  6570. >12    string            >\0        from '%s'
  6571. >32    lelong            !0        (signal %d)
  6572.  
  6573. 0    belong&0377777777    043000413    a.out NetBSD/vax 1k demand paged
  6574. >0    byte            &0x80        
  6575. >>20    lelong            <4096        shared library
  6576. >>20    lelong            =4096        dynamically linked executable
  6577. >>20    lelong            >4096        dynamically linked executable
  6578. >0    byte            ^0x80        executable
  6579. >16    lelong            >0        not stripped
  6580. 0    belong&0377777777    043000410    a.out NetBSD/vax 1k pure
  6581. >0    byte            &0x80        dynamically linked executable
  6582. >0    byte            ^0x80        executable
  6583. >16    lelong            >0        not stripped
  6584. 0    belong&0377777777    043000407    a.out NetBSD/vax 1k
  6585. >0    byte            &0x80        dynamically linked executable
  6586. >0    byte            ^0x80
  6587. >>0    byte            &0x40        position independent
  6588. >>20    lelong            !0        executable
  6589. >>20    lelong            =0        object file
  6590. >16    lelong            >0        not stripped
  6591. 0    belong&0377777777    043000507    a.out NetBSD/vax 1k core
  6592. >12    string            >\0        from '%s'
  6593. >32    lelong            !0        (signal %d)
  6594.  
  6595. 0    belong&0377777777    045400413    a.out NetBSD/vax 4k demand paged
  6596. >0    byte            &0x80        
  6597. >>20    lelong            <4096        shared library
  6598. >>20    lelong            =4096        dynamically linked executable
  6599. >>20    lelong            >4096        dynamically linked executable
  6600. >0    byte            ^0x80        executable
  6601. >16    lelong            >0        not stripped
  6602. 0    belong&0377777777    045400410    a.out NetBSD/vax 4k pure
  6603. >0    byte            &0x80        dynamically linked executable
  6604. >0    byte            ^0x80        executable
  6605. >16    lelong            >0        not stripped
  6606. 0    belong&0377777777    045400407    a.out NetBSD/vax 4k
  6607. >0    byte            &0x80        dynamically linked executable
  6608. >0    byte            ^0x80
  6609. >>0    byte            &0x40        position independent
  6610. >>20    lelong            !0        executable
  6611. >>20    lelong            =0        object file
  6612. >16    lelong            >0        not stripped
  6613. 0    belong&0377777777    045400507    a.out NetBSD/vax 4k core
  6614. >12    string            >\0        from '%s'
  6615. >32    lelong            !0        (signal %d)
  6616.  
  6617. # NetBSD/alpha does not support (and has never supported) a.out objects,
  6618. # so no rules are provided for them.  NetBSD/alpha ELF objects are 
  6619. # dealt with in "elf".
  6620. 0    lelong        0x00070185        ECOFF NetBSD/alpha binary
  6621. >10    leshort        0x0001            not stripped
  6622. >10    leshort        0x0000            stripped
  6623. 0    belong&0377777777    043200507    a.out NetBSD/alpha core
  6624. >12    string            >\0        from '%s'
  6625. >32    lelong            !0        (signal %d)
  6626.  
  6627. 0    belong&0377777777    043400413    a.out NetBSD/mips demand paged
  6628. >0    byte            &0x80        
  6629. >>20    belong            <8192        shared library
  6630. >>20    belong            =8192        dynamically linked executable
  6631. >>20    belong            >8192        dynamically linked executable
  6632. >0    byte            ^0x80        executable
  6633. >16    belong            >0        not stripped
  6634. 0    belong&0377777777    043400410    a.out NetBSD/mips pure
  6635. >0    byte            &0x80        dynamically linked executable
  6636. >0    byte            ^0x80        executable
  6637. >16    belong            >0        not stripped
  6638. 0    belong&0377777777    043400407    a.out NetBSD/mips
  6639. >0    byte            &0x80        dynamically linked executable
  6640. >0    byte            ^0x80
  6641. >>0    byte            &0x40        position independent
  6642. >>20    belong            !0        executable
  6643. >>20    belong            =0        object file
  6644. >16    belong            >0        not stripped
  6645. 0    belong&0377777777    043400507    a.out NetBSD/mips core
  6646. >12    string            >\0        from '%s'
  6647. >32    belong            !0        (signal %d)
  6648.  
  6649. 0    belong&0377777777    043600413    a.out NetBSD/arm32 demand paged
  6650. >0    byte            &0x80
  6651. >>20    lelong            <4096        shared library
  6652. >>20    lelong            =4096        dynamically linked executable
  6653. >>20    lelong            >4096        dynamically linked executable
  6654. >0    byte            ^0x80        executable
  6655. >16    lelong            >0        not stripped
  6656. 0    belong&0377777777    043600410    a.out NetBSD/arm32 pure
  6657. >0    byte            &0x80        dynamically linked executable
  6658. >0    byte            ^0x80        executable
  6659. >16    lelong            >0        not stripped
  6660. 0    belong&0377777777    043600407    a.out NetBSD/arm32
  6661. >0    byte            &0x80        dynamically linked executable
  6662. >0    byte            ^0x80
  6663. >>0    byte            &0x40        position independent
  6664. >>20    lelong            !0        executable
  6665. >>20    lelong            =0        object file
  6666. >16    lelong            >0        not stripped
  6667. # NetBSD/arm26 has always used ELF objects, but it shares a core file
  6668. # format with NetBSD/arm32.
  6669. 0    belong&0377777777    043600507    a.out NetBSD/arm core
  6670. >12    string            >\0        from '%s'
  6671. >32    lelong            !0        (signal %d)
  6672.  
  6673. #------------------------------------------------------------------------------
  6674. # netscape:  file(1) magic for Netscape files
  6675. # "H. Nanosecond" <aldomel@ix.netcom.com>
  6676. # version 3 and 4 I think
  6677. #
  6678.  
  6679. # Netscape Address book  .nab
  6680. 0    string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
  6681.  
  6682. # .snm Caches
  6683. 0    string        #\ Netscape\ folder\ cache    Netscape folder cache
  6684. 0    string    \000\036\204\220\000    Netscape folder cache
  6685. # .n2p 
  6686. # Net 2 Phone 
  6687. #0    string    123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
  6688. 0    string    SX961999    Net2phone
  6689.  
  6690. #
  6691. #This is files ending in .art, FIXME add more rules
  6692. 0       string          JG\004\016\0\0\0\0      ART
  6693.  
  6694. #------------------------------------------------------------------------------
  6695. # news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  6696. #
  6697. 0    string        StartFontMetrics    ASCII font metrics
  6698. 0    string        StartFont    ASCII font bits
  6699. 0    belong        0x137A2944    NeWS bitmap font
  6700. 0    belong        0x137A2947    NeWS font family
  6701. 0    belong        0x137A2950    scalable OpenFont binary
  6702. 0    belong        0x137A2951    encrypted scalable OpenFont binary
  6703. 8    belong        0x137A2B45    X11/NeWS bitmap font
  6704. 8    belong        0x137A2B48    X11/NeWS font family
  6705. #------------------------------------------------------------------------------
  6706. # nitpicker:  file(1) magic for Flowfiles.
  6707. # From: Christian Jachmann <C.Jachmann@gmx.net> http://www.nitpicker.de
  6708. 0    string    NPFF    NItpicker Flow File 
  6709. >4    byte    x    V%d.
  6710. >5    byte    x    %d
  6711. >6    bedate    x    started: %s
  6712. >10    bedate    x    stopped: %s
  6713. >14    belong    x    Bytes: %u
  6714. >18    belong    x    Bytes1: %u
  6715. >22    belong    x    Flows: %u
  6716. >26    belong    x    Pkts: %u
  6717.  
  6718. #------------------------------------------------------------------------------
  6719. # ocaml: file(1) magic for Objective Caml files.
  6720. 0    string    Caml1999    Objective caml
  6721. >8    string    X        exec file
  6722. >8    string    I        interface file (.cmi)
  6723. >8    string    O        object file (.cmo)
  6724. >8    string    A        library file (.cma)
  6725. >8    string    Y        native object file (.cmx)
  6726. >8    string    Z        native library file (.cmxa)
  6727. >8    string    M        abstract syntax tree implementation file
  6728. >8    string    N        abstract syntax tree interface file
  6729. >9    string    >\0        (Version %3.3s).
  6730. #------------------------------------------------------------------------------
  6731. # octave binary data file(1) magic, from Dirk Eddelbuettel <edd@debian.org>
  6732. 0    string        Octave-1-L    Octave binary data (little endian)
  6733. 0    string        Octave-1-B    Octave binary data (big endian)
  6734.  
  6735. #------------------------------------------------------------------------------
  6736. # olf:  file(1) magic for OLF executables
  6737. #
  6738. # We have to check the byte order flag to see what byte order all the
  6739. # other stuff in the header is in.
  6740. #
  6741. # MIPS R3000 may also be for MIPS R2000.
  6742. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  6743. #
  6744. # Created by Erik Theisen <etheisen@openbsd.org>
  6745. # Based on elf from Daniel Quinlan <quinlan@yggdrasil.com>
  6746. 0    string        \177OLF        OLF
  6747. >4    byte        0        invalid class
  6748. >4    byte        1        32-bit
  6749. >4    byte        2        64-bit
  6750. >7    byte        0        invalid os
  6751. >7    byte        1        OpenBSD
  6752. >7    byte        2        NetBSD
  6753. >7    byte        3        FreeBSD
  6754. >7    byte        4        4.4BSD
  6755. >7    byte        5        Linux
  6756. >7    byte        6        SVR4
  6757. >7    byte        7        esix
  6758. >7    byte        8        Solaris
  6759. >7    byte        9        Irix
  6760. >7    byte        10        SCO
  6761. >7    byte        11        Dell
  6762. >7    byte        12        NCR
  6763. >5    byte        0        invalid byte order
  6764. >5    byte        1        LSB
  6765. >>16    leshort        0        no file type,
  6766. >>16    leshort        1        relocatable,
  6767. >>16    leshort        2        executable,
  6768. >>16    leshort        3        shared object,
  6769. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  6770. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  6771. >>16    leshort        4        core file
  6772. >>>(0x38+0xcc) string    >\0        of '%s'
  6773. >>>(0x38+0x10) lelong    >0        (signal %d),
  6774. >>16    leshort        &0xff00        processor-specific,
  6775. >>18    leshort        0        no machine,
  6776. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  6777. >>18    leshort        2        SPARC - invalid byte order,
  6778. >>18    leshort        3        Intel 80386,
  6779. >>18    leshort        4        Motorola 68000 - invalid byte order,
  6780. >>18    leshort        5        Motorola 88000 - invalid byte order,
  6781. >>18    leshort        6        Intel 80486,
  6782. >>18    leshort        7        Intel 80860,
  6783. >>18    leshort        8        MIPS R3000_BE - invalid byte order,
  6784. >>18    leshort        9        Amdahl - invalid byte order,
  6785. >>18    leshort        10        MIPS R3000_LE,
  6786. >>18    leshort        11        RS6000 - invalid byte order,
  6787. >>18    leshort        15        PA-RISC - invalid byte order,
  6788. >>18    leshort        16        nCUBE,
  6789. >>18    leshort        17        VPP500,
  6790. >>18    leshort        18        SPARC32PLUS,
  6791. >>18    leshort        20        PowerPC,
  6792. >>18    leshort        0x9026        Alpha,
  6793. >>20    lelong        0        invalid version
  6794. >>20    lelong        1        version 1
  6795. >>36    lelong        1        MathCoPro/FPU/MAU Required
  6796. >8    string        >\0        (%s)
  6797. >5    byte        2        MSB
  6798. >>16    beshort        0        no file type,
  6799. >>16    beshort        1        relocatable,
  6800. >>16    beshort        2        executable,
  6801. >>16    beshort        3        shared object,
  6802. >>16    beshort        4        core file,
  6803. >>>(0x38+0xcc) string    >\0        of '%s'
  6804. >>>(0x38+0x10) belong    >0        (signal %d),
  6805. >>16    beshort        &0xff00        processor-specific,
  6806. >>18    beshort        0        no machine,
  6807. >>18    beshort        1        AT&T WE32100,
  6808. >>18    beshort        2        SPARC,
  6809. >>18    beshort        3        Intel 80386 - invalid byte order,
  6810. >>18    beshort        4        Motorola 68000,
  6811. >>18    beshort        5        Motorola 88000,
  6812. >>18    beshort        6        Intel 80486 - invalid byte order,
  6813. >>18    beshort        7        Intel 80860,
  6814. >>18    beshort        8        MIPS R3000_BE,
  6815. >>18    beshort        9        Amdahl,
  6816. >>18    beshort        10        MIPS R3000_LE - invalid byte order,
  6817. >>18    beshort        11        RS6000,
  6818. >>18    beshort        15        PA-RISC,
  6819. >>18    beshort        16        nCUBE,
  6820. >>18    beshort        17        VPP500,
  6821. >>18    beshort        18        SPARC32PLUS,
  6822. >>18    beshort        20        PowerPC or cisco 4500,
  6823. >>18    beshort        21        cisco 7500,
  6824. >>18    beshort        24        cisco SVIP,
  6825. >>18    beshort        25        cisco 7200,
  6826. >>18    beshort        36        cisco 12000,
  6827. >>18    beshort        0x9026        Alpha,
  6828. >>20    belong        0        invalid version
  6829. >>20    belong        1        version 1
  6830. >>36    belong        1        MathCoPro/FPU/MAU Required
  6831.  
  6832. #------------------------------------------------------------------------------
  6833. # os2:  file(1) magic for OS/2 files
  6834. #
  6835.  
  6836. # Provided 1998/08/22 by
  6837. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  6838. 1    string    InternetShortcut    MS Windows 95 Internet shortcut text
  6839. >24    string    >\            (URL=<%s>)
  6840.  
  6841. # OS/2 URL objects
  6842. # Provided 1998/08/22 by
  6843. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  6844. #0    string    http:            OS/2 URL object text
  6845. #>5    string    >\            (WWW) <http:%s>
  6846. #0    string    mailto:            OS/2 URL object text
  6847. #>7    string    >\            (email) <%s>
  6848. #0    string    news:            OS/2 URL object text
  6849. #>5    string    >\            (Usenet) <%s>
  6850. #0    string    ftp:            OS/2 URL object text
  6851. #>4    string    >\            (FTP) <ftp:%s>
  6852. #0    string    file:            OS/2 URL object text
  6853. #>5    string    >\            (Local file) <%s>
  6854.  
  6855. # >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett@netcom.com)
  6856. # Carl Hauser (chauser.parc@xerox.com) and 
  6857. # Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  6858. # list the following header format in inf02a.doc:
  6859. #
  6860. #  int16 ID;           // ID magic word (5348h = "HS")
  6861. #  int8  unknown1;     // unknown purpose, could be third letter of ID
  6862. #  int8  flags;        // probably a flag word...
  6863. #                      //  bit 0: set if INF style file
  6864. #                      //  bit 4: set if HLP style file
  6865. #                      // patching this byte allows reading HLP files
  6866. #                      // using the VIEW command, while help files 
  6867. #                      // seem to work with INF settings here as well.
  6868. #  int16 hdrsize;      // total size of header
  6869. #  int16 unknown2;     // unknown purpose
  6870. 0   string  HSP\x01\x9b\x00 OS/2 INF
  6871. >107 string >0                      (%s)
  6872. 0   string  HSP\x10\x9b\x00     OS/2 HLP
  6873. >107 string >0                      (%s)
  6874.  
  6875. # OS/2 INI (this is a guess)
  6876. 0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
  6877. #
  6878. # Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
  6879. #
  6880. # Redistribution and use in source and binary forms, with or without
  6881. # modification, are permitted provided that the following conditions
  6882. # are met:
  6883. # 1. Redistributions of source code must retain the above copyright
  6884. #    notice, this list of conditions and the following disclaimer.
  6885. # 2. Redistributions in binary form must reproduce the above copyright
  6886. #    notice, this list of conditions and the following disclaimer in the
  6887. #    documentation and/or other materials provided with the distribution.
  6888. # 3. All advertising materials mentioning features or use of this software
  6889. #    must display the following acknowledgement:
  6890. #      This product includes software developed by Ignatios Souvatzis for
  6891. #      the NetBSD project.
  6892. # 4. The name of the author may not be used to endorse or promote products
  6893. #    derived from this software without specific prior written permission.
  6894. #
  6895. #
  6896. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  6897. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  6898. # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
  6899. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  6900. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  6901. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  6902. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  6903. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  6904. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  6905. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  6906. #
  6907. #
  6908. #
  6909. # OS9/6809 module descriptions:
  6910. #
  6911. 0    beshort        0x87CD    OS9/6809 module:
  6912. #
  6913. >6    byte&0x0f    0x00    non-executable
  6914. >6    byte&0x0f    0x01    machine language
  6915. >6    byte&0x0f    0x02    BASIC I-code
  6916. >6    byte&0x0f    0x03    P-code
  6917. >6    byte&0x0f    0x04    C I-code
  6918. >6    byte&0x0f    0x05    COBOL I-code
  6919. >6    byte&0x0f    0x06    FORTRAN I-code
  6920. #
  6921. >6    byte&0xf0    0x10    program executable
  6922. >6    byte&0xf0    0x20    subroutine
  6923. >6    byte&0xf0    0x30    multi-module
  6924. >6    byte&0xf0    0x40    data module
  6925. #
  6926. >6    byte&0xf0    0xC0    system module
  6927. >6    byte&0xf0    0xD0    file manager
  6928. >6    byte&0xf0    0xE0    device driver
  6929. >6    byte&0xf0    0xF0    device descriptor
  6930. #
  6931. # OS9/m68k stuff (to be continued)
  6932. #
  6933. 0    beshort        0x4AFC    OS9/68K module:
  6934. #
  6935. # attr
  6936. >14    byte&0x80    0x80    re-entrant
  6937. >14    byte&0x40    0x40    ghost
  6938. >14    byte&0x20    0x20    system-state
  6939. #
  6940. # lang:
  6941. #
  6942. >13    byte        1    machine language
  6943. >13    byte        2    BASIC I-code
  6944. >13    byte        3    P-code
  6945. >13    byte        4    C I-code
  6946. >13    byte        5    COBOL I-code
  6947. >13    byte        6    Fortran I-code
  6948. #
  6949. #
  6950. # type:
  6951. #
  6952. >12    byte        1    program executable
  6953. >12    byte        2    subroutine
  6954. >12    byte        3    multi-module
  6955. >12    byte        4    data module
  6956. >12    byte        11    trap library
  6957. >12    byte        12    system module
  6958. >12    byte        13    file manager
  6959. >12    byte        14    device driver
  6960. >12    byte        15    device descriptor
  6961. #
  6962. # Mach magic number info
  6963. #
  6964. 0    long        0xefbe    OSF/Rose object
  6965. # I386 magic number info
  6966. #
  6967. 0    short        0565    i386 COFF object
  6968.  
  6969. #------------------------------------------------------------------------------
  6970. # palm:  file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
  6971. #
  6972. # Brian Lalor <blalor@hcirisc.cs.binghamton.edu>
  6973.  
  6974. # appl
  6975. 60      belong                  0x6170706c      PalmOS application
  6976. >0      string                  >\0             "%s"
  6977. # TEXt
  6978. 60      belong                  0x54455874      AportisDoc file
  6979. >0      string                  >\0             "%s"
  6980. # HACK
  6981. 60      belong                  0x4841434b      HackMaster hack
  6982. >0      string                  >\0             "%s"
  6983.  
  6984. # Variety of PalmOS document types
  6985. # Michael-John Turner <mj@debian.org>
  6986. # Thanks to Hasan Umit Ezerce <humit@tr-net.net.tr> for his DocType
  6987. 60    string                    BVokBDIC    BDicty PalmOS document
  6988. >0    string                  >\0             "%s"
  6989. 60    string                    DB99DBOS    DB PalmOS document
  6990. >0    string                  >\0             "%s"
  6991. 60    string                    vIMGView    FireViewer/ImageViewer PalmOS document
  6992. >0    string                  >\0             "%s"
  6993. 60    string                    PmDBPmDB    HanDBase PalmOS document
  6994. >0    string                  >\0             "%s"
  6995. 60    string                    InfoINDB    InfoView PalmOS document
  6996. >0    string                  >\0             "%s"
  6997. 60    string                    ToGoToGo    iSilo PalmOS document
  6998. >0    string                  >\0             "%s"
  6999. 60    string                    JfDbJBas    JFile PalmOS document
  7000. >0    string                  >\0             "%s"
  7001. 60    string                    JfDbJFil    JFile Pro PalmOS document
  7002. >0    string                  >\0             "%s"
  7003. 60    string                    DATALSdb    List PalmOS document
  7004. >0    string                  >\0             "%s"
  7005. 60    string                    Mdb1Mdb1    MobileDB PalmOS document
  7006. >0    string                  >\0             "%s"
  7007. 60    string                    PNRdPPrs    PeanutPress PalmOS document
  7008. >0    string                  >\0             "%s"
  7009. 60    string                    DataPlkr    Plucker PalmOS document
  7010. >0    string                  >\0             "%s"
  7011. 60    string                    DataSprd    QuickSheet PalmOS document
  7012. >0    string                  >\0             "%s"
  7013. 60    string                    SM01SMem    SuperMemo PalmOS document
  7014. >0    string                  >\0             "%s"
  7015. 60    string                    DataTlPt    TealDoc PalmOS document
  7016. >0    string                  >\0             "%s"
  7017. 60    string                    InfoTlIf    TealInfo PalmOS document
  7018. >0    string                  >\0             "%s"
  7019. 60    string                    DataTlMl    TealMeal PalmOS document
  7020. >0    string                  >\0             "%s"
  7021. 60    string                    DataTlPt    TealPaint PalmOS document
  7022. >0    string                  >\0             "%s"
  7023. 60    string                    dataTDBP    ThinkDB PalmOS document
  7024. >0    string                  >\0             "%s"
  7025. 60    string                    TdatTide    Tides PalmOS document
  7026. >0    string                  >\0             "%s"
  7027. 60    string                    ToRaTRPW    TomeRaider PalmOS document
  7028. >0    string                  >\0             "%s"
  7029.  
  7030. # A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
  7031. # For version 1.xx zTXTs, outputs version and numbers of bookmarks and
  7032. #   annotations.
  7033. # For other versions, just outputs version.
  7034. #
  7035. 60        string        zTXT        A GutenPalm zTXT e-book
  7036. >0        string        >\0        "%s"
  7037. >(0x4E.L)    byte        0
  7038. >>(0x4E.L+1)    byte        x        (v0.%02d)
  7039. >(0x4E.L)    byte        1
  7040. >>(0x4E.L+1)    byte        x        (v1.%02d)
  7041. >>>(0x4E.L+10)    beshort        >0
  7042. >>>>(0x4E.L+10) beshort        <2        - 1 bookmark
  7043. >>>>(0x4E.L+10) beshort        >1        - %d bookmarks
  7044. >>>(0x4E.L+14)    beshort        >0
  7045. >>>>(0x4E.L+14) beshort        <2        - 1 annotation
  7046. >>>>(0x4E.L+14) beshort        >1        - %d annotations
  7047. >(0x4E.L)    byte        >1        (v%d.
  7048. >>(0x4E.L+1)    byte        x        %02d)
  7049.  
  7050. # Palm OS .prc file types
  7051. 60        string        libr        Palm OS dynamic library data
  7052. >0        string        >\0        "%s"
  7053. 60        string        ptch        Palm OS operating system patch data
  7054. >0        string        >\0        "%s"
  7055.  
  7056. # Mobipocket (www.mobipocket.com), donated by Carl Witty
  7057. 60    string                    BOOKMOBI    Mobipocket E-book
  7058. >0    string                  >\0             "%s"
  7059.  
  7060. #------------------------------------------------------------------------------
  7061. #
  7062. # Parix COFF executables
  7063. # From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
  7064. #
  7065. 0    beshort&0xfff    0xACE    PARIX
  7066. >0    byte&0xf0    0x80    T800
  7067. >0    byte&0xf0    0x90    T9000
  7068. >19    byte&0x02    0x02    executable
  7069. >19    byte&0x02    0x00    object
  7070. >19    byte&0x0c    0x00    not stripped
  7071.  
  7072. #------------------------------------------------------------------------------
  7073. # pbm:  file(1) magic for Portable Bitmap files
  7074. #
  7075. # XXX - byte order?
  7076. #
  7077. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  7078. #------------------------------------------------------------------------------
  7079. # pdf:  file(1) magic for Portable Document Format
  7080. #
  7081.  
  7082. 0    string        %PDF-        PDF document
  7083. >5    byte        x        \b, version %c
  7084. >7    byte        x        \b.%c
  7085.  
  7086. #------------------------------------------------------------------------------
  7087. # pdp:  file(1) magic for PDP-11 executable/object and APL workspace
  7088. #
  7089. 0    lelong        0101555        PDP-11 single precision APL workspace
  7090. 0    lelong        0101554        PDP-11 double precision APL workspace
  7091. #
  7092. # PDP-11 a.out
  7093. #
  7094. 0    leshort        0407        PDP-11 executable
  7095. >8    leshort        >0        not stripped
  7096. >15    byte        >0        - version %ld
  7097.  
  7098. 0    leshort        0401        PDP-11 UNIX/RT ldp
  7099. 0    leshort        0405        PDP-11 old overlay
  7100.  
  7101. 0    leshort        0410        PDP-11 pure executable
  7102. >8    leshort        >0        not stripped
  7103. >15    byte        >0        - version %ld
  7104.  
  7105. 0    leshort        0411        PDP-11 separate I&D executable
  7106. >8    leshort        >0        not stripped
  7107. >15    byte        >0        - version %ld
  7108.  
  7109. 0    leshort        0437        PDP-11 kernel overlay
  7110.  
  7111. # These last three are derived from 2.11BSD file(1)
  7112. 0    leshort        0413        PDP-11 demand-paged pure executable
  7113. >8    leshort        >0        not stripped
  7114.  
  7115. 0    leshort        0430        PDP-11 overlaid pure executable
  7116. >8    leshort        >0        not stripped
  7117.  
  7118. 0    leshort        0431        PDP-11 overlaid separate executable
  7119. >8    leshort        >0        not stripped
  7120.  
  7121. #------------------------------------------------------------------------------
  7122. # perl:  file(1) magic for Larry Wall's perl language.
  7123. #
  7124. # The ``eval'' line recognizes an outrageously clever hack for USG systems.
  7125. # Keith Waclena <keith@cerberus.uchicago.edu>
  7126. # Send additions to <perl5-porters@perl.org>
  7127. 0    string/b    #!\ /bin/perl            perl script text executable
  7128. 0    string        eval\ "exec\ /bin/perl        perl script text
  7129. 0    string/b    #!\ /usr/bin/perl        perl script text executable
  7130. 0    string        eval\ "exec\ /usr/bin/perl    perl script text
  7131. 0    string/b    #!\ /usr/local/bin/perl        perl script text
  7132. 0    string        eval\ "exec\ /usr/local/bin/perl    perl script text executable
  7133. 0    string        eval\ '(exit\ $?0)'\ &&\ eval\ 'exec    perl script text
  7134.  
  7135. # a couple more, by me
  7136. # XXX: christos matches
  7137. #0    regex        package        Perl5 module source text (via regex)
  7138. 0    string        package        Perl5 module source text
  7139.  
  7140. #------------------------------------------------------------------------------
  7141. # pgp:  file(1) magic for Pretty Good Privacy
  7142. #
  7143. 0       beshort         0x9900                  PGP key public ring
  7144. 0       beshort         0x9501                  PGP key security ring
  7145. 0       beshort         0x9500                  PGP key security ring
  7146. 0    beshort        0xa600            PGP encrypted data
  7147. 0       string          -----BEGIN\040PGP       PGP armored data
  7148. >15     string          PUBLIC\040KEY\040BLOCK- public key block
  7149. >15     string          MESSAGE-                message
  7150. >15     string          SIGNED\040MESSAGE-      signed message
  7151. >15     string          PGP\040SIGNATURE-       signature
  7152.  
  7153. #------------------------------------------------------------------------------
  7154. # pkgadd:  file(1) magic for SysV R4 PKG Datastreams
  7155. #
  7156. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  7157. #------------------------------------------------------------------------------
  7158. # plan9:  file(1) magic for AT&T Bell Labs' Plan 9 executables
  7159. #
  7160. 0    belong        0x000001EB    Plan 9 executable
  7161.  
  7162. #------------------------------------------------------------------------------
  7163. # plus5:  file(1) magic for Plus Five's UNIX MUMPS
  7164. #
  7165. # XXX - byte order?  Paging Hokey....
  7166. #
  7167. 0    short        0x259        mumps avl global
  7168. >2    byte        >0        (V%d)
  7169. >6    byte        >0        with %d byte name
  7170. >7    byte        >0        and %d byte data cells
  7171. 0    short        0x25a        mumps blt global
  7172. >2    byte        >0        (V%d)
  7173. >8    short        >0        - %d byte blocks
  7174. >15    byte        0x00        - P/D format
  7175. >15    byte        0x01        - P/K/D format
  7176. >15    byte        0x02        - K/D format
  7177. >15    byte        >0x02        - Bad Flags
  7178.  
  7179. #------------------------------------------------------------------------------
  7180. # printer:  file(1) magic for printer-formatted files
  7181. #
  7182.  
  7183. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  7184. 0    string        %!        PostScript document text
  7185. >2    string        PS-Adobe-    conforming
  7186. >>11    string        >\0        at level %.3s
  7187. >>>15    string        EPS        - type %s
  7188. >>>15    string        Query        - type %s
  7189. >>>15    string        ExitServer    - type %s
  7190. # Some PCs have the annoying habit of adding a ^D as a document separator
  7191. 0    string        \004%!        PostScript document text
  7192. >3    string        PS-Adobe-    conforming
  7193. >>12    string        >\0        at level %.3s
  7194. >>>16    string        EPS        - type %s
  7195. >>>16    string        Query        - type %s
  7196. >>>16    string        ExitServer    - type %s
  7197. 0    string        \033%-12345X%!PS    PostScript document
  7198.  
  7199.  
  7200. # DOS EPS Binary File Header
  7201. # From: Ed Sznyter <ews@Black.Market.NET>
  7202. 0       belong          0xC5D0D3C6      DOS EPS Binary File
  7203. >4      long            >0              Postscript starts at byte %d
  7204. >>8     long            >0              length %d
  7205. >>>12   long            >0              Metafile starts at byte %d
  7206. >>>>16  long            >0              length %d
  7207. >>>20   long            >0              TIFF starts at byte %d
  7208. >>>>24  long            >0              length %d
  7209.  
  7210. # Adobe's PostScript Printer Description (PPD) files
  7211. #       Yves Arrouye <arrouye@marin.fdn.fr>
  7212. #
  7213. 0      string          *PPD-Adobe:    PPD file
  7214. >13    string          x              \b, ve
  7215.  
  7216. # HP Printer Job Language
  7217. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  7218. # HP Printer Job Language
  7219. # The header found on Win95 HP plot files is the "Silliest Thing possible" 
  7220. # (TM)
  7221. # Every driver puts the language at some random position, with random case
  7222. # (LANGUAGE and Language)
  7223. # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
  7224. # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
  7225. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  7226. >&0    string        >\0            %s            
  7227. >>&0    string        >\0            %s            
  7228. >>>&0    string        >\0            %s        
  7229. >>>>&0    string        >\0            %s        
  7230. #>15    string        \ ENTER\ LANGUAGE\ =
  7231. #>31    string        PostScript        PostScript
  7232.  
  7233. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  7234. 0    string        \033E\033    HP PCL printer data
  7235. >3    string        \&l0A        - default page size
  7236. >3    string        \&l1A        - US executive page size
  7237. >3    string        \&l2A        - US letter page size
  7238. >3    string        \&l3A        - US legal page size
  7239. >3    string        \&l26A        - A4 page size
  7240. >3    string        \&l80A        - Monarch envelope size
  7241. >3    string        \&l81A        - No. 10 envelope size
  7242. >3    string        \&l90A        - Intl. DL envelope size
  7243. >3    string        \&l91A        - Intl. C5 envelope size
  7244. >3    string        \&l100A        - Intl. B5 envelope size
  7245. >3    string        \&l-81A        - No. 10 envelope size (landscape)
  7246. >3    string        \&l-90A        - Intl. DL envelope size (landscape)
  7247.  
  7248. # IMAGEN printer-ready files:
  7249. 0    string    @document(        Imagen printer
  7250. # this only works if "language xxx" is first item in Imagen header.
  7251. >10    string    language\ impress    (imPRESS data)
  7252. >10    string    language\ daisy        (daisywheel text)
  7253. >10    string    language\ diablo    (daisywheel text)
  7254. >10    string    language\ printer    (line printer emulation)
  7255. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  7256. # Add any other languages that your Imagen uses - remember
  7257. # to keep the word `text' if the file is human-readable.
  7258. # [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
  7259. #
  7260. # Now magic for IMAGEN font files...
  7261. 0    string        Rast        RST-format raster font data
  7262. >45    string        >0        face %
  7263. # From Jukka Ukkonen
  7264. 0    string        \033[K\002\0\0\017\033(a\001\0\001\033(g    Canon Bubble Jet BJC formatted data
  7265.  
  7266. # From <mike@flyn.org>
  7267. # These are the /etc/magic entries to decode data sent to an Epson printer.
  7268. 0       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
  7269.  
  7270.  
  7271. #------------------------------------------------------------------------------
  7272. # zenographics:  file(1) magic for Zenographics ZjStream printer data
  7273. # Rick Richardson  rickr@mn.rr.com
  7274. 0    string        JZJZ
  7275. >0x12    string        ZZ        Zenographics ZjStream printer data (big-endian)
  7276. 0    string        ZJZJ
  7277. >0x12    string        ZZ        Zenographics ZjStream printer data (little-endian)
  7278.  
  7279.  
  7280. #------------------------------------------------------------------------------
  7281. # Oak Technologies printer stream
  7282. # Rick Richardson <rickr@mn.rr.com>
  7283. 0       string          OAK
  7284. >0x07    byte        0
  7285. >0x0b    byte        0    Oak Technologies printer stream
  7286.  
  7287. # This would otherwise be recognized as PostScript - nick@debian.org
  7288. 0    string        %!VMF         SunClock's Vector Map Format data
  7289.  
  7290. #------------------------------------------------------------------------------
  7291. # HP LaserJet 1000 series downloadable firmware file
  7292. 0    string    \xbe\xefABCDEFGH    HP LaserJet 1000 series downloadable firmware   
  7293.  
  7294. #------------------------------------------------------------------------------
  7295. # project:  file(1) magic for Project management
  7296. # Magic strings for ftnchek project files. Alexander Mai
  7297. 0    string    FTNCHEK_\ P    project file for ftnchek
  7298. >10    string    1        version 2.7
  7299. >10    string    2        version 2.8 to 2.10
  7300. >10    string    3        version 2.11 or later
  7301.  
  7302. #------------------------------------------------------------------------------
  7303. # psdbms:  file(1) magic for psdatabase
  7304. #
  7305. 0    belong&0xff00ffff    0x56000000    ps database
  7306. >1    string    >\0    version %s
  7307. >4    string    >\0    from kernel %s
  7308.  
  7309. #------------------------------------------------------------------------------
  7310. # psion:  file(1) magic for Psion handhelds data
  7311. # from: Peter Breitenlohner <peb@mppmu.mpg.de>
  7312. #
  7313. 0    lelong        0x10000037    Psion Series 5
  7314. >4    lelong        0x10000039    font file
  7315. >4    lelong        0x1000003A    printer driver
  7316. >4    lelong        0x1000003B    clipboard
  7317. >4    lelong        0x10000042    multi-bitmap image
  7318. >4    lelong        0x1000006A    application infomation file
  7319. >4    lelong        0x1000006D
  7320. >>8    lelong        0x1000007D    sketch image
  7321. >>8    lelong        0x1000007E    voice note
  7322. >>8    lelong        0x1000007F    word file
  7323. >>8    lelong        0x10000085    OPL program
  7324. >>8    lelong        0x10000088    sheet file
  7325. >>8    lelong        0x100001C4    EasyFax initialisation file
  7326. >4    lelong        0x10000073    OPO module
  7327. >4    lelong        0x10000074    OPL application
  7328. >4    lelong        0x1000008A    exported multi-bitmap image
  7329.  
  7330. 0    lelong        0x10000041    Psion Series 5 ROM multi-bitmap image
  7331.  
  7332. 0    lelong        0x10000050    Psion Series 5
  7333. >4    lelong        0x1000006D    database
  7334. >4    lelong        0x100000E4    ini file
  7335.  
  7336. 0    lelong        0x10000079    Psion Series 5 binary:
  7337. >4    lelong        0x00000000    DLL
  7338. >4    lelong        0x10000049    comms hardware library
  7339. >4    lelong        0x1000004A    comms protocol library
  7340. >4    lelong        0x1000005D    OPX
  7341. >4    lelong        0x1000006C    application
  7342. >4    lelong        0x1000008D    DLL
  7343. >4    lelong        0x100000AC    logical device driver
  7344. >4    lelong        0x100000AD    physical device driver
  7345. >4    lelong        0x100000E5    file transfer protocol
  7346. >4    lelong        0x100000E5    file transfer protocol
  7347. >4    lelong        0x10000140    printer defintion
  7348. >4    lelong        0x10000141    printer defintion
  7349.  
  7350. 0    lelong        0x1000007A    Psion Series 5 executable
  7351.  
  7352. #------------------------------------------------------------------------------
  7353. # pulsar:  file(1) magic for Pulsar POP3 daemon binary files
  7354. #
  7355. # http://pulsar.sourceforge.net
  7356. # mailto:rok.papez@lugos.si
  7357. #
  7358.  
  7359. 0    belong    0x1ee7f11e    Pulsar POP3 daemon mailbox cache file.
  7360. >4    ubelong    x        Version: %d.
  7361. >8    ubelong    x        \b%d
  7362.  
  7363.  
  7364. #------------------------------------------------------------------------------
  7365. # pyramid:  file(1) magic for Pyramids
  7366. #
  7367. # XXX - byte order?
  7368. #
  7369. 0    long        0x50900107    Pyramid 90x family executable
  7370. 0    long        0x50900108    Pyramid 90x family pure executable
  7371. >16    long        >0        not stripped
  7372. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  7373. >16    long        >0        not stripped
  7374.  
  7375. #------------------------------------------------------------------------------
  7376. # python:  file(1) magic for python
  7377. #
  7378. # From: David Necas <yeti@physics.muni.cz>
  7379. # often the module starts with a multiline string
  7380. 0    string        """    a python script text executable
  7381. # MAGIC as specified in Python/import.c (1.5 to 2.3.0a)
  7382. # 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
  7383. 0    belong        0x994e0d0a    python 1.5/1.6 byte-compiled
  7384. 0    belong        0x87c60d0a    python 2.0 byte-compiled
  7385. 0    belong        0x2aeb0d0a    python 2.1 byte-compiled
  7386. 0    belong        0x2ded0d0a    python 2.2 byte-compiled
  7387. 0    belong        0x3bf20d0a    python 2.3 byte-compiled
  7388.  
  7389. #------------------------------------------------------------------------------
  7390. # file(1) magic for revision control files
  7391. # From Hendrik Scholz <hendrik@scholz.net>
  7392. 0   string /1\ :pserver:    cvs password text file
  7393.  
  7394. #------------------------------------------------------------------------------
  7395. # riff:  file(1) magic for RIFF format
  7396. # See
  7397. #
  7398. #    http://www.seanet.com/users/matts/riffmci/riffmci.htm
  7399. #
  7400. # AVI section extended by Patrik Rσdman <patrik+file-magic@iki.fi>
  7401. #
  7402. 0    string        RIFF        RIFF (little-endian) data
  7403. # RIFF Palette format
  7404. >8    string        PAL        \b, palette
  7405. >>16    leshort        x        \b, version %d
  7406. >>18    leshort        x        \b, %d entries
  7407. # RIFF Device Independent Bitmap format
  7408. >8    string        RDIB        \b, device-independent bitmap
  7409. >>16    string        BM        
  7410. >>>30    leshort        12        \b, OS/2 1.x format
  7411. >>>>34    leshort        x        \b, %d x
  7412. >>>>36    leshort        x        %d
  7413. >>>30    leshort        64        \b, OS/2 2.x format
  7414. >>>>34    leshort        x        \b, %d x
  7415. >>>>36    leshort        x        %d
  7416. >>>30    leshort        40        \b, Windows 3.x format
  7417. >>>>34    lelong        x        \b, %d x
  7418. >>>>38    lelong        x        %d x
  7419. >>>>44    leshort        x        %d
  7420. # RIFF MIDI format
  7421. >8    string        RMID        \b, MIDI
  7422. # RIFF Multimedia Movie File format
  7423. >8    string        RMMP        \b, multimedia movie
  7424. # Microsoft WAVE format (*.wav)
  7425. >8    string        WAVE        \b, WAVE audio
  7426. >>20    leshort        1        \b, Microsoft PCM
  7427. >>>34    leshort        >0        \b, %d bit
  7428. >>20    leshort        2        \b, Microsoft ADPCM
  7429. >>20    leshort        6        \b, ITU G.711 A-law
  7430. >>20    leshort        7        \b, ITU G.711 mu-law
  7431. >>20    leshort        17        \b, IMA ADPCM
  7432. >>20    leshort        20        \b, ITU G.723 ADPCM (Yamaha)
  7433. >>20    leshort        49        \b, GSM 6.10
  7434. >>20    leshort        64        \b, ITU G.721 ADPCM
  7435. >>20    leshort        80        \b, MPEG
  7436. >>20    leshort        85        \b, MPEG Layer 3
  7437. >>22    leshort        =1        \b, mono
  7438. >>22    leshort        =2        \b, stereo
  7439. >>22    leshort        >2        \b, %d channels
  7440. >>24    lelong        >0        %d Hz
  7441. # Corel Draw Picture
  7442. >8    string        CDRA        \b, Corel Draw Picture
  7443. # AVI == Audio Video Interleave
  7444. >8    string        AVI\040        \b, AVI
  7445. >>12    string          LIST
  7446. >>>20   string          hdrlavih
  7447. >>>>&36 lelong          x               \b, %lu x
  7448. >>>>&40 lelong          x               %lu,
  7449. >>>>&4  lelong          >1000000        <1 fps,
  7450. >>>>&4  lelong          1000000         1.00 fps,
  7451. >>>>&4  lelong          500000          2.00 fps,
  7452. >>>>&4  lelong          333333          3.00 fps,
  7453. >>>>&4  lelong          250000          4.00 fps,
  7454. >>>>&4  lelong          200000          5.00 fps,
  7455. >>>>&4  lelong          166667          6.00 fps,
  7456. >>>>&4  lelong          142857          7.00 fps,
  7457. >>>>&4  lelong          125000          8.00 fps,
  7458. >>>>&4  lelong          111111          9.00 fps,
  7459. >>>>&4  lelong          100000          10.00 fps,
  7460. # ]9.9,10.1[
  7461. >>>>&4  lelong          <101010
  7462. >>>>>&-4        lelong  >99010
  7463. >>>>>>&-4       lelong  !100000         ~10 fps,
  7464. >>>>&4  lelong          83333           12.00 fps,
  7465. # ]11.9,12.1[
  7466. >>>>&4  lelong          <84034
  7467. >>>>>&-4        lelong  >82645
  7468. >>>>>>&-4       lelong  !83333          ~12 fps,
  7469. >>>>&4  lelong          66667           15.00 fps,
  7470. # ]14.9,15.1[
  7471. >>>>&4  lelong          <67114
  7472. >>>>>&-4        lelong  >66225
  7473. >>>>>>&-4       lelong  !66667          ~15 fps,
  7474. >>>>&4  lelong          50000           20.00 fps,
  7475. >>>>&4  lelong          41708           23.98 fps,
  7476. >>>>&4  lelong          41667           24.00 fps,
  7477. # ]23.9,24.1[
  7478. >>>>&4  lelong          <41841
  7479. >>>>>&-4        lelong  >41494
  7480. >>>>>>&-4       lelong  !41708
  7481. >>>>>>>&-4      lelong  !41667          ~24 fps,
  7482. >>>>&4  lelong          40000           25.00 fps,
  7483. # ]24.9,25.1[
  7484. >>>>&4  lelong          <40161
  7485. >>>>>&-4        lelong  >39841
  7486. >>>>>>&-4       lelong  !40000          ~25 fps,
  7487. >>>>&4  lelong          33367           29.97 fps,
  7488. >>>>&4  lelong          33333           30.00 fps,
  7489. # ]29.9,30.1[
  7490. >>>>&4  lelong          <33445
  7491. >>>>>&-4        lelong  >33223
  7492. >>>>>>&-4       lelong  !33367
  7493. >>>>>>>&-4      lelong  !33333          ~30 fps,
  7494. >>>>&4  lelong          <32224          >30 fps,
  7495. ##>>>>&4  lelong          x               (%lu)
  7496. ##>>>>&20 lelong          x               %lu frames,
  7497. # Note: The tests below assume that the AVI has 1 or 2 streams,
  7498. #       "vids" optionally followed by "auds".
  7499. #       (Should cover 99.9% of all AVIs.)
  7500. # assuming avih length = 56
  7501. >>>88   string  LIST
  7502. >>>>96  string  strlstrh
  7503. >>>>>108        string  vids    video:
  7504. >>>>>>&0        lelong  0               uncompressed
  7505. # skip past vids strh
  7506. >>>>>>(104.l+108)       string  strf
  7507. >>>>>>>(104.l+132)      lelong          1       RLE 8bpp
  7508. >>>>>>>(104.l+132)      string/c        cvid    Cinepak
  7509. >>>>>>>(104.l+132)      string/c        i263    Intel I.263
  7510. >>>>>>>(104.l+132)      string/c        iv32    Indeo 3.2
  7511. >>>>>>>(104.l+132)      string/c        iv41    Indeo 4.1
  7512. >>>>>>>(104.l+132)      string/c        iv50    Indeo 5.0
  7513. >>>>>>>(104.l+132)      string/c        mp42    Microsoft MPEG-4 v2
  7514. >>>>>>>(104.l+132)      string/c        mp43    Microsoft MPEG-4 v3
  7515. >>>>>>>(104.l+132)      string/c        mjpg    Motion JPEG
  7516. >>>>>>>(104.l+132)      string/c        div3    DivX 3
  7517. >>>>>>>>112             string/c        div3    Low-Motion
  7518. >>>>>>>>112             string/c        div4    Fast-Motion
  7519. >>>>>>>(104.l+132)      string/c        divx    DivX 4
  7520. >>>>>>>(104.l+132)      string/c        dx50    DivX 5
  7521. >>>>>>>(104.l+132)      string/c        xvid    XviD
  7522. >>>>>>>(104.l+132)      lelong  0
  7523. ##>>>>>>>(104.l+132)      string  x       (%.4s)
  7524. # skip past first (video) LIST
  7525. >>>>(92.l+96)   string  LIST
  7526. >>>>>(92.l+104) string  strlstrh
  7527. >>>>>>(92.l+116)        string          auds    \b, audio:
  7528. # auds strh length = 56:
  7529. >>>>>>>(92.l+172)       string          strf
  7530. >>>>>>>>(92.l+180)      leshort 0x0001  uncompressed PCM
  7531. >>>>>>>>(92.l+180)      leshort 0x0002  ADPCM
  7532. >>>>>>>>(92.l+180)      leshort 0x0055  MPEG-1 Layer 3
  7533. >>>>>>>>(92.l+180)      leshort 0x2000  Dolby AC3
  7534. >>>>>>>>(92.l+180)      leshort 0x0161  DivX
  7535. ##>>>>>>>>(92.l+180)      leshort x       (0x%.4x)
  7536. >>>>>>>>(92.l+182)      leshort 1       (mono,
  7537. >>>>>>>>(92.l+182)      leshort 2       (stereo,
  7538. >>>>>>>>(92.l+182)      leshort >2      (%d channels,
  7539. >>>>>>>>(92.l+184)      lelong  x       %d Hz)
  7540. # auds strh length = 64:
  7541. >>>>>>>(92.l+180)       string          strf
  7542. >>>>>>>>(92.l+188)      leshort 0x0001  uncompressed PCM
  7543. >>>>>>>>(92.l+188)      leshort 0x0002  ADPCM
  7544. >>>>>>>>(92.l+188)      leshort 0x0055  MPEG-1 Layer 3
  7545. >>>>>>>>(92.l+188)      leshort 0x2000  Dolby AC3
  7546. >>>>>>>>(92.l+188)      leshort 0x0161  DivX
  7547. ##>>>>>>>>(92.l+188)      leshort x       (0x%.4x)
  7548. >>>>>>>>(92.l+190)      leshort 1       (mono,
  7549. >>>>>>>>(92.l+190)      leshort 2       (stereo,
  7550. >>>>>>>>(92.l+190)      leshort >2      (%d channels,
  7551. >>>>>>>>(92.l+192)      lelong  x       %d Hz)
  7552. # Animated Cursor format
  7553. >8    string        ACON        \b, animated cursor
  7554. # SoundFont 2 <mpruett@sgi.com>
  7555. >8    string        sfbk        SoundFont/Bank
  7556. # MPEG-1 wrapped in a RIFF, apparently
  7557. >8      string          CDXA            \b, wrapped MPEG-1 (CDXA)
  7558. >8    string        4XMV        \b, 4X Movie file 
  7559.  
  7560. #
  7561. # XXX - some of the below may only appear in little-endian form.
  7562. #
  7563. # Also "MV93" appears to be for one form of Macromedia Director
  7564. # files, and "GDMF" appears to be another multimedia format.
  7565. #
  7566. 0    string        RIFX        RIFF (big-endian) data
  7567. # RIFF Palette format
  7568. >8    string        PAL        \b, palette
  7569. >>16    beshort        x        \b, version %d
  7570. >>18    beshort        x        \b, %d entries
  7571. # RIFF Device Independent Bitmap format
  7572. >8    string        RDIB        \b, device-independent bitmap
  7573. >>16    string        BM        
  7574. >>>30    beshort        12        \b, OS/2 1.x format
  7575. >>>>34    beshort        x        \b, %d x
  7576. >>>>36    beshort        x        %d
  7577. >>>30    beshort        64        \b, OS/2 2.x format
  7578. >>>>34    beshort        x        \b, %d x
  7579. >>>>36    beshort        x        %d
  7580. >>>30    beshort        40        \b, Windows 3.x format
  7581. >>>>34    belong        x        \b, %d x
  7582. >>>>38    belong        x        %d x
  7583. >>>>44    beshort        x        %d
  7584. # RIFF MIDI format
  7585. >8    string        RMID        \b, MIDI
  7586. # RIFF Multimedia Movie File format
  7587. >8    string        RMMP        \b, multimedia movie
  7588. # Microsoft WAVE format (*.wav)
  7589. >8    string        WAVE        \b, WAVE audio
  7590. >>20    leshort        1        \b, Microsoft PCM
  7591. >>>34    leshort        >0        \b, %d bit
  7592. >>22    beshort        =1        \b, mono
  7593. >>22    beshort        =2        \b, stereo
  7594. >>22    beshort        >2        \b, %d channels
  7595. >>24    belong        >0        %d Hz
  7596. # Corel Draw Picture
  7597. >8    string        CDRA        \b, Corel Draw Picture
  7598. # AVI == Audio Video Interleave
  7599. >8    string        AVI\040        \b, AVI
  7600. # Animated Cursor format
  7601. >8    string        ACON        \b, animated cursor
  7602. # Notation Interchange File Format (big-endian only)
  7603. >8    string        NIFF        \b, Notation Interchange File Format
  7604. # SoundFont 2 <mpruett@sgi.com>
  7605. >8    string        sfbk        SoundFont/Bank
  7606. #------------------------------------------------------------------------------
  7607. #
  7608. # RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt@redhat.com)
  7609. #
  7610. 0    beshort        0xedab
  7611. >2    beshort        0xeedb        RPM
  7612. >>4    byte        x        v%d
  7613. >>6    beshort        0        bin
  7614. >>6    beshort        1        src
  7615. >>8    beshort        1        i386
  7616. >>8    beshort        2        Alpha
  7617. >>8    beshort        3        Sparc
  7618. >>8    beshort        4        MIPS
  7619. >>8    beshort        5        PowerPC
  7620. >>8    beshort        6        68000
  7621. >>8    beshort        7    SGI
  7622. >>8    beshort        8        RS6000
  7623. >>8    beshort        9        IA64
  7624. >>8    beshort        10        Sparc64
  7625. >>8    beshort        11        MIPSel
  7626. >>8    beshort        12        ARM
  7627. >>10    string        x        %s
  7628.  
  7629. #------------------------------------------------------------------------------
  7630. # rtf:    file(1) magic for Rich Text Format (RTF)
  7631. #
  7632. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  7633. #
  7634. 0    string        {\\rtf        Rich Text Format data,
  7635. >5    byte        x        version %c,
  7636. >6    string        \\ansi        ANSI
  7637. >6    string        \\mac        Apple Macintosh
  7638. >6    string        \\pc        IBM PC, code page 437
  7639. >6    string        \\pca        IBM PS/2, code page 850
  7640.  
  7641. #------------------------------------------------------------------------------
  7642. # sc:  file(1) magic for "sc" spreadsheet
  7643. #
  7644. 38    string        Spreadsheet    sc spreadsheet file
  7645.  
  7646. #------------------------------------------------------------------------------
  7647. # sccs:  file(1) magic for SCCS archives
  7648. #
  7649. # SCCS archive structure:
  7650. # \001h01207
  7651. # \001s 00276/00000/00000
  7652. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  7653. # \001c date and time created 87/09/23 08:09:20 by ian
  7654. # \001e
  7655. # \001u
  7656. # \001U
  7657. # ... etc.
  7658. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  7659. # *Sigh*. And these both came from various parts of the USG.
  7660. # Maybe we should just switch everybody from SCCS to RCS!
  7661. # Further, you can't just say '\001h0', because the five-digit number
  7662. # is a checksum that could (presumably) have any leading digit,
  7663. # and we don't have regular expression matching yet. 
  7664. # Hence the following official kludge:
  7665. 8    string        \001s\             SCCS archive data
  7666.  
  7667. #------------------------------------------------------------------------------
  7668. # sendmail:  file(1) magic for sendmail config files
  7669. #
  7670. # XXX - byte order?
  7671. #
  7672. 0    byte    046      Sendmail frozen configuration 
  7673. >16    string    >\0      - version %s
  7674. 0    short    0x271c      Sendmail frozen configuration
  7675. >16    string    >\0      - version %s
  7676.  
  7677. #------------------------------------------------------------------------------
  7678. # sendmail:  file(1) magic for sendmail m4(1) files
  7679. #
  7680. # From Hendrik Scholz <hendrik@scholz.net>
  7681. # i.e. files in /usr/share/sendmail/cf/
  7682. #
  7683. 0   string  divert(-1)\n    sendmail m4 text file
  7684.  
  7685.  
  7686. #------------------------------------------------------------------------------
  7687. # sequent:  file(1) magic for Sequent machines
  7688. #
  7689. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  7690. # For Sequent's multiprocessor systems (incomplete).
  7691. 0    lelong    0x00ea            BALANCE NS32000 .o
  7692. >16    lelong    >0        not stripped
  7693. >124    lelong    >0        version %ld
  7694. 0    lelong    0x10ea            BALANCE NS32000 executable (0 @ 0)
  7695. >16    lelong  >0                not stripped
  7696. >124    lelong    >0        version %ld
  7697. 0    lelong    0x20ea            BALANCE NS32000 executable (invalid @ 0)
  7698. >16    lelong  >0                not stripped
  7699. >124    lelong    >0        version %ld
  7700. 0    lelong    0x30ea            BALANCE NS32000 standalone executable
  7701. >16    lelong  >0              not stripped
  7702. >124    lelong    >0        version %ld
  7703. #
  7704. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  7705. # Symmetry magic nums will not be reached if DOS COM comes before them;
  7706. # byte 0xeb is matched before these get a chance.
  7707. 0    leshort    0x12eb        SYMMETRY i386 .o
  7708. >16    lelong    >0        not stripped
  7709. >124    lelong    >0        version %ld
  7710. 0    leshort    0x22eb        SYMMETRY i386 executable (0 @ 0)
  7711. >16    lelong    >0        not stripped
  7712. >124    lelong    >0        version %ld
  7713. 0    leshort    0x32eb        SYMMETRY i386 executable (invalid @ 0)
  7714. >16    lelong    >0        not stripped
  7715. >124    lelong    >0        version %ld
  7716. 0    leshort    0x42eb        SYMMETRY i386 standalone executable
  7717. >16    lelong    >0        not stripped
  7718. >124    lelong    >0        version %ld
  7719.  
  7720. #------------------------------------------------------------------------------
  7721. # sgi:  file(1) magic for Silicon Graphics applications
  7722.  
  7723. #
  7724. #
  7725. # Performance Co-Pilot file types
  7726. 0    string    PmNs                PCP compiled namespace (V.0)
  7727. 0    string    PmN                PCP compiled namespace
  7728. >3    lelong    x                (V.%1.1s)
  7729. 3    lelong    0x84500526            PCP archive
  7730. >7    byte    x                (V.%d)
  7731. >20    lelong    -2                temporal index
  7732. >20    lelong    -1                metadata
  7733. >20    lelong    0                log volume #0
  7734. >20    lelong    >0                log volume #%ld
  7735. >24    lelong    x                host: %s
  7736. 0    string    PCPFolio            PCP 
  7737. >9    string    Version:            Archive Folio
  7738. >18    lelong    x                (V.%s)
  7739. 0    string    #pmchart            PCP pmchart view
  7740. >9    string    Version
  7741. >17    lelong    x                (V%-3.3s)
  7742. 0    string    pmview                PCP pmview config
  7743. >7    string    Version
  7744. >15    lelong    x                (V%-3.3s)
  7745. 0    string    #pmlogger            PCP pmlogger config
  7746. >10    string    Version
  7747. >18    lelong    x                (V%1.1s)
  7748. 0    string    PcPh                PCP Help 
  7749. >4    string    1                Index
  7750. >4    string    2                Text
  7751. >5    lelong    x                (V.%1.1s)
  7752. 0    string    #pmieconf-rules            PCP pmieconf rules
  7753. >16    lelong    x                (V.%1.1s)
  7754. 3    string    pmieconf-pmie            PCP pmie config
  7755. >17    lelong    x                (V.%1.1s)
  7756.  
  7757. # SpeedShop data files
  7758. 0    lelong    0x13130303            SpeedShop data file
  7759.  
  7760. # mdbm files
  7761. 0    lelong    0x01023962            mdbm file, version 0 (obsolete)
  7762. 0    string    mdbm                mdbm file,
  7763. >5    byte    x                version %d,
  7764. >6    byte    x                2^%d pages,
  7765. >7    byte    x                pagesize 2^%d,
  7766. >17    byte    x                hash %d,
  7767. >11    byte    x                dataformat %d
  7768.  
  7769. # Alias|Wavefront Maya files
  7770. 0    string    //Maya ASCII    Alias|Wavefront Maya Ascii File,
  7771. >13    lelong    x    version %s
  7772. 8    string    MAYAFOR4    Alias|Wavefront Maya Binary File,
  7773. >32    lelong    x    version %s scene
  7774. 8    string    MayaFOR4    Alias|Wavefront Maya Binary File,
  7775. >32    lelong    x    version %s scene
  7776. 8    string    CIMG        Alias|Wavefront Maya Image File
  7777. 8    string    DEEP        Alias|Wavefront Maya Image File
  7778.  
  7779. #------------------------------------------------------------------------------
  7780. # sgml:  file(1) magic for Standard Generalized Markup Language
  7781. # HyperText Markup Language (HTML) is an SGML document type,
  7782. # from Daniel Quinlan (quinlan@yggdrasil.com)
  7783. # adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
  7784. 0   string/cB    \<!DOCTYPE\ html    HTML document text
  7785. 0   string/cb    \<head            HTML document text
  7786. 0   string/cb    \<title            HTML document text
  7787. 0   string/cb    \<html            HTML document text
  7788.  
  7789. # Extensible markup language (XML), a subset of SGML
  7790. # from Marc Prud'hommeaux (marc@apocalypse.org)
  7791. 0    string        \<?xml\ version="    XML
  7792. >15    string        >\0            %.3s document text
  7793. >>23    string        \<xsl:stylesheet    (XSL stylesheet)
  7794. >>24    string        \<xsl:stylesheet    (XSL stylesheet)
  7795. 0    string/b    \<?xml            XML document text
  7796. 0    string/cb    \<?xml            broken XML document text
  7797.  
  7798.  
  7799. # SGML, mostly from rph@sq
  7800. 0   string/cb    \<!doctype        exported SGML document text
  7801. 0   string/cb    \<!subdoc        exported SGML subdocument text
  7802. 0   string/cb    \<!--            exported SGML document text
  7803.  
  7804. # Web browser cookie files
  7805. # (Mozilla, Galeon, Netscape 4, Konqueror..)
  7806. # Ulf Harnhammar <ulfh@update.uu.se>
  7807. 0    string    #\ HTTP\ Cookie\ File    Web browser cookie text
  7808. 0    string    #\ Netscape\ HTTP\ Cookie\ File    Netscape cookie text
  7809. 0    string    #\ KDE\ Cookie\ File    Konqueror cookie text
  7810.  
  7811. #------------------------------------------------------------------------
  7812. # file(1) magic for sharc files
  7813. #
  7814. # SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by 
  7815. # FutureGroove Music (dsp@futuregroove.de)
  7816.  
  7817. #------------------------------------------------------------------------
  7818. 0    string            Draw        RiscOS Drawfile
  7819. 0    string            PACK        RiscOS PackdDir archive
  7820.  
  7821. #------------------------------------------------------------------------
  7822. # SHARC DSP stuff (based on the FGM SHARC DSP SDK)
  7823.  
  7824. 0    string            !        Assembler source
  7825. 0    string            Analog        ADi asm listing file
  7826. 0    string            .SYSTEM        SHARC architecture file
  7827. 0    string            .system        SHARC architecture file
  7828.  
  7829. 0    leshort            0x521C        SHARC COFF binary
  7830. >2    leshort            >1        , %hd sections
  7831. >>12    lelong            >0        , not stripped
  7832.  
  7833. #------------------------------------------------------------------------------
  7834. # sinclair:  file(1) sinclair QL
  7835.  
  7836. # additions to /etc/magic by Thomas M. Ott (ThMO)
  7837.  
  7838. # Sinclair QL floppy disk formats (ThMO)
  7839. 0    string    =QL5        QL disk dump data,
  7840. >3    string    =A        720 KB,
  7841. >3    string    =B        1.44 MB,
  7842. >3    string    =C        3.2 MB,
  7843. >4    string    >\0        label:%.10s
  7844.  
  7845. # Sinclair QL OS dump (ThMO)
  7846. # (NOTE: if `file' would be able to use indirect references in a endian format
  7847. #     differing from the natural host format, this could be written more
  7848. #     reliably and faster...)
  7849. #
  7850. # we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
  7851. # than the first 8K of a file... #-(
  7852. #
  7853. #0        belong    =0x30000
  7854. #>49124        belong    <47104
  7855. #>>49128        belong    <47104
  7856. #>>>49132    belong    <47104
  7857. #>>>>49136    belong    <47104    QL OS dump data,
  7858. #>>>>>49148    string    >\0    type %.3s,
  7859. #>>>>>49142    string    >\0    version %.4s
  7860.  
  7861. # Sinclair QL firmware executables (ThMO)
  7862. 0    string    NqNqNq`\004    QL firmware executable (BCPL)
  7863.  
  7864. # Sinclair QL libraries (ThMO)
  7865. 0    beshort    =0xFB01        QL library archive data
  7866.  
  7867. # Sinclair QL executbables (ThMO)
  7868. 6    beshort    =0x4AFB        QL executable,
  7869. >10    string    =\0        un-named
  7870. >8    beshort    =1
  7871. >>10    string    >\0        named: %.1s
  7872. >8    beshort    =2
  7873. >>10    string    >\0        named: %.2s
  7874. >8    beshort    =3
  7875. >>10    string    >\0        named: %.3s
  7876. >8    beshort    =4
  7877. >>10    string    >\0        named: %.4s
  7878. >8    beshort    =5
  7879. >>10    string    >\0        named: %.5s
  7880. >8    beshort    =6
  7881. >>10    string    >\0        named: %.6s
  7882. >8    beshort    =7
  7883. >>10    string    >\0        named: %.7s
  7884. >8    beshort    =8
  7885. >>10    string    >\0        named: %.8s
  7886. >8    beshort    =9
  7887. >>10    string    >\0        named: %.9s
  7888. >8    beshort    =10
  7889. >>10    string    >\0        named: %.10s
  7890. >8    beshort    =11
  7891. >>10    string    >\0        named: %.11s
  7892. >8    beshort    =12
  7893. >>10    string    >\0        named: %.12s
  7894. >8    beshort    =13
  7895. >>10    string    >\0        named: %.13s
  7896. >8    beshort    =14
  7897. >>10    string    >\0        named: %.14s
  7898. >8    beshort    =15
  7899. >>10    string    >\0        named: %.15s
  7900. >8    beshort    =16
  7901. >>10    string    >\0        named: %.16s
  7902. >8    beshort    =17
  7903. >>10    string    >\0        named: %.17s
  7904. >8    beshort    =18
  7905. >>10    string    >\0        named: %.18s
  7906. >8    beshort    =19
  7907. >>10    string    >\0        named: %.19s
  7908. >8    beshort    =20
  7909. >>10    string    >\0        named: %.20s
  7910. >8    beshort    >20
  7911. >>10    string    >\0        (truncated) named: %.20s
  7912.  
  7913. # Sinclair QL rom (ThMO)
  7914. 0    belong    =0x4AFB0001    QL plugin-ROM data,
  7915. >10    string    =\0        un-named
  7916. >8    beshort    =1
  7917. >>10    string    >\0        named: %.1s
  7918. >8    beshort    =2
  7919. >>10    string    >\0        named: %.2s
  7920. >8    beshort    =3
  7921. >>10    string    >\0        named: %.3s
  7922. >8    beshort    =4
  7923. >>10    string    >\0        named: %.4s
  7924. >8    beshort    =5
  7925. >>10    string    >\0        named: %.5s
  7926. >8    beshort    =6
  7927. >>10    string    >\0        named: %.6s
  7928. >8    beshort    =7
  7929. >>10    string    >\0        named: %.7s
  7930. >8    beshort    =8
  7931. >>10    string    >\0        named: %.8s
  7932. >8    beshort    =9
  7933. >>10    string    >\0        named: %.9s
  7934. >8    beshort    =10
  7935. >>10    string    >\0        named: %.10s
  7936. >8    beshort    =11
  7937. >>10    string    >\0        named: %.11s
  7938. >8    beshort    =12
  7939. >>10    string    >\0        named: %.12s
  7940. >8    beshort    =13
  7941. >>10    string    >\0        named: %.13s
  7942. >8    beshort    =14
  7943. >>10    string    >\0        named: %.14s
  7944. >8    beshort    =15
  7945. >>10    string    >\0        named: %.15s
  7946. >8    beshort    =16
  7947. >>10    string    >\0        named: %.16s
  7948. >8    beshort    =17
  7949. >>10    string    >\0        named: %.17s
  7950. >8    beshort    =18
  7951. >>10    string    >\0        named: %.18s
  7952. >8    beshort    =19
  7953. >>10    string    >\0        named: %.19s
  7954. >8    beshort    =20
  7955. >>10    string    >\0        named: %.20s
  7956. >8    beshort    >20
  7957. >>10    string    >\0        (truncated) named: %.20s
  7958.  
  7959. #------------------------------------------------------------------------------
  7960. # Sketch Drawings: http://sketch.sourceforge.net/ 
  7961. # From: Edwin Mons <e@ik.nu>
  7962. 0    string    ##Sketch    Sketch document text
  7963.  
  7964. #-----------------------------------------------
  7965. # GNU Smalltalk image, starting at version 1.6.2
  7966. # From: catull_us@yahoo.com
  7967. #
  7968. 0    string    GSTIm\0\0    GNU SmallTalk
  7969. # little-endian
  7970. >7    byte&1    =0        LE image version
  7971. >>10    byte    x        %d.
  7972. >>9    byte    x        \b%d.
  7973. >>8    byte    x        \b%d
  7974. #>>12    lelong    x        , data: %ld
  7975. #>>16    lelong    x        , table: %ld
  7976. #>>20    lelong    x        , memory: %ld
  7977. # big-endian
  7978. >7    byte&1    =1        BE image version
  7979. >>8    byte    x        %d.
  7980. >>9    byte    x        \b%d.
  7981. >>10    byte    x        \b%d
  7982. #>>12    belong    x        , data: %ld
  7983. #>>16    belong    x        , table: %ld
  7984. #>>20    belong    x        , memory: %ld
  7985.  
  7986.  
  7987.  
  7988. #------------------------------------------------------------------------------
  7989. # sniffer:  file(1) magic for packet capture files
  7990. #
  7991. # From: guy@alum.mit.edu (Guy Harris)
  7992. #
  7993.  
  7994. #
  7995. # Microsoft Network Monitor 1.x capture files.
  7996. #
  7997. 0    string        RTSS        NetMon capture file
  7998. >4    byte        x        - version %d
  7999. >5    byte        x        \b.%d
  8000. >6    leshort        0        (Unknown)
  8001. >6    leshort        1        (Ethernet)
  8002. >6    leshort        2        (Token Ring)
  8003. >6    leshort        3        (FDDI)
  8004.  
  8005. #
  8006. # Microsoft Network Monitor 2.x capture files.
  8007. #
  8008. 0    string        GMBU        NetMon capture file
  8009. >4    byte        x        - version %d
  8010. >5    byte        x        \b.%d
  8011. >6    leshort        0        (Unknown)
  8012. >6    leshort        1        (Ethernet)
  8013. >6    leshort        2        (Token Ring)
  8014. >6    leshort        3        (FDDI)
  8015.  
  8016. #
  8017. # Network General Sniffer capture files.
  8018. # Sorry, make that "Network Associates Sniffer capture files."
  8019. #
  8020. 0    string        TRSNIFF\ data\ \ \ \ \032    Sniffer capture file
  8021. >33    byte        2        (compressed)
  8022. >23    leshort        x        - version %d
  8023. >25    leshort        x        \b.%d
  8024. >32    byte        0        (Token Ring)
  8025. >32    byte        1        (Ethernet)
  8026. >32    byte        2        (ARCNET)
  8027. >32    byte        3        (StarLAN)
  8028. >32    byte        4        (PC Network broadband)
  8029. >32    byte        5        (LocalTalk)
  8030. >32    byte        6        (Znet)
  8031. >32    byte        7        (Internetwork Analyzer)
  8032. >32    byte        9        (FDDI)
  8033. >32    byte        10        (ATM)
  8034.  
  8035. #
  8036. # Cinco Networks NetXRay capture files.
  8037. # Sorry, make that "Network General Sniffer Basic capture files."
  8038. # Sorry, make that "Network Associates Sniffer Basic capture files."
  8039. # Sorry, make that "Network Associates Sniffer Basic, and Windows
  8040. # Sniffer Pro", capture files."
  8041. #
  8042. 0    string        XCP\0        NetXRay capture file
  8043. >4    string        >\0        - version %s
  8044. >44    leshort        0        (Ethernet)
  8045. >44    leshort        1        (Token Ring)
  8046. >44    leshort        2        (FDDI)
  8047.  
  8048. #
  8049. # "libpcap" capture files.
  8050. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  8051. # the main program that uses that format, but there are other programs
  8052. # that use "libpcap", or that use the same capture file format.)
  8053. #
  8054. 0    ubelong        0xa1b2c3d4    tcpdump capture file (big-endian)
  8055. >4    beshort        x        - version %d
  8056. >6    beshort        x        \b.%d
  8057. >20    belong        0        (No link-layer encapsulation
  8058. >20    belong        1        (Ethernet
  8059. >20    belong        2        (3Mb Ethernet
  8060. >20    belong        3        (AX.25
  8061. >20    belong        4        (ProNET
  8062. >20    belong        5        (CHAOS
  8063. >20    belong        6        (Token Ring
  8064. >20    belong        7        (ARCNET
  8065. >20    belong        8        (SLIP
  8066. >20    belong        9        (PPP
  8067. >20    belong        10        (FDDI
  8068. >20    belong        11        (RFC 1483 ATM
  8069. >20    belong        12        (raw IP
  8070. >20    belong        13        (BSD/OS SLIP
  8071. >20    belong        14        (BSD/OS PPP
  8072. >20    belong        50        (PPP or Cisco HDLC
  8073. >20    belong        51        (PPP-over-Ethernet
  8074. >20    belong        100        (RFC 1483 ATM
  8075. >20    belong        101        (raw IP
  8076. >20    belong        102        (BSD/OS SLIP
  8077. >20    belong        103        (BSD/OS PPP
  8078. >20    belong        104        (BSD/OS Cisco HDLC
  8079. >20    belong        105        (802.11
  8080. >20    belong        106        (Linux Classical IP over ATM
  8081. >20    belong        108        (OpenBSD loopback
  8082. >20    belong        109        (OpenBSD IPSEC encrypted
  8083. >20    belong        113        (Linux "cooked"
  8084. >20    belong        114        (LocalTalk
  8085. >16    belong        x        \b, capture length %d)
  8086. 0    ulelong        0xa1b2c3d4    tcpdump capture file (little-endian)
  8087. >4    leshort        x        - version %d
  8088. >6    leshort        x        \b.%d
  8089. >20    lelong        0        (No link-layer encapsulation
  8090. >20    lelong        1        (Ethernet
  8091. >20    lelong        2        (3Mb Ethernet
  8092. >20    lelong        3        (AX.25
  8093. >20    lelong        4        (ProNET
  8094. >20    lelong        5        (CHAOS
  8095. >20    lelong        6        (Token Ring
  8096. >20    lelong        7        (ARCNET
  8097. >20    lelong        8        (SLIP
  8098. >20    lelong        9        (PPP
  8099. >20    lelong        10        (FDDI
  8100. >20    lelong        11        (RFC 1483 ATM
  8101. >20    lelong        12        (raw IP
  8102. >20    lelong        13        (BSD/OS SLIP
  8103. >20    lelong        14        (BSD/OS PPP
  8104. >20    lelong        50        (PPP or Cisco HDLC
  8105. >20    lelong        51        (PPP-over-Ethernet
  8106. >20    lelong        100        (RFC 1483 ATM
  8107. >20    lelong        101        (raw IP
  8108. >20    lelong        102        (BSD/OS SLIP
  8109. >20    lelong        103        (BSD/OS PPP
  8110. >20    lelong        104        (BSD/OS Cisco HDLC
  8111. >20    lelong        105        (802.11
  8112. >20    lelong        106        (Linux Classical IP over ATM
  8113. >20    lelong        108        (OpenBSD loopback
  8114. >20    lelong        109        (OpenBSD IPSEC encrypted
  8115. >20    lelong        113        (Linux "cooked"
  8116. >20    lelong        114        (LocalTalk
  8117. >16    lelong        x        \b, capture length %d)
  8118.  
  8119. #
  8120. # "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
  8121. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  8122. # the main program that uses that format, but there are other programs
  8123. # that use "libpcap", or that use the same capture file format.)
  8124. #
  8125. 0    ubelong        0xa1b2cd34    extended tcpdump capture file (big-endian)
  8126. >4    beshort        x        - version %d
  8127. >6    beshort        x        \b.%d
  8128. >20    belong        0        (No link-layer encapsulation
  8129. >20    belong        1        (Ethernet
  8130. >20    belong        2        (3Mb Ethernet
  8131. >20    belong        3        (AX.25
  8132. >20    belong        4        (ProNET
  8133. >20    belong        5        (CHAOS
  8134. >20    belong        6        (Token Ring
  8135. >20    belong        7        (ARCNET
  8136. >20    belong        8        (SLIP
  8137. >20    belong        9        (PPP
  8138. >20    belong        10        (FDDI
  8139. >20    belong        11        (RFC 1483 ATM
  8140. >20    belong        12        (raw IP
  8141. >20    belong        13        (BSD/OS SLIP
  8142. >20    belong        14        (BSD/OS PPP
  8143. >16    belong        x        \b, capture length %d)
  8144. 0    ulelong        0xa1b2cd34    extended tcpdump capture file (little-endian)
  8145. >4    leshort        x        - version %d
  8146. >6    leshort        x        \b.%d
  8147. >20    lelong        0        (No link-layer encapsulation
  8148. >20    lelong        1        (Ethernet
  8149. >20    lelong        2        (3Mb Ethernet
  8150. >20    lelong        3        (AX.25
  8151. >20    lelong        4        (ProNET
  8152. >20    lelong        5        (CHAOS
  8153. >20    lelong        6        (Token Ring
  8154. >20    lelong        7        (ARCNET
  8155. >20    lelong        8        (SLIP
  8156. >20    lelong        9        (PPP
  8157. >20    lelong        10        (FDDI
  8158. >20    lelong        11        (RFC 1483 ATM
  8159. >20    lelong        12        (raw IP
  8160. >20    lelong        13        (BSD/OS SLIP
  8161. >20    lelong        14        (BSD/OS PPP
  8162. >16    lelong        x        \b, capture length %d)
  8163.  
  8164. #
  8165. # AIX "iptrace" capture files.
  8166. #
  8167. 0    string        iptrace\ 2.0    "iptrace" capture file
  8168.  
  8169. #
  8170. # Novell LANalyzer capture files.
  8171. #
  8172. 0    leshort        0x1001        LANalyzer capture file
  8173. 0    leshort        0x1007        LANalyzer capture file
  8174.  
  8175. #
  8176. # HP-UX "nettl" capture files.
  8177. #
  8178. 0    string        \x54\x52\x00\x64\x00    "nettl" capture file
  8179.  
  8180. #
  8181. # RADCOM WAN/LAN Analyzer capture files.
  8182. #
  8183. 0    string        \x42\xd2\x00\x34\x12\x66\x22\x88    RADCOM WAN/LAN Analyzer capture file
  8184.  
  8185. #
  8186. # NetStumbler log files.  Not really packets, per se, but about as
  8187. # close as you can get.  These are log files from NetStumbler, a
  8188. # Windows program, that scans for 802.11b networks.
  8189. #
  8190. 0    string        NetS        NetStumbler log file
  8191. >8    lelong        x        \b, %d stations found
  8192.  
  8193. #------------------------------------------------------------------------------
  8194. # softquad:  file(1) magic for SoftQuad Publishing Software
  8195. #
  8196. # Author/Editor and RulesBuilder
  8197. #
  8198. # XXX - byte order?
  8199. #
  8200. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  8201. >9    string        >\0         Type %s
  8202. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  8203. >9    string        >\0         Type %s
  8204. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  8205. >9    string        >\0         Type %s
  8206. 0    short        0xc0de        Compiled PSI (v1) data
  8207. 0    short        0xc0da        Compiled PSI (v2) data
  8208. >3    string        >\0        (%s)
  8209. # Binary sqtroff font/desc files...
  8210. 0    short        0125252        SoftQuad DESC or font file binary
  8211. >2    short        >0        - version %d
  8212. # Bitmaps...
  8213. 0    string        SQ\ BITMAP1    SoftQuad Raster Format text
  8214. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  8215. # sqtroff intermediate language (replacement for ditroff int. lang.)
  8216. 0    string        X\         SoftQuad troff Context intermediate
  8217. >2    string        495        for AT&T 495 laser printer
  8218. >2    string        hp        for Hewlett-Packard LaserJet
  8219. >2    string        impr        for IMAGEN imPRESS
  8220. >2    string        ps        for PostScript
  8221.  
  8222. #------------------------------------------------------------------------------
  8223. # spectrum:  file(1) magic for Spectrum emulator files.
  8224. #
  8225. # John Elliott <jce@seasip.demon.co.uk>
  8226.  
  8227. #
  8228. # Spectrum +3DOS header
  8229. #
  8230. 0       string          PLUS3DOS\032    Spectrum +3 data
  8231. >15     byte            0               - BASIC program
  8232. >15     byte            1               - number array
  8233. >15     byte            2               - character array
  8234. >15     byte            3               - memory block
  8235. >>16    belong          0x001B0040      (screen)
  8236. >15     byte            4               - Tasword document
  8237. >15     string          TAPEFILE        - ZXT tapefile
  8238. #
  8239. # Tape file. This assumes the .TAP starts with a Spectrum-format header,
  8240. # which nearly all will.
  8241. #
  8242. 0       string          \023\000\000    Spectrum .TAP data
  8243. >4      string          x               "%-10.10s"
  8244. >3      byte            0               - BASIC program
  8245. >3      byte            1               - number array
  8246. >3      byte            2               - character array
  8247. >3      byte            3               - memory block
  8248. >>14    belong          0x001B0040      (screen)
  8249.  
  8250. # The following three blocks are from pak21-spectrum@srcf.ucam.org
  8251. # TZX tape images
  8252. 0      string          ZXTape!\x1a     Spectrum .TZX data
  8253. >8     byte            x               version %d
  8254. >9     byte            x               .%d
  8255.  
  8256. # RZX input recording files
  8257. 0      string          RZX!            Spectrum .RZX data
  8258. >4     byte            x               version %d
  8259. >5     byte            x               .%d
  8260.  
  8261. # And three sorts of disk image
  8262. 0      string          MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
  8263. 0      string          MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
  8264. 0      string          EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
  8265.  
  8266. #------------------------------------------------------------------------------
  8267. # sql:  file(1) magic for SQL files
  8268. #
  8269. # From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
  8270. # Recognize some MySQL files.
  8271. #
  8272. 0    beshort            0xfe01        MySQL table definition file
  8273. >2    byte            x        Version %d
  8274. 0    belong&0xffffff00    0xfefe0300    MySQL MISAM index file
  8275. >3    byte            x        Version %d
  8276. 0    belong&0xffffff00    0xfefe0700    MySQL MISAM compressed data file
  8277. >3    byte            x        Version %d
  8278. 0    belong&0xffffff00    0xfefe0500    MySQL ISAM index file
  8279. >3    byte            x        Version %d
  8280. 0    belong&0xffffff00    0xfefe0600    MySQL ISAM compressed data file
  8281. >3    byte            x        Version %d
  8282. 0    string             \376bin        MySQL replication log
  8283.  
  8284. #------------------------------------------------------------------------------
  8285. # sun:  file(1) magic for Sun machines
  8286. #
  8287. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  8288. # releases.  (5.x uses ELF.)
  8289. #
  8290. 0    belong&077777777    0600413        sparc demand paged
  8291. >0    byte        &0x80
  8292. >>20    belong        <4096        shared library
  8293. >>20    belong        =4096        dynamically linked executable
  8294. >>20    belong        >4096        dynamically linked executable
  8295. >0    byte        ^0x80        executable
  8296. >16    belong        >0        not stripped
  8297. 0    belong&077777777    0600410        sparc pure
  8298. >0    byte        &0x80        dynamically linked executable
  8299. >0    byte        ^0x80        executable
  8300. >16    belong        >0        not stripped
  8301. 0    belong&077777777    0600407        sparc
  8302. >0    byte        &0x80        dynamically linked executable
  8303. >0    byte        ^0x80        executable
  8304. >16    belong        >0        not stripped
  8305.  
  8306. 0    belong&077777777    0400413        mc68020 demand paged
  8307. >0    byte        &0x80
  8308. >>20    belong        <4096        shared library
  8309. >>20    belong        =4096        dynamically linked executable
  8310. >>20    belong        >4096        dynamically linked executable
  8311. >16    belong        >0        not stripped
  8312. 0    belong&077777777    0400410        mc68020 pure
  8313. >0    byte        &0x80        dynamically linked executable
  8314. >0    byte        ^0x80        executable
  8315. >16    belong        >0        not stripped
  8316. 0    belong&077777777    0400407        mc68020
  8317. >0    byte        &0x80        dynamically linked executable
  8318. >0    byte        ^0x80        executable
  8319. >16    belong        >0        not stripped
  8320.  
  8321. 0    belong&077777777    0200413        mc68010 demand paged
  8322. >0    byte        &0x80
  8323. >>20    belong        <4096        shared library
  8324. >>20    belong        =4096        dynamically linked executable
  8325. >>20    belong        >4096        dynamically linked executable
  8326. >16    belong        >0        not stripped
  8327. 0    belong&077777777    0200410        mc68010 pure
  8328. >0    byte        &0x80        dynamically linked executable
  8329. >0    byte        ^0x80        executable
  8330. >16    belong        >0        not stripped
  8331. 0    belong&077777777    0200407        mc68010
  8332. >0    byte        &0x80        dynamically linked executable
  8333. >0    byte        ^0x80        executable
  8334. >16    belong        >0        not stripped
  8335.  
  8336. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  8337. 0    belong        0407        old sun-2 executable
  8338. >16    belong        >0        not stripped
  8339. 0    belong        0410        old sun-2 pure executable
  8340. >16    belong        >0        not stripped
  8341. 0    belong        0413        old sun-2 demand paged executable
  8342. >16    belong        >0        not stripped
  8343.  
  8344. #
  8345. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  8346. # binary executed in compatibility mode under SunOS 5.x".
  8347. #
  8348. 0    belong        0x080456    SunOS core file
  8349. >4    belong        432        (SPARC)
  8350. >>132    string        >\0        from '%s'
  8351. >>116    belong        =3        (quit)
  8352. >>116    belong        =4        (illegal instruction)
  8353. >>116    belong        =5        (trace trap)
  8354. >>116    belong        =6        (abort)
  8355. >>116    belong        =7        (emulator trap)
  8356. >>116    belong        =8        (arithmetic exception)
  8357. >>116    belong        =9        (kill)
  8358. >>116    belong        =10        (bus error)
  8359. >>116    belong        =11        (segmentation violation)
  8360. >>116    belong        =12        (bad argument to system call)
  8361. >>116    belong        =29        (resource lost)
  8362. >>120    belong        x        (T=%dK,
  8363. >>124    belong        x        D=%dK,
  8364. >>128    belong        x        S=%dK)
  8365. >4    belong        826        (68K)
  8366. >>128    string        >\0        from '%s'
  8367. >4    belong        456        (SPARC 4.x BCP)
  8368. >>152    string        >\0        from '%s'
  8369. # Sun SunPC
  8370. 0    long        0xfa33c08e    SunPC 4.0 Hard Disk
  8371. 0    string        #SUNPC_CONFIG    SunPC 4.0 Properties Values
  8372. # Sun snoop (see RFC 1761, which describes the capture file format).
  8373. #
  8374. 0    string        snoop        Snoop capture file
  8375. >8    belong        >0        - version %ld
  8376. >12    belong        0        (IEEE 802.3)
  8377. >12    belong        1        (IEEE 802.4)
  8378. >12    belong        2        (IEEE 802.5)
  8379. >12    belong        3        (IEEE 802.6)
  8380. >12    belong        4        (Ethernet)
  8381. >12    belong        5        (HDLC)
  8382. >12    belong        6        (Character synchronous)
  8383. >12    belong        7        (IBM channel-to-channel adapter)
  8384. >12    belong        8        (FDDI)
  8385. >12    belong        9        (Unknown)
  8386.  
  8387. # Microsoft ICM color profile
  8388. 36    string        acspMSFT    Microsoft ICM Color Profile
  8389. # Sun KCMS
  8390. 36    string        acsp        Kodak Color Management System, ICC Profile
  8391. #------------------------------------------------------------------------
  8392. # sysex: file(1) magic for MIDI sysex files
  8393. #
  8394. 0    byte            0xF0        SysEx File -
  8395.  
  8396. # North American Group
  8397. >1    byte            0x01        Sequential
  8398. >1    byte            0x02        IDP
  8399. >1    byte            0x03        OctavePlateau
  8400. >1    byte            0x04        Moog
  8401. >1    byte            0x05        Passport
  8402. >1    byte            0x06        Lexicon
  8403. >1    byte            0x07        Kurzweil
  8404. >1    byte            0x08        Fender
  8405. >1    byte            0x09        Gulbransen
  8406. >1    byte            0x0a        AKG
  8407. >1    byte            0x0b        Voyce
  8408. >1    byte            0x0c        Waveframe
  8409. >1    byte            0x0d        ADA
  8410. >1    byte            0x0e        Garfield
  8411. >1    byte            0x0f        Ensoniq
  8412. >1    byte            0x10        Oberheim
  8413. >1    byte            0x11        Apple
  8414. >1    byte            0x12        GreyMatter
  8415. >1    byte            0x14        PalmTree
  8416. >1    byte            0x15        JLCooper
  8417. >1    byte            0x16        Lowrey
  8418. >1    byte            0x17        AdamsSmith
  8419. >1    byte            0x18        E-mu
  8420. >1    byte            0x19        Harmony
  8421. >1    byte            0x1a        ART
  8422. >1    byte            0x1b        Baldwin
  8423. >1    byte            0x1c        Eventide
  8424. >1    byte            0x1d        Inventronics
  8425. >1    byte            0x1f        Clarity
  8426.  
  8427. # European Group
  8428. >1    byte            0x21        SIEL
  8429. >1    byte            0x22        Synthaxe
  8430. >1    byte            0x24        Hohner
  8431. >1    byte            0x25        Twister
  8432. >1    byte            0x26        Solton
  8433. >1    byte            0x27        Jellinghaus
  8434. >1    byte            0x28        Southworth
  8435. >1    byte            0x29        PPG
  8436. >1    byte            0x2a        JEN
  8437. >1    byte            0x2b        SSL
  8438. >1    byte            0x2c        AudioVertrieb
  8439.  
  8440. >1    byte            0x2f        ELKA
  8441. >>3    byte            0x09        EK-44
  8442.  
  8443. >1    byte            0x30        Dynacord
  8444. >1    byte            0x33        Clavia
  8445. >1    byte            0x39        Soundcraft
  8446.  
  8447. >1    byte            0x3e        Waldorf
  8448. >>3    byte            0x7f        Microwave I
  8449.  
  8450. # Japanese Group
  8451. >1    byte            0x40        Kawai
  8452. >>3    byte            0x20        K1
  8453. >>3    byte            0x22        K4
  8454.  
  8455. >1    byte            0x41        Roland
  8456. >>3    byte            0x14        D-50
  8457. >>3    byte            0x2b        U-220
  8458. >>3    byte            0x02        TR-707
  8459.  
  8460. >1    byte            0x42        Korg
  8461. >>3    byte            0x19        M1
  8462.  
  8463. >1    byte            0x43        Yamaha
  8464. >1    byte            0x44        Casio
  8465. >1    byte            0x46        Kamiya
  8466. >1    byte            0x47        Akai
  8467. >1    byte            0x48        Victor
  8468. >1    byte            0x49        Mesosha
  8469. >1    byte            0x4b        Fujitsu
  8470. >1    byte            0x4c        Sony
  8471. >1    byte            0x4e        Teac
  8472. >1    byte            0x50        Matsushita
  8473. >1    byte            0x51        Fostex
  8474. >1    byte            0x52        Zoom
  8475. >1    byte            0x54        Matsushita
  8476. >1    byte            0x57        Acoustic tech. lab.
  8477.  
  8478. >1    belong&0xffffff00    0x00007400    Ta Horng
  8479. >1    belong&0xffffff00    0x00007500    e-Tek
  8480. >1    belong&0xffffff00    0x00007600    E-Voice
  8481. >1    belong&0xffffff00    0x00007700    Midisoft
  8482. >1    belong&0xffffff00    0x00007800    Q-Sound
  8483. >1    belong&0xffffff00    0x00007900    Westrex
  8484. >1    belong&0xffffff00    0x00007a00    Nvidia*
  8485. >1    belong&0xffffff00    0x00007b00    ESS
  8486. >1    belong&0xffffff00    0x00007c00    Mediatrix
  8487. >1    belong&0xffffff00    0x00007d00    Brooktree
  8488. >1    belong&0xffffff00    0x00007e00    Otari
  8489. >1    belong&0xffffff00    0x00007f00    Key Electronics
  8490. >1    belong&0xffffff00    0x00010000    Shure
  8491. >1    belong&0xffffff00    0x00010100    AuraSound
  8492. >1    belong&0xffffff00    0x00010200    Crystal
  8493. >1    belong&0xffffff00    0x00010300    Rockwell
  8494. >1    belong&0xffffff00    0x00010400    Silicon Graphics
  8495. >1    belong&0xffffff00    0x00010500    Midiman
  8496. >1    belong&0xffffff00    0x00010600    PreSonus
  8497. >1    belong&0xffffff00    0x00010800    Topaz
  8498. >1    belong&0xffffff00    0x00010900    Cast Lightning
  8499. >1    belong&0xffffff00    0x00010a00    Microsoft
  8500. >1    belong&0xffffff00    0x00010b00    Sonic Foundry
  8501. >1    belong&0xffffff00    0x00010c00    Line 6
  8502. >1    belong&0xffffff00    0x00010d00    Beatnik Inc.
  8503. >1    belong&0xffffff00    0x00010e00    Van Koerving
  8504. >1    belong&0xffffff00    0x00010f00    Altech Systems
  8505. >1    belong&0xffffff00    0x00011000    S & S Research
  8506. >1    belong&0xffffff00    0x00011100    VLSI Technology
  8507. >1    belong&0xffffff00    0x00011200    Chromatic
  8508. >1    belong&0xffffff00    0x00011300    Sapphire
  8509. >1    belong&0xffffff00    0x00011400    IDRC
  8510. >1    belong&0xffffff00    0x00011500    Justonic Tuning
  8511. >1    belong&0xffffff00    0x00011600    TorComp
  8512. >1    belong&0xffffff00    0x00011700    Newtek Inc.
  8513. >1    belong&0xffffff00    0x00011800    Sound Sculpture
  8514. >1    belong&0xffffff00    0x00011900    Walker Technical
  8515. >1    belong&0xffffff00    0x00011a00    Digital Harmony
  8516. >1    belong&0xffffff00    0x00011b00    InVision
  8517. >1    belong&0xffffff00    0x00011c00    T-Square
  8518. >1    belong&0xffffff00    0x00011d00    Nemesys
  8519. >1    belong&0xffffff00    0x00011e00    DBX
  8520. >1    belong&0xffffff00    0x00011f00    Syndyne
  8521. >1    belong&0xffffff00    0x00012000    Bitheadz    
  8522. >1    belong&0xffffff00    0x00012100    Cakewalk
  8523. >1    belong&0xffffff00    0x00012200    Staccato
  8524. >1    belong&0xffffff00    0x00012300    National Semicon.
  8525. >1    belong&0xffffff00    0x00012400    Boom Theory
  8526. >1    belong&0xffffff00    0x00012500    Virtual DSP Corp
  8527. >1    belong&0xffffff00    0x00012600    Antares
  8528. >1    belong&0xffffff00    0x00012700    Angel Software
  8529. >1    belong&0xffffff00    0x00012800    St Louis Music
  8530. >1    belong&0xffffff00    0x00012900    Lyrrus dba G-VOX
  8531. >1    belong&0xffffff00    0x00012a00    Ashley Audio
  8532. >1    belong&0xffffff00    0x00012b00    Vari-Lite
  8533. >1    belong&0xffffff00    0x00012c00    Summit Audio
  8534. >1    belong&0xffffff00    0x00012d00    Aureal Semicon.
  8535. >1    belong&0xffffff00    0x00012e00    SeaSound
  8536. >1    belong&0xffffff00    0x00012f00    U.S. Robotics
  8537. >1    belong&0xffffff00    0x00013000    Aurisis
  8538. >1    belong&0xffffff00    0x00013100    Nearfield Multimedia
  8539. >1    belong&0xffffff00    0x00013200    FM7 Inc.
  8540. >1    belong&0xffffff00    0x00013300    Swivel Systems
  8541. >1    belong&0xffffff00    0x00013400    Hyperactive
  8542. >1    belong&0xffffff00    0x00013500    MidiLite
  8543. >1    belong&0xffffff00    0x00013600    Radical
  8544. >1    belong&0xffffff00    0x00013700    Roger Linn
  8545. >1    belong&0xffffff00    0x00013800    Helicon
  8546. >1    belong&0xffffff00    0x00013900    Event
  8547. >1    belong&0xffffff00    0x00013a00    Sonic Network
  8548. >1    belong&0xffffff00    0x00013b00    Realtime Music
  8549. >1    belong&0xffffff00    0x00013c00    Apogee Digital
  8550.  
  8551. >1    belong&0xffffff00    0x00202b00    Medeli Electronics
  8552. >1    belong&0xffffff00    0x00202c00    Charlie Lab
  8553. >1    belong&0xffffff00    0x00202d00    Blue Chip Music
  8554. >1    belong&0xffffff00    0x00202e00    BEE OH Corp
  8555. >1    belong&0xffffff00    0x00202f00    LG Semicon America
  8556. >1    belong&0xffffff00    0x00203000    TESI
  8557. >1    belong&0xffffff00    0x00203100    EMAGIC
  8558. >1    belong&0xffffff00    0x00203200    Behringer
  8559. >1    belong&0xffffff00    0x00203300    Access Music
  8560. >1    belong&0xffffff00    0x00203400    Synoptic
  8561. >1    belong&0xffffff00    0x00203500    Hanmesoft Corp
  8562. >1    belong&0xffffff00    0x00203600    Terratec
  8563. >1    belong&0xffffff00    0x00203700    Proel SpA
  8564. >1    belong&0xffffff00    0x00203800    IBK MIDI
  8565. >1    belong&0xffffff00    0x00203900    IRCAM
  8566. >1    belong&0xffffff00    0x00203a00    Propellerhead Software
  8567. >1    belong&0xffffff00    0x00203b00    Red Sound Systems
  8568. >1    belong&0xffffff00    0x00203c00    Electron ESI AB
  8569. >1    belong&0xffffff00    0x00203d00    Sintefex Audio
  8570. >1    belong&0xffffff00    0x00203e00    Music and More
  8571. >1    belong&0xffffff00    0x00203f00    Amsaro
  8572. >1    belong&0xffffff00    0x00204000    CDS Advanced Technology
  8573. >1    belong&0xffffff00    0x00204100    Touched by Sound
  8574. >1    belong&0xffffff00    0x00204200    DSP Arts
  8575. >1    belong&0xffffff00    0x00204300    Phil Rees Music
  8576. >1    belong&0xffffff00    0x00204400    Stamer Musikanlagen GmbH
  8577. >1    belong&0xffffff00    0x00204500    Soundart
  8578. >1    belong&0xffffff00    0x00204600    C-Mexx Software
  8579. >1    belong&0xffffff00    0x00204700    Klavis Tech.
  8580. >1    belong&0xffffff00    0x00204800    Noteheads AB
  8581.  
  8582. 0    string            T707        Roland TR-707 Data
  8583. #------------------------------------------------------------------------------
  8584. # teapot:  file(1) magic for "teapot" spreadsheet
  8585. #
  8586. 0       string          #!teapot\012xdr      teapot work sheet (XDR format)
  8587.  
  8588. #------------------------------------------------------------------------------
  8589. # terminfo:  file(1) magic for terminfo
  8590. #
  8591. # XXX - byte order for screen images?
  8592. #
  8593. 0    string        \032\001    Compiled terminfo entry
  8594. 0    short        0433        Curses screen image
  8595. 0    short        0434        Curses screen image
  8596.  
  8597. #------------------------------------------------------------------------------
  8598. # tex:  file(1) magic for TeX files
  8599. #
  8600. # From <conklin@talisman.kaleida.com>
  8601.  
  8602. # Although we may know the offset of certain text fields in TeX DVI
  8603. # and font files, we can't use them reliably because they are not
  8604. # zero terminated. [but we do anyway, christos]
  8605. 0    string        \367\002    TeX DVI file
  8606. >16    string        >\0        (%s)
  8607. 0    string        \367\203    TeX generic font data
  8608. 0    string        \367\131    TeX packed font data
  8609. >3    string        >\0        (%s)
  8610. 0    string        \367\312    TeX virtual font data
  8611. 0    string        This\ is\ TeX,    TeX transcript text
  8612. 0    string        This\ is\ METAFONT,    METAFONT transcript text
  8613.  
  8614. # There is no way to detect TeX Font Metric (*.tfm) files without
  8615. # breaking them apart and reading the data.  The following patterns
  8616. # match most *.tfm files generated by METAFONT or afm2tfm.
  8617. 2    string        \000\021    TeX font metric data
  8618. >33    string        >\0        (%s)
  8619. 2    string        \000\022    TeX font metric data
  8620. >33    string        >\0        (%s)
  8621.  
  8622. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  8623. 0    string        \\input\ texinfo    Texinfo source text
  8624. 0    string        This\ is\ Info\ file    GNU Info text
  8625.  
  8626. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  8627. 0    string        \\input        TeX document text
  8628. 0    string        \\section    LaTeX document text
  8629. 0    string        \\setlength    LaTeX document text
  8630. 0    string        \\documentstyle    LaTeX document text
  8631. 0    string        \\chapter    LaTeX document text
  8632. 0    string        \\documentclass    LaTeX 2e document text
  8633. 0    string        \\relax        LaTeX auxiliary file
  8634. 0    string        \\contentsline    LaTeX  table of contents
  8635. 0    string        %\ -*-latex-*-    LaTeX document text
  8636.  
  8637. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  8638. 0   string      \\ifx       TeX document text
  8639.  
  8640. # Index and glossary files
  8641. 0    string        \\indexentry    LaTeX raw index file
  8642. 0    string        \\begin{theindex}    LaTeX sorted index
  8643. 0    string        \\glossaryentry    LaTeX raw glossary
  8644. 0    string        \\begin{theglossary}    LaTeX sorted glossary
  8645. 0    string        This\ is\ makeindex    Makeindex log file
  8646.  
  8647. # End of TeX
  8648.  
  8649. #------------------------------------------------------------------------------
  8650. # file(1) magic for BibTex text files
  8651. # From Hendrik Scholz <hendrik@scholz.net>
  8652.  
  8653. 0   string @article{          BibTex text file
  8654. 0   string @book{             BibTex text file
  8655. 0   string @inbook{           BibTex text file
  8656. 0   string @incollection{     BibTex text file
  8657. 0   string @inproceedings{    BibTex text file
  8658. 0   string @manual{           BibTex text file
  8659. 0   string @misc{             BibTex text file
  8660. 0   string @preamble{         BibTex text file
  8661. 0   string @phdthesis{        BibTex text file
  8662. 0   string @techreport{       BibTex text file
  8663. 0   string @unpublished{      BibTex text file
  8664.  
  8665. 0   string @Article{          BibTex text file
  8666. 0   string @Book{             BibTex text file
  8667. 0   string @Inbook{           BibTex text file
  8668. 0   string @Incollection{     BibTex text file
  8669. 0   string @Inproceedings{    BibTex text file
  8670. 0   string @Manual{           BibTex text file
  8671. 0   string @Misc{             BibTex text file
  8672. 0   string @Preamble{         BibTex text file
  8673. 0   string @Phdthesis{        BibTex text file
  8674. 0   string @Techreport{       BibTex text file
  8675. 0   string @Unpublished{      BibTex text file
  8676.  
  8677. 0   string @ARTICLE{          BibTex text file
  8678. 0   string @BOOK{             BibTex text file
  8679. 0   string @INBOOK{           BibTex text file
  8680. 0   string @INCOLLECTION{     BibTex text file
  8681. 0   string @INPROCEEDINGS{    BibTex text file
  8682. 0   string @MANUAL{           BibTex text file
  8683. 0   string @MISC{             BibTex text file
  8684. 0   string @PREAMBLE{         BibTex text file
  8685. 0   string @PHDTHESIS{        BibTex text file
  8686. 0   string @TECHREPORT{       BibTex text file
  8687. 0   string @UNPUBLISHED{      BibTex text file
  8688.  
  8689. 73  string %%%\ \ BibTeX-file{ BibTex text file (with full header)
  8690.  
  8691. 73  string %%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
  8692.  
  8693. 0   string %\ BibTeX\ standard\ bibliography\      BibTeX standard bibliography style text file
  8694.  
  8695. 0   string %\ BibTeX\ `     BibTeX custom bibliography style text file
  8696.  
  8697. 0   string  @c\ @mapfile{   TeX font aliases text file
  8698.  
  8699. #------------------------------------------------------------------------------
  8700. # file(1) magic for tgif(1) files
  8701. # From Hendrik Scholz <hendrik@scholz.net>
  8702.  
  8703. 0   string  %TGIF\ 4   tgif version 4 object file
  8704.  
  8705. # ------------------------------------------------------------------------
  8706. # ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
  8707. #
  8708. # From: Ryan McGuire (rmcguire@freenet.columbus.oh.us).
  8709. #
  8710. # Update: Romain Lievin (roms@lpg.ticalc.org).
  8711. #
  8712. # NOTE: This list is not complete.
  8713. # Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
  8714. # program/group magic numbers in here because I cannot find any.
  8715. 0        string        **TI80**    TI-80 Graphing Calculator File.
  8716. 0        string        **TI81**    TI-81 Graphing Calculator File.
  8717. #
  8718. # Magic Numbers for the TI-73
  8719. #
  8720. 0        string        **TI73**    TI-73 Graphing Calculator
  8721. >0x00003B    byte        0x00        (real number)
  8722. >0x00003B    byte        0x01        (list)
  8723. >0x00003B    byte        0x02        (matrix)
  8724. >0x00003B    byte        0x03        (equation)
  8725. >0x00003B    byte        0x04        (string)
  8726. >0x00003B    byte        0x05        (program)
  8727. >0x00003B    byte        0x06        (assembly program)
  8728. >0x00003B    byte        0x07        (picture)
  8729. >0x00003B    byte        0x08        (gdb)
  8730. >0x00003B    byte        0x0C        (complex number)
  8731. >0x00003B    byte        0x0F        (window settings)
  8732. >0x00003B    byte        0x10        (zoom)
  8733. >0x00003B    byte        0x11        (table setup)
  8734. >0x00003B    byte        0x13        (backup)
  8735.  
  8736. # Magic Numbers for the TI-82
  8737. #
  8738. 0        string        **TI82**    TI-82 Graphing Calculator
  8739. >0x00003B    byte        0x00        (real)
  8740. >0x00003B    byte        0x01        (list)
  8741. >0x00003B    byte        0x02        (matrix)
  8742. >0x00003B    byte        0x03        (Y-variable)
  8743. >0x00003B    byte        0x05        (program)
  8744. >0x00003B    byte        0x06        (protected prgm)
  8745. >0x00003B    byte        0x07        (picture)
  8746. >0x00003B    byte        0x08        (gdb)
  8747. >0x00003B    byte        0x0B        (window settings)
  8748. >0x00003B    byte        0x0C        (window settings)
  8749. >0x00003B    byte        0x0D        (table setup)
  8750. >0x00003B    byte        0x0E        (screenshot)
  8751. >0x00003B    byte        0x0F        (backup)
  8752. #
  8753. # Magic Numbers for the TI-83
  8754. #
  8755. 0        string        **TI83**    TI-83 Graphing Calculator
  8756. >0x00003B    byte        0x00        (real)
  8757. >0x00003B    byte        0x01        (list)
  8758. >0x00003B    byte        0x02        (matrix)
  8759. >0x00003B    byte        0x03        (Y-variable)
  8760. >0x00003B    byte        0x04        (string)
  8761. >0x00003B    byte        0x05        (program)
  8762. >0x00003B    byte        0x06        (protected prgm)
  8763. >0x00003B    byte        0x07        (picture)
  8764. >0x00003B    byte        0x08        (gdb)
  8765. >0x00003B    byte        0x0B        (window settings)
  8766. >0x00003B    byte        0x0C        (window settings)
  8767. >0x00003B    byte        0x0D        (table setup)
  8768. >0x00003B    byte        0x0E        (screenshot)
  8769. >0x00003B    byte        0x13        (backup)
  8770. #
  8771. # Magic Numbers for the TI-83+
  8772. #
  8773. 0        string        **TI83F*    TI-83+ Graphing Calculator
  8774. >0x00003B    byte        0x00        (real number)
  8775. >0x00003B    byte        0x01        (list)
  8776. >0x00003B    byte        0x02        (matrix)
  8777. >0x00003B    byte        0x03        (equation)
  8778. >0x00003B    byte        0x04        (string)
  8779. >0x00003B    byte        0x05        (program)
  8780. >0x00003B    byte        0x06        (assembly program)
  8781. >0x00003B    byte        0x07        (picture)
  8782. >0x00003B    byte        0x08        (gdb)
  8783. >0x00003B    byte        0x0C        (complex number)
  8784. >0x00003B    byte        0x0F        (window settings)
  8785. >0x00003B    byte        0x10        (zoom)
  8786. >0x00003B    byte        0x11        (table setup)
  8787. >0x00003B    byte        0x13        (backup)
  8788. >0x00003B    byte        0x15        (application variable)
  8789. >0x00003B    byte        0x17        (group of variable)
  8790.  
  8791. #
  8792. # Magic Numbers for the TI-85
  8793. #
  8794. 0        string        **TI85**    TI-85 Graphing Calculator
  8795. >0x00003B    byte        0x00        (real number)
  8796. >0x00003B    byte        0x01        (complex number)
  8797. >0x00003B    byte        0x02        (real vector)
  8798. >0x00003B    byte        0x03        (complex vector)
  8799. >0x00003B    byte        0x04        (real list)
  8800. >0x00003B    byte        0x05        (complex list)
  8801. >0x00003B    byte        0x06        (real matrix)
  8802. >0x00003B    byte        0x07        (complex matrix)
  8803. >0x00003B    byte        0x08        (real constant)
  8804. >0x00003B    byte        0x09        (complex constant)
  8805. >0x00003B    byte        0x0A        (equation)
  8806. >0x00003B    byte        0x0C        (string)
  8807. >0x00003B    byte        0x0D        (function GDB)
  8808. >0x00003B    byte        0x0E        (polar GDB)
  8809. >0x00003B    byte        0x0F        (parametric GDB)
  8810. >0x00003B    byte        0x10        (diffeq GDB)
  8811. >0x00003B    byte        0x11        (picture)
  8812. >0x00003B    byte        0x12        (program)
  8813. >0x00003B    byte        0x13        (range)
  8814. >0x00003B    byte        0x17        (window settings)
  8815. >0x00003B    byte        0x18        (window settings)
  8816. >0x00003B    byte        0x19        (window settings)
  8817. >0x00003B    byte        0x1A        (window settings)
  8818. >0x00003B    byte        0x1B        (zoom)
  8819. >0x00003B    byte        0x1D        (backup)
  8820. >0x00003B    byte        0x1E        (unknown)
  8821. >0x00003B    byte        0x2A        (equation)
  8822. >0x000032    string        ZS4        - ZShell Version 4 File.
  8823. >0x000032    string        ZS3        - ZShell Version 3 File.
  8824. #
  8825. # Magic Numbers for the TI-86
  8826. #
  8827. 0        string        **TI86**    TI-86 Graphing Calculator
  8828. >0x00003B    byte        0x00        (real number)
  8829. >0x00003B    byte        0x01        (complex number)
  8830. >0x00003B    byte        0x02        (real vector)
  8831. >0x00003B    byte        0x03        (complex vector)
  8832. >0x00003B    byte        0x04        (real list)
  8833. >0x00003B    byte        0x05        (complex list)
  8834. >0x00003B    byte        0x06        (real matrix)
  8835. >0x00003B    byte        0x07        (complex matrix)
  8836. >0x00003B    byte        0x08        (real constant)
  8837. >0x00003B    byte        0x09        (complex constant)
  8838. >0x00003B    byte        0x0A        (equation)
  8839. >0x00003B    byte        0x0C        (string)
  8840. >0x00003B    byte        0x0D        (function GDB)
  8841. >0x00003B    byte        0x0E        (polar GDB)
  8842. >0x00003B    byte        0x0F        (parametric GDB)
  8843. >0x00003B    byte        0x10        (diffeq GDB)
  8844. >0x00003B    byte        0x11        (picture)
  8845. >0x00003B    byte        0x12        (program)
  8846. >0x00003B    byte        0x13        (range)
  8847. >0x00003B    byte        0x17        (window settings)
  8848. >0x00003B    byte        0x18        (window settings)
  8849. >0x00003B    byte        0x19        (window settings)
  8850. >0x00003B    byte        0x1A        (window settings)
  8851. >0x00003B    byte        0x1B        (zoom)
  8852. >0x00003B    byte        0x1D        (backup)
  8853. >0x00003B    byte        0x1E        (unknown)
  8854. >0x00003B    byte        0x2A        (equation)
  8855. #
  8856. # Magic Numbers for the TI-89
  8857. #
  8858. 0        string        **TI89**    TI-89 Graphing Calculator
  8859. >0x000048    byte        0x00        (expression)
  8860. >0x000048    byte        0x04        (list)
  8861. >0x000048    byte        0x06        (matrix)
  8862. >0x000048    byte        0x0A        (data)
  8863. >0x000048    byte        0x0B        (text)
  8864. >0x000048    byte        0x0C        (string)
  8865. >0x000048    byte        0x0D        (graphic data base)
  8866. >0x000048    byte        0x0E        (figure)
  8867. >0x000048    byte        0x10        (picture)
  8868. >0x000048    byte        0x12        (program)
  8869. >0x000048    byte        0x13        (function)
  8870. >0x000048    byte        0x14        (macro)
  8871. >0x000048    byte        0x1C        (zipped)
  8872. >0x000048    byte        0x21        (assembler)
  8873. #
  8874. # Magic Numbers for the TI-92
  8875. #
  8876. 0        string        **TI92**    TI-92 Graphing Calculator
  8877. >0x000048    byte        0x00        (expression)
  8878. >0x000048    byte        0x04        (list)
  8879. >0x000048    byte        0x06        (matrix)
  8880. >0x000048    byte        0x0A        (data)
  8881. >0x000048    byte        0x0B        (text)
  8882. >0x000048    byte        0x0C        (string)
  8883. >0x000048    byte        0x0D        (graphic data base)
  8884. >0x000048    byte        0x0E        (figure)
  8885. >0x000048    byte        0x10        (picture)
  8886. >0x000048    byte        0x12        (program)
  8887. >0x000048    byte        0x13        (function)
  8888. >0x000048    byte        0x14        (macro)
  8889. >0x000048    byte        0x1D        (backup)
  8890. #
  8891. # Magic Numbers for the TI-92+/V200
  8892. #
  8893. 0        string        **TI92P*    TI-92+/V200 Graphing Calculator
  8894. >0x000048    byte        0x00        (expression)
  8895. >0x000048    byte        0x04        (list)
  8896. >0x000048    byte        0x06        (matrix)
  8897. >0x000048    byte        0x0A        (data)
  8898. >0x000048    byte        0x0B        (text)
  8899. >0x000048    byte        0x0C        (string)
  8900. >0x000048    byte        0x0D        (graphic data base)
  8901. >0x000048    byte        0x0E        (figure)
  8902. >0x000048    byte        0x10        (picture)
  8903. >0x000048    byte        0x12        (program)
  8904. >0x000048    byte        0x13        (function)
  8905. >0x000048    byte        0x14        (macro)
  8906. >0x000048    byte        0x1C        (zipped)
  8907. >0x000048    byte        0x21        (assembler)
  8908. #
  8909. # Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
  8910. #
  8911. 0x0000016    string        Advanced    TI-XX Graphing Calculator (FLASH)
  8912. 0        string        **TIFL**    TI-XX Graphing Calculator (FLASH)
  8913. >8        byte        >0        - Revision %d
  8914. >>9         byte        x        \b.%d,
  8915. >12        byte        >0        Revision date %02x
  8916. >>13        byte        x        \b/%02x
  8917. >>14        beshort        x        \b/%04x,
  8918. >17        string        >/0        name: '%s',
  8919. >48        byte        0x74        device: TI-73,
  8920. >48        byte        0x73        device: TI-83+,
  8921. >48        byte        0x98        device: TI-89,
  8922. >48        byte        0x88        device: TI-92+,
  8923. >49        byte        0x23        type: OS upgrade,
  8924. >49        byte        0x24        type: application,
  8925. >49        byte        0x25        type: certificate,
  8926. >49        byte        0x3e        type: license,
  8927. >74        lelong        >0        size: %ld bytes
  8928.  
  8929. # VTi & TiEmu skins (TI Graphing Calculators).
  8930. # From: Romain Lievin (roms@lpg.ticalc.org).
  8931. # Magic Numbers for the VTi skins
  8932. 0               string          VTI        Virtual TI skin
  8933. >3        string        v        - Version
  8934. >>4        byte        >0        \b %c
  8935. >>6        byte        x        \b.%c
  8936. # Magic Numbers for the TiEmu skins
  8937. 0        string        TiEmu        TiEmu skin
  8938. >6              string          v               - Version
  8939. >>7             byte            >0              \b %c
  8940. >>9             byte            x               \b.%c
  8941. >>10        byte        x        \b%c
  8942.  
  8943. #------------------------------------------------------------------------------
  8944. # timezone:  file(1) magic for timezone data
  8945. #
  8946. # from Daniel Quinlan (quinlan@yggdrasil.com)
  8947. # this should work on Linux, SunOS, and maybe others
  8948. # Added new official magic number for recent versions of the Olson code
  8949. 0    string    TZif    timezone data
  8950. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0    old timezone data
  8951. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0    old timezone data
  8952. 0    string  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0    old timezone data
  8953. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0    old timezone data
  8954. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0    old timezone data
  8955. 0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0    old timezone data
  8956.  
  8957. #------------------------------------------------------------------------------
  8958. # troff:  file(1) magic for *roff
  8959. #
  8960. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  8961.  
  8962. # troff input
  8963. 0    string        .\\"        troff or preprocessor input text
  8964. 0    string        '\\"        troff or preprocessor input text
  8965. 0    string        '.\\"        troff or preprocessor input text
  8966. 0    string        \\"        troff or preprocessor input text
  8967. 0    string        '''        troff or preprocessor input text
  8968.  
  8969. # ditroff intermediate output text
  8970. 0    string        x\ T        ditroff output text
  8971. >4    string        cat        for the C/A/T phototypesetter
  8972. >4    string        ps        for PostScript
  8973. >4    string        dvi        for DVI
  8974. >4    string        ascii        for ASCII
  8975. >4    string        lj4        for LaserJet 4
  8976. >4    string        latin1        for ISO 8859-1 (Latin 1)
  8977. >4    string        X75        for xditview at 75dpi
  8978. >>7    string        -12        (12pt)
  8979. >4    string        X100        for xditview at 100dpi
  8980. >>8    string        -12        (12pt)
  8981.  
  8982. # output data formats
  8983. 0    string        \100\357    very old (C/A/T) troff output data
  8984. #
  8985. #------------------------------------------------------------------------------
  8986. # tuxedo:    file(1) magic for BEA TUXEDO data files
  8987. #
  8988. # from Ian Springer <ispringer@hotmail.com>
  8989. #
  8990. 0    string        \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0    BEA TUXEDO DES mask data
  8991.  
  8992. #------------------------------------------------------------------------------
  8993. # typeset:  file(1) magic for other typesetting
  8994. #
  8995. 0    string        Interpress/Xerox    Xerox InterPress data
  8996. >16    string        /            (version
  8997. >>17    string        >\0            %s)
  8998.  
  8999. #------------------------------------------------------------------------------
  9000. # unknown:  file(1) magic for unknown machines
  9001. #
  9002. # XXX - this probably should be pruned, as it'll match PDP-11 and
  9003. # VAX image formats.
  9004. #
  9005. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  9006. # respectively).
  9007. #
  9008. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  9009. # have the "version %ld", which may be a bogus COFFism (I don't think
  9010. # there ever was COFF for the PDP-11).
  9011. #
  9012. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  9013. # long, as it would be on a VAX.
  9014. #
  9015. # 0x10C is 0414 and 0x10E is 416; those *are* unknown.
  9016. #
  9017. 0    short        0x107        unknown machine executable
  9018. >8    short        >0        not stripped
  9019. >15    byte        >0        - version %ld
  9020. 0    short        0x108        unknown pure executable
  9021. >8    short        >0        not stripped
  9022. >15    byte        >0        - version %ld
  9023. 0    short        0x109        PDP-11 separate I&D
  9024. >8    short        >0        not stripped
  9025. >15    byte        >0        - version %ld
  9026. 0    short        0x10b        unknown pure executable
  9027. >8    short        >0        not stripped
  9028. >15    byte        >0        - version %ld
  9029. 0    long        0x10c        unknown demand paged pure executable
  9030. >16    long        >0        not stripped
  9031. 0    long        0x10e        unknown readable demand paged pure executable
  9032.  
  9033. #------------------------------------------------------------------------------
  9034. # uuencode:  file(1) magic for ASCII-encoded files
  9035. #
  9036.  
  9037. # GRR:  the first line of xxencoded files is identical to that in uuencoded
  9038. # files, but the first character in most subsequent lines is 'h' instead of
  9039. # 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
  9040. # punctuation and survives BITNET gateways better.)  If regular expressions
  9041. # were supported, this entry could possibly be split into two with
  9042. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  9043. 0    string        begin\040    uuencoded or xxencoded text
  9044.  
  9045. # btoa(1) is an alternative to uuencode that requires less space.
  9046. 0    string        xbtoa\ Begin    btoa'd text
  9047.  
  9048. # ship(1) is another, much cooler alternative to uuencode.
  9049. # Greg Roelofs, newt@uchicago.edu
  9050. 0    string        $\012ship    ship'd binary text
  9051.  
  9052. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  9053. # Greg Roelofs, newt@uchicago.edu
  9054. 0    string    Decode\ the\ following\ with\ bdeco    bencoded News text
  9055.  
  9056. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  9057. # Daniel Quinlan, quinlan@yggdrasil.com
  9058. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  9059. >41    string    x                    \b, version %.3s
  9060.  
  9061. # GRR:  is MIME BASE64 encoding handled somewhere?
  9062.  
  9063. #------------------------------------------------------------------------------
  9064. # varied.out:  file(1) magic for various USG systems
  9065. #
  9066. #    Herewith many of the object file formats used by USG systems.
  9067. #    Most have been moved to files for a particular processor,
  9068. #    and deleted if they duplicate other entries.
  9069. #
  9070. 0    short        0610        Perkin-Elmer executable
  9071. # AMD 29K
  9072. 0    beshort        0572        amd 29k coff noprebar executable
  9073. 0    beshort        01572        amd 29k coff prebar executable
  9074. 0    beshort        0160007        amd 29k coff archive
  9075. # Cray
  9076. 6    beshort        0407        unicos (cray) executable
  9077. # Ultrix 4.3
  9078. 596    string        \130\337\377\377    Ultrix core file
  9079. >600    string        >\0        from '%s'
  9080. # BeOS and MAcOS PEF executables
  9081. # From: hplus@zilker.net (Jon Watte)
  9082. 0    string        Joy!peffpwpc    header for PowerPC PEF executable
  9083. #
  9084. # ava assembler/linker Uros Platise <uros.platise@ijs.si>
  9085. 0       string          avaobj  AVR assembler object code
  9086. >7      string          >\0     version '%s'
  9087. # gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr>
  9088. 0    string        gmon        GNU prof performance data
  9089. >4    long        x        - version %ld
  9090. # From: Dave Pearson <davep@davep.org>
  9091. # Harbour <URL:http://www.harbour-project.org/> HRB files.
  9092. 0    string        \xc0HRB        Harbour HRB file
  9093. >4    short        x        version %d
  9094.  
  9095. # From: "Stefan A. Haubenthal" <polluks@web.de>
  9096. 0    belong        0x000001EB    Plan 9 executable
  9097. #------------------------------------------------------------------------------
  9098. # varied.script:  file(1) magic for various interpreter scripts
  9099.  
  9100. 0    string        #!\ /            a
  9101. >3    string        >\0            %s script text executable
  9102. 0    string        #!\    /        a
  9103. >3    string        >\0            %s script text executable
  9104. 0    string        #!/            a
  9105. >2    string        >\0            %s script text executable
  9106. 0    string        #!\             script text executable
  9107. >3    string        >\0            for %s
  9108.  
  9109.  
  9110. #------------------------------------------------------------------------------
  9111. # vax:  file(1) magic for VAX executable/object and APL workspace
  9112. #
  9113. 0    lelong        0101557        VAX single precision APL workspace
  9114. 0    lelong        0101556        VAX double precision APL workspace
  9115.  
  9116. #
  9117. # VAX a.out (32V, BSD)
  9118. #
  9119. 0    lelong        0407        VAX executable
  9120. >16    lelong        >0        not stripped
  9121.  
  9122. 0    lelong        0410        VAX pure executable
  9123. >16    lelong        >0        not stripped
  9124.  
  9125. 0    lelong        0413        VAX demand paged pure executable
  9126. >16    lelong        >0        not stripped
  9127.  
  9128. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  9129. >16    lelong        >0        not stripped
  9130.  
  9131. #
  9132. # VAX COFF
  9133. #
  9134. # The `versions' should be un-commented if they work for you.
  9135. # (Was the problem just one of endianness?)
  9136. #
  9137. 0    leshort        0570        VAX COFF executable
  9138. >12    lelong        >0        not stripped
  9139. >22    leshort        >0        - version %ld
  9140. 0    leshort        0575        VAX COFF pure executable
  9141. >12    lelong        >0        not stripped
  9142. >22    leshort        >0        - version %ld
  9143.  
  9144. #------------------------------------------------------------------------------
  9145. # vicar:  file(1) magic for VICAR files.
  9146. #
  9147. # From: Ossama Othman <othman@astrosun.tn.cornell.edu
  9148. # VICAR is JPL's in-house spacecraft image processing program
  9149. # VICAR image
  9150. 0    string    LBLSIZE=    VICAR image data
  9151. >32    string    BYTE        \b, 8 bits  = VAX byte
  9152. >32    string    HALF        \b, 16 bits = VAX word     = Fortran INTEGER*2
  9153. >32    string    FULL        \b, 32 bits = VAX longword = Fortran INTEGER*4
  9154. >32    string    REAL        \b, 32 bits = VAX longword = Fortran REAL*4
  9155. >32    string    DOUB        \b, 64 bits = VAX quadword = Fortran REAL*8
  9156. >32    string    COMPLEX        \b, 64 bits = VAX quadword = Fortran COMPLEX*8
  9157. # VICAR label file
  9158. 43    string    SFDU_LABEL    VICAR label file
  9159.  
  9160. #------------------------------------------------------------------------------
  9161. # visx:  file(1) magic for Visx format files
  9162. #
  9163. 0    short        0x5555        VISX image file
  9164. >2    byte        0        (zero)
  9165. >2    byte        1        (unsigned char)
  9166. >2    byte        2        (short integer)
  9167. >2    byte        3        (float 32)
  9168. >2    byte        4        (float 64)
  9169. >2    byte        5        (signed char)
  9170. >2    byte        6        (bit-plane)
  9171. >2    byte        7        (classes)
  9172. >2    byte        8        (statistics)
  9173. >2    byte        10        (ascii text)
  9174. >2    byte        15        (image segments)
  9175. >2    byte        100        (image set)
  9176. >2    byte        101        (unsigned char vector)
  9177. >2    byte        102        (short integer vector)
  9178. >2    byte        103        (float 32 vector)
  9179. >2    byte        104        (float 64 vector)
  9180. >2    byte        105        (signed char vector)
  9181. >2    byte        106        (bit plane vector)
  9182. >2    byte        121        (feature vector)
  9183. >2    byte        122        (feature vector library)
  9184. >2    byte        124        (chain code)
  9185. >2    byte        126        (bit vector)
  9186. >2    byte        130        (graph)
  9187. >2    byte        131        (adjacency graph)
  9188. >2    byte        132        (adjacency graph library)
  9189. >2    string        .VISIX        (ascii text)
  9190.  
  9191. #------------------------------------------------------------------------------
  9192. # vms:  file(1) magic for VMS executables (experimental)
  9193. #
  9194. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  9195.  
  9196. # GRR 950122:  I'm just guessing on these, based on inspection of the headers
  9197. # of three executables each for Alpha and VAX architectures.  The VAX files
  9198. # all had headers similar to this:
  9199. #
  9200. #   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
  9201. #   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
  9202. #
  9203. 0    string    \xb0\0\x30\0    VMS VAX executable
  9204. >44032    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  9205. #
  9206. # The AXP files all looked like this, except that the byte at offset 0x22
  9207. # was 06 in some of them and 07 in others:
  9208. #
  9209. #   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
  9210. #   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
  9211. #   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  9212. #   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
  9213. #   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
  9214. #
  9215. 0    belong    0x03000000    VMS Alpha executable
  9216. >75264    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  9217.  
  9218. # -----------------------------------------------------------
  9219. # VMware specific files (deducted from version 1.1 and log file entries)
  9220. # Anthon van der Neut (anthon@mnt.org)
  9221. 0    belong    0x4d52564e    VMware nvram 
  9222. 0    belong    0x434f5744    VMware
  9223. >4    byte    3         virtual disk 
  9224. >>32    lelong    x        (%d/
  9225. >>36    lelong    x        \b%d/
  9226. >>40    lelong    x        \b%d)
  9227. >4    byte    2         undoable disk
  9228. >>32    string  >\0        (%s)
  9229.  
  9230. #------------------------------------------------------------------------------
  9231. # vorbis:  file(1) magic for Ogg/Vorbis files
  9232. #
  9233. # From Felix von Leitner <leitner@fefe.de>
  9234. # Extended by Beni Cherniavsky <cben@crosswinds.net>
  9235. # Further extended by Greg Wooledge <greg@wooledge.org>
  9236. #
  9237. # Most (everything but the number of channels and bitrate) is commented
  9238. # out with `##' as it's not interesting to the average user.  The most
  9239. # probable things advanced users would want to uncomment are probably
  9240. # the number of comments and the encoder version.
  9241. #
  9242. # --- Ogg Framing ---
  9243. 0        string        OggS        Ogg data
  9244. >4        byte        !0        UNKNOWN REVISION %u
  9245. ##>4        byte        0        revision 0
  9246. >4        byte        0
  9247. ##>>14        lelong        x        (Serial %lX)
  9248. # non-Vorbis content: FLAC (Free Loss-lessy Audio Codec,
  9249. # http://flac.sourceforge.net)
  9250. >>28        string        fLaC        \b, FLAC audio
  9251. # --- First vorbis packet - general header ---
  9252. >>28        string        \x01vorbis    \b, Vorbis audio,
  9253. >>>35        lelong        !0        UNKNOWN VERSION %lu,
  9254. ##>>>35        lelong        0        version 0,
  9255. >>>35        lelong        0
  9256. >>>>39        ubyte        1        mono,
  9257. >>>>39        ubyte        2        stereo,
  9258. >>>>39        ubyte        >2        %u channels,
  9259. >>>>40        lelong        x        %lu Hz
  9260. # Minimal, nominal and maximal bitrates specified when encoding
  9261. >>>>48        string        <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff    \b,
  9262. # The above tests if at least one of these is specified:
  9263. >>>>>52        lelong        !-1
  9264. # Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
  9265. # instead of -1.
  9266. # Vorbis 1.0 uses 0 instead of -1.
  9267. >>>>>>52    lelong        !0
  9268. >>>>>>>52    lelong        !-1000
  9269. >>>>>>>>52    lelong        x        <%lu
  9270. >>>>>48        lelong        !-1
  9271. >>>>>>48    lelong        x        ~%lu
  9272. >>>>>44        lelong        !-1
  9273. >>>>>>44    lelong        !-1000
  9274. >>>>>>>44    lelong        !0
  9275. >>>>>>>>44    lelong        x        >%lu
  9276. >>>>>48        string        <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff    bps
  9277. # -- Second vorbis header packet - the comments
  9278. # A kludge to read the vendor string.  It's a counted string, not a
  9279. # zero-terminated one, so file(1) can't read it in a generic way.
  9280. # libVorbis is the only one existing currently, so I detect specifically
  9281. # it.  The interesting value is the cvs date (8 digits decimal).
  9282. # Post-RC1 Ogg files have the second header packet (and thus the version)
  9283. # in a different place, so we must use an indirect offset.
  9284. >>>(84.b+85)        string        \x03vorbis
  9285. >>>>(84.b+96)        string/c    Xiphophorus\ libVorbis\ I    \b, created by: Xiphophorus libVorbis I
  9286. >>>>>(84.b+120)        string        >00000000    
  9287. # Map to beta version numbers:
  9288. >>>>>>(84.b+120)    string        <20000508    (<beta1 - prepublic)
  9289. >>>>>>(84.b+120)    string        20000508    (beta1/2)
  9290. >>>>>>(84.b+120)    string        >20000508
  9291. >>>>>>>(84.b+120)    string        <20001031    (beta2-3)
  9292. >>>>>>(84.b+120)    string        20001031    (beta3)
  9293. >>>>>>(84.b+120)    string        >20001031
  9294. >>>>>>>(84.b+120)    string        <20010225    (beta3-4)
  9295. >>>>>>(84.b+120)    string        20010225    (beta4)
  9296. >>>>>>(84.b+120)    string        >20010225
  9297. >>>>>>>(84.b+120)    string        <20010615    (beta4-RC1)
  9298. >>>>>>(84.b+120)    string        20010615    (RC1)
  9299. >>>>>>(84.b+120)    string        20010813    (RC2)
  9300. >>>>>>(84.b+120)    string        20010816    (RC2 - Garf tuned v1)
  9301. >>>>>>(84.b+120)    string        20011014    (RC2 - Garf tuned v2)
  9302. >>>>>>(84.b+120)    string        20011217    (pre-RC3 CVS)
  9303. >>>>>>(84.b+120)    string        20011231    (RC3)
  9304. # Some pre-1.0 CVS snapshots still had "Xiphphorus"...
  9305. >>>>>>(84.b+120)    string        >20011231    (pre-1.0 CVS)
  9306. # For the 1.0 release, Xiphophorus is replaced by Xiph.Org
  9307. >>>>(84.b+96)        string/c    Xiph.Org\ libVorbis\ I    \b, created by: Xiph.Org libVorbis I
  9308. >>>>>(84.b+117)        string        >00000000    
  9309. >>>>>>(84.b+117)    string        <20020717    (pre-1.0 CVS)
  9310. >>>>>>(84.b+117)    string        20020717    (1.0)
  9311. >>>>>>(84.b+117)    string        >20020717    (post-1.0 CVS)
  9312.  
  9313. #------------------------------------------------------------------------------
  9314. # VXL: file(1) magic for VXL binary IO data files
  9315. #
  9316. # from Ian Scott <scottim@sf.net>
  9317. #
  9318. # VXL is a collection of C++ libraries for Computer Vision.
  9319. # See the vsl chapter in the VXL Book for more info
  9320. # http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
  9321. # http:/vxl.sf.net
  9322.  
  9323. 2    lelong    0x472b2c4e    VXL data file,
  9324. >0    leshort    >0        schema version no %d
  9325.  
  9326. #------------------------------------------------------------------------------
  9327. # wordprocessors:  file(1) magic fo word processors.
  9328. #
  9329. ####### PWP file format used on Smith Corona Personal Word Processors:
  9330. 2    string    \040\040\040\040\040\040\040\040\040\040\040ML4D\040\'92    Smith Corona PWP
  9331. >24    byte    2    \b, single spaced
  9332. >24    byte    3    \b, 1.5 spaced
  9333. >24    byte    4    \b, double spaced
  9334. >25    byte    0x42    \b, letter
  9335. >25    byte    0x54    \b, legal
  9336. >26    byte    0x46    \b, A4
  9337.  
  9338. #WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  9339. 0    string    \377WPC\020\000\000\000\022\012\001\001\000\000\000\000    (WP) loadable text
  9340. >15    byte    0    Optimized for Intel
  9341. >15    byte    1    Optimized for Non-Intel
  9342. 1    string    WPC    (Corel/WP)
  9343. >8    short    257    WordPerfect macro
  9344. >8    short    258    WordPerfect help file
  9345. >8    short    259    WordPerfect keyboard file
  9346. >8    short    266    WordPerfect document
  9347. >8    short    267    WordPerfect dictionary
  9348. >8    short    268    WordPerfect thesaurus
  9349. >8    short    269    WordPerfect block
  9350. >8    short    270    WordPerfect rectangular block
  9351. >8    short    271    WordPerfect column block
  9352. >8    short    272    WordPerfect printer data
  9353. >8    short    275    WordPerfect printer data
  9354. >8    short    276    WordPerfect driver resource data
  9355. >8    short    279    WordPerfect hyphenation code
  9356. >8    short    280    WordPerfect hyphenation data
  9357. >8    short    281    WordPerfect macro resource data
  9358. >8    short    283    WordPerfect hyphenation lex
  9359. >8    short    285    WordPerfect wordlist
  9360. >8    short    286    WordPerfect equation resource data
  9361. >8    short    289    WordPerfect spell rules
  9362. >8    short    290    WordPerfect dictionary rules
  9363. >8    short    295    WordPerfect spell rules (Microlytics)
  9364. >8    short    299    WordPerfect settings file
  9365. >8    short    301    WordPerfect 4.2 document
  9366. >8    short    325    WordPerfect dialog file
  9367. >8    short    332    WordPerfect button bar
  9368. >8    short    513    Shell macro
  9369. >8    short    522    Shell definition
  9370. >8    short    769    Notebook macro
  9371. >8    short    770    Notebook help file
  9372. >8    short    771    Notebook keyboard file
  9373. >8    short    778    Notebook definition
  9374. >8    short    1026    Calculator help file
  9375. >8    short     1538    Calendar help file
  9376. >8    short     1546    Calendar data file
  9377. >8    short    1793    Editor macro
  9378. >8    short    1794    Editor help file
  9379. >8    short    1795    Editor keyboard file
  9380. >8    short    1817    Editor macro resource file
  9381. >8    short     2049    Macro editor macro
  9382. >8    short     2050    Macro editor help file
  9383. >8    short    2051    Macro editor keyboard file
  9384. >8    short    2305    PlanPerfect macro
  9385. >8    short    2306    PlanPerfect help file
  9386. >8    short    2307    PlanPerfect keyboard file
  9387. >8    short    2314    PlanPerfect worksheet
  9388. >8    short    2319    PlanPerfect printer definition
  9389. >8    short    2322    PlanPerfect graphic definition
  9390. >8    short    2323    PlanPerfect data
  9391. >8    short    2324    PlanPerfect temporary printer
  9392. >8    short    2329    PlanPerfect macro resource data
  9393. >8    byte    11    Mail
  9394. >8    short    2818    help file
  9395. >8    short    2821    distribution list
  9396. >8    short    2826    out box
  9397. >8    short    2827    in box
  9398. >8    short    2836    users archived mailbox
  9399. >8    short    2837    archived message database
  9400. >8    short    2838    archived attachments
  9401. >8    short    3083    Printer temporary file
  9402. >8    short    3330    Scheduler help file
  9403. >8    short    3338    Scheduler in file
  9404. >8    short    3339    Scheduler out file
  9405. >8    short    3594    GroupWise settings file
  9406. >8    short    3601    GroupWise directory services
  9407. >8    short    3627    GroupWise settings file
  9408. >8    short    4362    Terminal resource data
  9409. >8    short    4363    Terminal resource data
  9410. >8    short    4395    Terminal resource data
  9411. >8    short    4619    GUI loadable text
  9412. >8    short    4620    graphics resource data
  9413. >8    short    4621    printer settings file
  9414. >8    short    4622    port definition file
  9415. >8    short    4623    print queue parameters
  9416. >8    short    4624    compressed file
  9417. >8    short    5130    Network service msg file
  9418. >8    short    5131    Network service msg file
  9419. >8    short    5132    Async gateway login msg
  9420. >8    short    5134    GroupWise message file
  9421. >8    short    7956    GroupWise admin domain database
  9422. >8    short    7957    GroupWise admin host database
  9423. >8    short    7959    GroupWise admin remote host database
  9424. >8    short    7960    GroupWise admin ADS deferment data file
  9425. >8    short    8458    IntelliTAG (SGML) compiled DTD
  9426. >8    long    18219264    WordPerfect graphic image (1.0)
  9427. >8    long    18219520    WordPerfect graphic image (2.0)
  9428. #end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  9429.  
  9430. #------------------------------------------------------------------------------
  9431. # file(1) magic(5) data for xdelta  Josh MacDonald <jmacd@CS.Berkeley.EDU>
  9432. #
  9433. 0    string    %XDELTA%    XDelta binary patch file 0.14
  9434. 0    string    %XDZ000%    XDelta binary patch file 0.18
  9435. 0    string    %XDZ001%    XDelta binary patch file 0.20
  9436. 0    string    %XDZ002%    XDelta binary patch file 1.0
  9437. 0    string    %XDZ003%    XDelta binary patch file 1.0.4
  9438. 0    string    %XDZ004%    XDelta binary patch file 1.1
  9439.  
  9440. #------------------------------------------------------------------------------
  9441. # xenix:  file(1) magic for Microsoft Xenix
  9442. #
  9443. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  9444. # model" lifted from "magic.xenix", with comment "derived empirically;
  9445. # treat as folklore until proven"
  9446. #
  9447. # "small model", "large model", "huge model" stuff lifted from XXX
  9448. #
  9449. # XXX - "x.out" collides with PDP-11 archives
  9450. #
  9451. 0    string        core        core file (Xenix)
  9452. 0    byte        0x80        8086 relocatable (Microsoft)
  9453. 0    leshort        0xff65        x.out
  9454. >2    string        __.SYMDEF     randomized
  9455. >0    byte        x        archive
  9456. 0    leshort        0x206        Microsoft a.out
  9457. >8    leshort        1        Middle model
  9458. >0x1e    leshort        &0x10        overlay
  9459. >0x1e    leshort        &0x2        separate
  9460. >0x1e    leshort        &0x4        pure
  9461. >0x1e    leshort        &0x800        segmented
  9462. >0x1e    leshort        &0x400        standalone
  9463. >0x1e    leshort        &0x8        fixed-stack
  9464. >0x1c    byte        &0x80        byte-swapped
  9465. >0x1c    byte        &0x40        word-swapped
  9466. >0x10    lelong        >0        not-stripped
  9467. >0x1e    leshort        ^0xc000        pre-SysV
  9468. >0x1e    leshort        &0x4000        V2.3
  9469. >0x1e    leshort        &0x8000        V3.0
  9470. >0x1c    byte        &0x4        86
  9471. >0x1c    byte        &0xb        186
  9472. >0x1c    byte        &0x9        286
  9473. >0x1c    byte        &0xa        386
  9474. >0x1f    byte        <0x040        small model
  9475. >0x1f    byte        =0x048        large model    
  9476. >0x1f    byte        =0x049        huge model 
  9477. >0x1e    leshort        &0x1        executable
  9478. >0x1e    leshort        ^0x1        object file
  9479. >0x1e    leshort        &0x40        Large Text
  9480. >0x1e    leshort        &0x20        Large Data
  9481. >0x1e    leshort        &0x120        Huge Objects Enabled
  9482. >0x10    lelong        >0        not stripped
  9483.  
  9484. 0    leshort        0x140        old Microsoft 8086 x.out
  9485. >0x3    byte        &0x4        separate
  9486. >0x3    byte        &0x2        pure
  9487. >0    byte        &0x1        executable
  9488. >0    byte        ^0x1        relocatable
  9489. >0x14    lelong        >0        not stripped
  9490.  
  9491. 0    lelong        0x206        b.out
  9492. >0x1e    leshort        &0x10        overlay
  9493. >0x1e    leshort        &0x2        separate
  9494. >0x1e    leshort        &0x4        pure
  9495. >0x1e    leshort        &0x800        segmented
  9496. >0x1e    leshort        &0x400        standalone
  9497. >0x1e    leshort        &0x1        executable
  9498. >0x1e    leshort        ^0x1        object file
  9499. >0x1e    leshort        &0x4000        V2.3
  9500. >0x1e    leshort        &0x8000        V3.0
  9501. >0x1c    byte        &0x4        86
  9502. >0x1c    byte        &0xb        186
  9503. >0x1c    byte        &0x9        286
  9504. >0x1c    byte        &0x29        286
  9505. >0x1c    byte        &0xa        386
  9506. >0x1e    leshort        &0x4        Large Text
  9507. >0x1e    leshort        &0x2        Large Data
  9508. >0x1e    leshort        &0x102        Huge Objects Enabled
  9509.  
  9510. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  9511.  
  9512. #------------------------------------------------------------------------------
  9513. # xwindows:  file(1) magic for various X/Window system file formats.
  9514.  
  9515. # Compiled X Keymap 
  9516. # XKM (compiled X keymap) files (including version and byte ordering)
  9517. 1    string    mkx                Compiled XKB Keymap: lsb,
  9518. >0    byte    >0                version %d
  9519. >0    byte    =0                obsolete
  9520. 0    string    xkm                Compiled XKB Keymap: msb,
  9521. >3    byte    >0                version %d
  9522. >0    byte    =0                obsolete
  9523.  
  9524. # xfsdump archive
  9525. 0    string    xFSdump0            xfsdump archive
  9526. >8    long    x    (version %d)
  9527.  
  9528. # Jaleo XFS files
  9529. 0    long    395726                Jaleo XFS file
  9530. >4    long    x                - version %ld
  9531. >8    long    x                - [%ld -
  9532. >20    long    x                %ldx
  9533. >24    long    x                %ldx
  9534. >28    long    1008                YUV422]
  9535. >28    long    1000                RGB24]
  9536.  
  9537. #------------------------------------------------------------------------------
  9538. # zilog:  file(1) magic for Zilog Z8000.
  9539. #
  9540. # Was it big-endian or little-endian?  My Product Specification doesn't
  9541. # say.
  9542. #
  9543. 0    long        0xe807        object file (z8000 a.out)
  9544. 0    long        0xe808        pure object file (z8000 a.out)
  9545. 0    long        0xe809        separate object file (z8000 a.out)
  9546. 0    long        0xe805        overlay object file (z8000 a.out)
  9547.  
  9548. #------------------------------------------------------------------------------
  9549. # zyxel:  file(1) magic for ZyXEL modems
  9550. #
  9551. # From <rob@pe1chl.ampr.org>
  9552. # These are the /etc/magic entries to decode datafiles as used for the
  9553. # ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
  9554. # ZyXEL-defined standard)
  9555.  
  9556. 0    string        ZyXEL\002    ZyXEL voice data
  9557. >10    byte        0        - CELP encoding
  9558. >10    byte&0x0B    1        - ADPCM2 encoding
  9559. >10    byte&0x0B    2        - ADPCM3 encoding
  9560. >10    byte&0x0B    3        - ADPCM4 encoding
  9561. >10    byte&0x0B    8        - New ADPCM3 encoding
  9562. >10    byte&0x04    4        with resync
  9563.