home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / lib / rpm / magic < prev    next >
Encoding:
Text File  |  2003-10-29  |  263.3 KB  |  7,669 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.3 1995/01/21 21:09:00 christos Exp 
  11. # Add any locally observed files here.  Remember:
  12. # text if readable, executable if runnable binary, data if unreadable.
  13.  
  14. # XXX promoted from tex so that *.tfm is not mis-identified as mc68k file.
  15. # There is no way to detect TeX Font Metric (*.tfm) files without
  16. # breaking them apart and reading the data.  The following patterns
  17. # match most *.tfm files generated by METAFONT or afm2tfm.
  18. 2    string        \000\021    TeX font metric data
  19. >33    string        >\0        (%s)
  20. 2    string        \000\022    TeX font metric data
  21. >33    string        >\0        (%s)
  22. #------------------------------------------------------------------------------
  23. # acorn:  file(1) magic for files found on Acorn systems
  24. #
  25.  
  26. # RISC OS Chunk File Format
  27. # From RISC OS Programmer's Reference Manual, Appendix D
  28. # We guess the file type from the type of the first chunk.
  29. 0    lelong        0xc3cbc6c5    RISC OS Chunk data
  30. >12    string        OBJ_        \b, AOF object
  31. >12    string        LIB_        \b, ALF library
  32.  
  33. # RISC OS AIF, contains "SWI OS_Exit" at offset 16.
  34. 16    lelong        0xef000011    RISC OS AIF executable
  35.  
  36. # RISC OS Draw files
  37. # From RISC OS Programmer's Reference Manual, Appendix E
  38. 0    string         Draw        RISC OS Draw file data
  39.  
  40. # RISC OS new format font files
  41. # From RISC OS Programmer's Reference Manual, Appendix E
  42. 0    string        FONT\0        RISC OS outline font data,
  43. >5    byte        x        version %d
  44. 0    string        FONT\1        RISC OS 1bpp font data,
  45. >5    byte        x        version %d
  46. 0    string        FONT\4        RISC OS 4bpp font data
  47. >5    byte        x        version %d
  48.  
  49. # RISC OS Music files
  50. # From RISC OS Programmer's Reference Manual, Appendix E
  51. 0    string        Maestro\r    RISC OS music file
  52. >8    byte        x        version %d
  53.  
  54.  
  55. #------------------------------------------------------------------------------
  56. # adi: file(1) magic for ADi's objects
  57. # From Gregory McGarry <g.mcgarry@ieee.org>
  58. #
  59. 0    leshort        0x521c        COFF DSP21k
  60. >18    lelong        &02        executable,
  61. >18    lelong        ^02
  62. >>18    lelong        &01        static object,
  63. >>18    lelong        ^01        relocatable object,
  64. >18    lelong        &010        stripped
  65. >18    lelong        ^010        not stripped
  66.  
  67. #------------------------------------------------------------------------------
  68. # adventure: file(1) magic for Adventure game files
  69. #
  70. # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
  71. # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
  72. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  73. #
  74. # ALAN
  75. # I assume there are other, lower versions, but these are the only ones I
  76. # saw in the archive.
  77. 0    beshort    0x0206    ALAN game data
  78. >2    byte    <10    version 2.6%d
  79.  
  80. # Conflicts with too much other stuff!
  81. # Infocom
  82. # (Note: to avoid false matches Z-machine version 1 and 2 are not
  83. # recognized since only the oldest Zork I and II used them.  Similarly
  84. # there are 4 Infocom games that use verion 4 that are not recognized.)
  85. #0    byte    3    Infocom game data (Z-machine 3,
  86. #>2    beshort    <0x7fff    Release %3d,
  87. #>26    beshort >0    Size %d*2
  88. #>18    string    >\0    Serial %.6s)
  89. #0    byte    5    Infocom game data (Z-machine 5,
  90. #>2    beshort    <0x7fff    Release %3d,
  91. #>26    beshort >0    Size %d*4
  92. #>18    string    >\0    Serial %.6s)
  93. #0    byte    6    Infocom game data (Z-machine 6,
  94. #>2    beshort    <0x7fff    Release %3d,
  95. #>26    beshort >0    Size %d*8
  96. #>18    string    >\0    Serial %.6s)
  97. #0    byte    8    Infocom game data (Z-machine 8,
  98. #>2    beshort    <0x7fff    Release %3d,
  99. #>26    beshort >0    Size %d*8
  100. #>18    string    >\0    Serial %.6s)
  101.  
  102. # TADS (Text Adventure Development System)
  103. #  All files are machine-independent (games compile to byte-code) and are tagged
  104. #  with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
  105. #  on the way).
  106. #  Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
  107. 0    string    TADS2\ bin    TADS
  108. >9    belong  !0x0A0D1A00    game data, CORRUPTED
  109. >9    belong     0x0A0D1A00
  110. >>13    string    >\0        %s game data
  111. #  Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
  112. 0    string    TADS2\ rsc    TADS
  113. >9    belong  !0x0A0D1A00    resource data, CORRUPTED
  114. >9    belong     0x0A0D1A00
  115. >>13    string    >\0        %s resource data
  116. #  Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
  117. #  2-byte length N, the N-char name of the game file *without* a NUL (darn!),
  118. # "TADS2 save\n\r\032\0" and the interpreter version. 
  119. 0    string    TADS2\ save/g    TADS
  120. >12    belong    !0x0A0D1A00    saved game data, CORRUPTED
  121. >12    belong     0x0A0D1A00
  122. >>(16.s+32) string >\0        %s saved game data
  123. #  Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
  124. #  version.
  125. 0    string    TADS2\ save    TADS
  126. >10    belong    !0x0A0D1A00    saved game data, CORRUPTED
  127. >10    belong     0x0A0D1A00
  128. >>14    string    >\0        %s saved game data
  129. #------------------------------------------------------------------------------
  130. # allegro:  file(1) magic for Allegro datafiles
  131. # Toby Deshane <hac@shoelace.digivill.net>
  132. #
  133. 0 belong 0x736C6821   Allegro datafile (packed)
  134. 0 belong 0x736C682E   Allegro datafile (not packed/autodetect)
  135. 0 belong 0x736C682B   Allegro datafile (appended exe data)
  136.  
  137. #------------------------------------------------------------------------------
  138. # alliant:  file(1) magic for Alliant FX series a.out files
  139. #
  140. # If the FX series is the one that had a processor with a 68K-derived
  141. # instruction set, the "short" should probably become "beshort" and the
  142. # "long" should probably become "belong".
  143. # If it's the i860-based one, they should probably become either the
  144. # big-endian or little-endian versions, depending on the mode they ran
  145. # the 860 in....
  146. #
  147. 0    short        0420        0420 Alliant virtual executable
  148. >2    short        &0x0020        common library
  149. >16    long        >0        not stripped
  150. 0    short        0421        0421 Alliant compact executable
  151. >2    short        &0x0020        common library
  152. >16    long        >0        not stripped
  153. #------------------------------------------------------------------------------
  154. # alpha architecture description
  155. #
  156.  
  157. 0    leshort        0603        COFF format alpha
  158. >22    leshort&030000    !020000        executable
  159. >24    leshort        0410        pure
  160. >24    leshort        0413        paged
  161. >22    leshort&020000    !0        dynamically linked
  162. >16    lelong        !0        not stripped
  163. >16    lelong        0        stripped
  164. >22    leshort&030000    020000        shared library
  165. >24    leshort        0407        object
  166. >27    byte        x        - version %d
  167. >26    byte        x        .%d
  168. >28    byte        x        -%d
  169.  
  170. # Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
  171. #
  172. # The actual magic number is just "Core", followed by a 2-byte version
  173. # number; however, treating any file that begins with "Core" as a Digital
  174. # UNIX core dump file may produce too many false hits, so we include one
  175. # byte of the version number as well; DU 5.0 appears only to be up to
  176. # version 2.
  177. #
  178. 0    string        Core\001    Alpha COFF format core dump (Digital UNIX)
  179. >24    string        >\0        \b, from '%s'
  180. 0    string        Core\002    Alpha COFF format core dump (Digital UNIX)
  181. >24    string        >\0        \b, from '%s'
  182.  
  183. #------------------------------------------------------------------------------
  184. # amanda:  file(1) magic for amanda file format
  185. #
  186. 0    string    AMANDA:\         AMANDA 
  187. >8    string    TAPESTART\ DATE        tape header file,
  188. >>23    string    X
  189. >>>25    string    >\             Unused %s
  190. >>23    string    >\             DATE %s
  191. >8    string    FILE\             dump file,
  192. >>13    string    >\             DATE %s
  193. #------------------------------------------------------------------------------
  194. # amigaos:  file(1) magic for AmigaOS binary formats:
  195.  
  196. #
  197. # From ignatios@cs.uni-bonn.de (Ignatios Souvatzis)
  198. # Some formats are still missing: AmigaOS special IFF's, e.g.: FORM....CTLG
  199. # (the others should be separate, anyway)
  200. #
  201. 0    belong        0x000003f3    AmigaOS loadseg()ble executable/binary
  202. 0    belong        0x000003e7    AmigaOS object/library data
  203. #
  204. 0    beshort        0xe310        Amiga Workbench
  205. >2    beshort        1        
  206. >>48    byte        1        disk icon
  207. >>48    byte        2        drawer icon
  208. >>48    byte        3        tool icon
  209. >>48    byte        4        project icon
  210. >>48    byte        5        garbage icon
  211. >>48    byte        6        device icon
  212. >>48    byte        7        kickstart icon
  213. >>48    byte        8        workbench application icon
  214. >2    beshort        >1        icon, vers. %d
  215. #
  216. # various sound formats from the Amiga
  217. # G=F6tz Waschk <waschk@informatik.uni-rostock.de>
  218. #
  219. 0    string        FC14        Future Composer 1.4 Module sound file
  220. 0    string        SMOD        Future Composer 1.3 Module sound file
  221. 0    string        AON4artofnoise    Art Of Noise Module sound file
  222. 1    string        MUGICIAN/SOFTEYES Mugician Module sound file
  223. 58    string        SIDMON\ II\ -\ THE    Sidmon 2.0 Module sound file
  224. 0    string        Synth4.0    Synthesis Module sound file
  225. 0    string        ARP.        The Holy Noise Module sound file
  226. 0    string        BeEp\0        JamCracker Module sound file
  227. 0    string        COSO\0        Hippel-COSO Module sound file
  228. 26    string        V.3        Brian Postma's Soundmon Module sound file v3
  229. 26    string        BPSM        Brian Postma's Soundmon Module sound file v3
  230. 26    string        V.2        Brian Postma's Soundmon Module sound file v2
  231.  
  232.  
  233. #------------------------------------------------------------------------------
  234. # animation:  file(1) magic for animation/movie formats
  235. #
  236. # animation formats
  237. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  238. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  239.  
  240. # MPEG animation format
  241. 0    belong        0x000001b3        MPEG video stream data
  242. #>4    beshort&0xfff0    x            (%d x
  243. #>5    beshort&0x0fff  x            %d)
  244. 0    belong        0x000001ba        MPEG system stream data
  245.  
  246. # MPEG Audio (*.mpx)
  247. # from dreesen@math.fu-berlin.de
  248.  
  249. # MPEG 1.0 Layer 3
  250. 0       beshort&0xfffe  =0xfffa         \bMP3
  251. >2      byte&0xf0       =0x10           \b,  32 kBits
  252. >2      byte&0xf0       =0x20           \b,  40 kBits
  253. >2      byte&0xf0       =0x30           \b,  48 kBits
  254. >2      byte&0xf0       =0x40           \b,  56 kBits
  255. >2      byte&0xf0       =0x50           \b,  64 kBits
  256. >2      byte&0xf0       =0x60           \b,  80 kBits
  257. >2      byte&0xf0       =0x70           \b,  96 kBits
  258. >2      byte&0xf0       =0x80           \b, 112 kBits
  259. >2      byte&0xf0       =0x90           \b, 128 kBits
  260. >2      byte&0xf0       =0xA0           \b, 160 kBits
  261. >2      byte&0xf0       =0xB0           \b, 192 kBits
  262. >2      byte&0xf0       =0xC0           \b, 224 kBits
  263. >2      byte&0xf0       =0xD0           \b, 256 kBits
  264. >2      byte&0xf0       =0xE0           \b, 320 kBits
  265. # freq
  266. >2      byte&0x0C       =0x00           \b, 44.1 kHz
  267. >2      byte&0x0C       =0x04           \b, 48 kHz
  268. >2      byte&0x0C       =0x08           \b, 32 kHz
  269. # misc
  270. >3      byte&0xC0       =0x00           \b, Stereo
  271. >3      byte&0xC0       =0x40           \b, JStereo
  272. >3      byte&0xC0       =0x80           \b, Dual-Ch
  273. >3      byte&0xC0       =0xC0           \b, Mono
  274. #>1     byte&0x01       =0x00           \b, Error Protection
  275. #>2     byte&0x02       =0x02           \b, Padding
  276. #>2     byte&0x01       =0x01           \b, Private
  277. #>3     byte&0x08       =0x08           \b, Copyright
  278. #>3     byte&0x04       =0x04           \b, Original
  279. #>3     byte&0x03       1               \b, Emphasis 5
  280. #>3     byte&0x03       3               \b, Emphasis c
  281.  
  282. # MPEG 1.0 Layer 2
  283. 0       beshort&0xfffe  =0xfffc         \bMP2
  284. >2      byte&0xf0       =0x10           \b,  32 kBits
  285. >2      byte&0xf0       =0x20           \b,  48 kBits
  286. >2      byte&0xf0       =0x30           \b,  56 kBits
  287. >2      byte&0xf0       =0x40           \b,  64 kBits
  288. >2      byte&0xf0       =0x50           \b,  80 kBits
  289. >2      byte&0xf0       =0x60           \b,  96 kBits
  290. >2      byte&0xf0       =0x70           \b, 112 kBits
  291. >2      byte&0xf0       =0x80           \b, 128 kBits
  292. >2      byte&0xf0       =0x90           \b, 160 kBits
  293. >2      byte&0xf0       =0xA0           \b, 192 kBits
  294. >2      byte&0xf0       =0xB0           \b, 224 kBits
  295. >2      byte&0xf0       =0xC0           \b, 256 kBits
  296. >2      byte&0xf0       =0xD0           \b, 320 kBits
  297. >2      byte&0xf0       =0xE0           \b, 384 kBits
  298. # freq
  299. >2      byte&0x0C       =0x00           \b, 44.1 kHz
  300. >2      byte&0x0C       =0x04           \b, 48 kHz
  301. >2      byte&0x0C       =0x08           \b, 32 kHz
  302. # misc
  303. >3      byte&0xC0       =0x00           \b, Stereo
  304. >3      byte&0xC0       =0x40           \b, JStereo
  305. >3      byte&0xC0       =0x80           \b, Dual-Ch
  306. >3      byte&0xC0       =0xC0           \b, Mono
  307. #>1     byte&0x01       =0x00           \b, Error Protection
  308. #>2     byte&0x02       =0x02           \b, Padding
  309. #>2     byte&0x01       =0x01           \b, Private
  310. #>3     byte&0x08       =0x08           \b, Copyright
  311. #>3     byte&0x04       =0x04           \b, Original
  312. #>3     byte&0x03       1               \b, Emphasis 5
  313. #>3     byte&0x03       3               \b, Emphasis c
  314.  
  315. # MPEG 2.0
  316. 0       beshort&0xfff8  =0xfff0         MP
  317. # Layer 3
  318. >1      byte            &0x02           \b3
  319. # Layer 2
  320. >1      byte            &0x04           \b2
  321. >2      byte&0xf0       =0x10           \b,   8 kBits
  322. >2      byte&0xf0       =0x20           \b,  16 kBits
  323. >2      byte&0xf0       =0x30           \b,  24 kBits
  324. >2      byte&0xf0       =0x40           \b,  32 kBits
  325. >2      byte&0xf0       =0x50           \b,  40 kBits
  326. >2      byte&0xf0       =0x60           \b,  48 kBits
  327. >2      byte&0xf0       =0x70           \b,  56 kBits
  328. >2      byte&0xf0       =0x80           \b,  64 kBits
  329. >2      byte&0xf0       =0x90           \b,  80 kBits
  330. >2      byte&0xf0       =0xA0           \b,  96 kBits
  331. >2      byte&0xf0       =0xB0           \b, 112 kBits
  332. >2      byte&0xf0       =0xC0           \b, 128 kBits
  333. >2      byte&0xf0       =0xD0           \b, 144 kBits
  334. >2      byte&0xf0       =0xE0           \b, 160 kBits
  335. # freq
  336. >2      byte&0x0C       =0x00           \b, 22.05 kHz
  337. >2      byte&0x0C       =0x04           \b, 24 kHz
  338. >2      byte&0x0C       =0x08           \b, 16 kHz
  339. # misc
  340. >3      byte&0xC0       =0x00           \b, Stereo
  341. >3      byte&0xC0       =0x40           \b, JStereo
  342. >3      byte&0xC0       =0x80           \b, Dual-Ch
  343. >3      byte&0xC0       =0xC0           \b, Mono
  344. #>1     byte&0x01       =0x00           \b, Error Protection
  345. #>2     byte&0x02       =0x02           \b, Padding
  346. #>2     byte&0x01       =0x01           \b, Private
  347. #>3     byte&0x08       =0x08           \b, Copyright
  348. #>3     byte&0x04       =0x04           \b, Original
  349. #>3     byte&0x03       1               \b, Emphasis 5
  350. #>3     byte&0x03       3               \b, Emphasis c
  351.  
  352. # FLI animation format
  353. 4    leshort        0xAF11            FLI file
  354. >6    leshort        x            - %d frames,
  355. >8    leshort        x            width=%d pixels,
  356. >10    leshort        x            height=%d pixels,
  357. >12    leshort        x            depth=%d,
  358. >16    leshort        x            ticks/frame=%d
  359. # FLC animation format
  360. 4    leshort        0xAF12            FLC file
  361. >6    leshort        x            - %d frames
  362. >8    leshort        x            width=%d pixels,
  363. >10    leshort        x            height=%d pixels,
  364. >12    leshort        x            depth=%d,
  365. >16    leshort        x            ticks/frame=%d
  366.  
  367. # DL animation format
  368. # XXX - collision with most `mips' magic
  369. #
  370. # I couldn't find a real magic number for these, however, this
  371. # -appears- to work.  Note that it might catch other files, too, so be
  372. # careful!
  373. #
  374. # Note that title and author appear in the two 20-byte chunks
  375. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  376. # 255 (hex FF)!  The DL format is really bad.
  377. #
  378. #0    byte    1    DL version 1, medium format (160x100, 4 images/screen)
  379. #>42    byte    x    - %d screens,
  380. #>43    byte    x    %d commands
  381. #0    byte    2    DL version 2
  382. #>1    byte    1    - large format (320x200,1 image/screen),
  383. #>1    byte    2    - medium format (160x100,4 images/screen),
  384. #>1    byte    >2    - unknown format,
  385. #>42    byte    x    %d screens,
  386. #>43    byte    x    %d commands
  387. # Based on empirical evidence, DL version 3 have several nulls following the
  388. # \003.  Most of them start with non-null values at hex offset 0x34 or so.
  389. #0    string    \3\0\0\0\0\0\0\0\0\0\0\0    DL version 3
  390.  
  391. # SGI and Apple formats
  392. 0    string        MOVI        Silicon Graphics movie file
  393. 4    string        moov        Apple QuickTime movie file (moov)
  394. 4    string        mdat        Apple QuickTime movie file (mdat)
  395.  
  396. # iso 13818 transport stream
  397. #
  398. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
  399. # (the following is a little bit restrictive and works fine for a stream
  400. #  that starts with PAT properly. it won't work for stream data, that is
  401. #  cut from an input device data right in the middle, but this shouldn't
  402. #  disturb)
  403. # syncbyte      8 bit    0x47
  404. # error_ind     1 bit    -
  405. # payload_start 1 bit    1
  406. # priority      1 bit    -
  407. # PID          13 bit    0x0000
  408. # scrambling    2 bit    -
  409. # adaptfld_ctrl 2 bit    1 or 3
  410. # conti_count   4 bit    0
  411. 0    belong&0xFF5FFF1F    0x47400010    MPEG transport stream data
  412. >188    byte            !0x47        CORRUPTED
  413.  
  414. # DIF digital video file format <mpruett@sgi.com>
  415. 0    belong&0xffffff00    0x1f070000      DIF
  416. >4    byte            &0x01        (DVCPRO) movie file
  417. >4    byte            ^0x01        (DV) movie file
  418. >3    byte            &0x80        (PAL)
  419. >3    byte            ^0x80        (NTSC)
  420.  
  421. # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
  422. 0    belong            0x3026b275    Microsoft ASF
  423.  
  424. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  425. 0    string            \x8aMNG        MNG video data,
  426. >4    belong            !0x0d0a1a0a    CORRUPTED,
  427. >4    belong            0x0d0a1a0a
  428.  
  429. #------------------------------------------------------------------------------
  430. # apl:  file(1) magic for APL (see also "pdp" and "vax" for other APL
  431. #       workspaces)
  432. #
  433. 0    long        0100554        APL workspace (Ken's original?)
  434.  
  435. #------------------------------------------------------------------------------
  436. # apple:  file(1) magic for Apple file formats
  437. #
  438. 0    string        FiLeStArTfIlEsTaRt    binscii (apple ][) text
  439. 0    string        \x0aGL            Binary II (apple ][) data
  440. 0    string        \x76\xff        Squeezed (apple ][) data
  441. 0    string        NuFile            NuFile archive (apple ][) data
  442. 0    string        N\xf5F\xe9l\xe5        NuFile archive (apple ][) data
  443. 0    belong        0x00051600        AppleSingle encoded Macintosh file
  444. 0    belong        0x00051607        AppleDouble encoded Macintosh file
  445.  
  446. # magic for Newton PDA package formats
  447. # from Ruda Moura <ruda@helllabs.org>
  448. 0    string    package0    Newton package, NOS 1.x,
  449. >12    belong    &0x80000000    AutoRemove,
  450. >12    belong    &0x40000000    CopyProtect,
  451. >12    belong    &0x10000000    NoCompression,
  452. >12    belong    &0x04000000    Relocation,
  453. >12    belong    &0x02000000    UseFasterCompression,
  454. >16    belong    x        version %d
  455.  
  456. 0    string    package1    Newton package, NOS 2.x,
  457. >12    belong    &0x80000000    AutoRemove,
  458. >12    belong    &0x40000000    CopyProtect,
  459. >12    belong    &0x10000000    NoCompression,
  460. >12    belong    &0x04000000    Relocation,
  461. >12    belong    &0x02000000    UseFasterCompression,
  462. >16    belong    x        version %d
  463.  
  464. # The following entries for the Apple II are for files that have
  465. # been transferred as raw binary data from an Apple, without having
  466. # been encapsulated by any of the above archivers.
  467. #
  468. # In general, Apple II formats are hard to identify because Apple DOS
  469. # and especially Apple ProDOS have strong typing in the file system and
  470. # therefore programmers never felt much need to include type information
  471. # in the files themselves.
  472. #
  473. # Eric Fischer <enf@pobox.com>
  474.  
  475. # AppleWorks word processor:
  476. #
  477. # This matches the standard tab stops for an AppleWorks file, but if
  478. # a file has a tab stop set in the first four columns this will fail.
  479. #
  480. # The "O" is really the magic number, but that's so common that it's
  481. # necessary to check the tab stops that follow it to avoid false positives.
  482.  
  483. 4       string          O====   AppleWorks word processor data
  484. >85     byte&0x01       >0      \b, zoomed
  485. >90     byte&0x01       >0      \b, paginated
  486. >92     byte&0x01       >0      \b, with mail merge
  487. #>91    byte            x       \b, left margin %d
  488.  
  489. # AppleWorks database:
  490. #
  491. # This isn't really a magic number, but it's the closest thing to one
  492. # that I could find.  The 1 and 2 really mean "order in which you defined
  493. # categories" and "left to right, top to bottom," respectively; the D and R
  494. # mean that the cursor should move either down or right when you press Return.
  495.  
  496. #30    string        \x01D    AppleWorks database data
  497. #30    string        \x02D    AppleWorks database data
  498. #30    string        \x01R    AppleWorks database data
  499. #30    string        \x02R    AppleWorks database data
  500.  
  501. # AppleWorks spreadsheet:
  502. #
  503. # Likewise, this isn't really meant as a magic number.  The R or C means
  504. # row- or column-order recalculation; the A or M means automatic or manual
  505. # recalculation.
  506.  
  507. #131    string        RA    AppleWorks spreadsheet data
  508. #131    string        RM    AppleWorks spreadsheet data
  509. #131    string        CA    AppleWorks spreadsheet data
  510. #131    string        CM    AppleWorks spreadsheet data
  511.  
  512. # Applesoft BASIC:
  513. #
  514. # This is incredibly sloppy, but will be true if the program was
  515. # written at its usual memory location of 2048 and its first line
  516. # number is less than 256.  Yuck.
  517.  
  518. 0       belong&0xff00ff 0x80000 Applesoft BASIC program data
  519. #>2     leshort         x       \b, first line number %d
  520.  
  521. # ORCA/EZ assembler:
  522. # This will not identify ORCA/M source files, since those have
  523. # some sort of date code instead of the two zero bytes at 6 and 7
  524. # XXX Conflicts with ELF
  525. #4       belong&0xff00ffff       0x01000000      ORCA/EZ assembler source data
  526. #>5      byte                    x               \b, build number %d
  527.  
  528. # Broderbund Fantavision
  529. #
  530. # I don't know what these values really mean, but they seem to recur.
  531. # Will they cause too many conflicts?
  532.  
  533. # Probably :-)
  534. #2    belong&0xFF00FF        0x040008    Fantavision movie data
  535.  
  536. # Some attempts at images.
  537. #
  538. # These are actually just bit-for-bit dumps of the frame buffer, so
  539. # there's really no reasonably way to distinguish them except for their
  540. # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
  541. # or, occasionally, 8184.
  542. #
  543. # Nevertheless this will manage to catch a lot of images that happen
  544. # to have a solid-colored line at the bottom of the screen.
  545.  
  546. 8144    string    \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F    Apple II image with white background
  547. 8144    string    \x55\x2A\x55\x2A\x55\x2A\x55\x2A    Apple II image with purple background
  548. 8144    string    \x2A\x55\x2A\x55\x2A\x55\x2A\x55    Apple II image with green background
  549. 8144    string    \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA    Apple II image with blue background
  550. 8144    string    \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5    Apple II image with orange background
  551.  
  552. # Beagle Bros. Apple Mechanic fonts
  553.  
  554. 0    belong&0xFF00FFFF    0x6400D000    Apple Mechanic font
  555.  
  556. #------------------------------------------------------------------------------
  557. # applix:  file(1) magic for Applixware
  558. # From: Peter Soos <sp@osb.hu>
  559. #
  560. 0    string        *BEGIN        Applixware
  561. >7    string        WORDS            Words Document
  562. >7    string        GRAPHICS        Graphic
  563. >7    string        RASTER            Bitmap
  564. >7    string        SPREADSHEETS        Spreadsheet
  565. >7    string        MACRO            Macro
  566. >7    string        BUILDER            Builder Object
  567.  
  568. #------------------------------------------------------------------------------
  569. # archive:  file(1) magic for archive formats (see also "msdos" for self-
  570. #           extracting compressed archives)
  571. #
  572. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  573. # pre-POSIX "tar" archives are handled in the C code.
  574.  
  575. # POSIX tar archives
  576. 257    string        ustar\0        POSIX tar archive
  577. 257    string        ustar\040\040\0    GNU tar archive
  578.  
  579. # cpio archives
  580. #
  581. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  582. # The idea is to indicate archives produced on machines with the same
  583. # byte order as the machine running "file" with "cpio archive", and
  584. # to indicate archives produced on machines with the opposite byte order
  585. # from the machine running "file" with "byte-swapped cpio archive".
  586. #
  587. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  588. # are defined as "short"s; I think all the new formats are
  589. # character-header formats and thus are strings, not numbers.
  590. 0    short        070707        cpio archive
  591. 0    short        0143561        byte-swapped cpio archive
  592. 0    string        070707        ASCII cpio archive (pre-SVR4 or odc)
  593. 0    string        070701        ASCII cpio archive (SVR4 with no CRC)
  594. 0    string        070702        ASCII cpio archive (SVR4 with CRC)
  595.  
  596. # Debian package (needs to go before regular portable archives)
  597. #
  598. 0    string        !<arch>\ndebian
  599. >8    string        debian-split    part of multipart Debian package
  600. >8    string        debian-binary    Debian binary package
  601. >68    string        >\n        (format %s)
  602. >136    ledate        x        created: %s
  603.  
  604. # other archives
  605. 0    long        0177555        very old archive
  606. 0    short        0177555        very old PDP-11 archive
  607. 0    long        0177545        old archive
  608. 0    short        0177545        old PDP-11 archive
  609. 0    long        0100554        apl workspace
  610. 0    string        =<ar>        archive
  611.  
  612. # MIPS archive (needs to go before regular portable archives)
  613. #
  614. 0    string    !<arch>\n__________E    MIPS archive
  615. >20    string    U            with MIPS Ucode members
  616. >21    string    L            with MIPSEL members
  617. >21    string    B            with MIPSEB members
  618. >19    string    L            and an EL hash table
  619. >19    string    B            and an EB hash table
  620. >22    string    X            -- out of date
  621.  
  622. 0    string        -h-        Software Tools format archive text
  623.  
  624. #
  625. # XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
  626. # "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
  627. #
  628. # 0    string        !<arch>        current ar archive
  629. # 0    long        0x213c6172    archive file
  630. #
  631. # and for SVR1 archives, we have:
  632. #
  633. # 0    string        \<ar>        System V Release 1 ar archive
  634. # 0    string        =<ar>        archive
  635. #
  636. # XXX - did Aegis really store shared libraries, breakpointed modules,
  637. # and absolute code program modules in the same format as new-style
  638. # "ar" archives?
  639. #
  640. 0    string        !<arch>        current ar archive
  641. >8    string        __.SYMDEF    random library
  642. >0    belong        =65538        - pre SR9.5
  643. >0    belong        =65539        - post SR9.5
  644. >0    beshort        2        - object archive
  645. >0    beshort        3        - shared library module
  646. >0    beshort        4        - debug break-pointed module
  647. >0    beshort        5        - absolute code program module
  648. 0    string        \<ar>        System V Release 1 ar archive
  649. 0    string        =<ar>        archive
  650. #
  651. # XXX - from "vax", which appears to collect a bunch of byte-swapped
  652. # thingies, to help you recognize VAX files on big-endian machines;
  653. # with "leshort", "lelong", and "string", that's no longer necessary....
  654. #
  655. 0    belong        0x65ff0000    VAX 3.0 archive
  656. 0    belong        0x3c61723e    VAX 5.0 archive
  657. #
  658. 0    long        0x213c6172    archive file
  659. 0    lelong        0177555        very old VAX archive
  660. 0    leshort        0177555        very old PDP-11 archive
  661. #
  662. # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
  663. # be a random library (it said 0xff65 rather than 0177545).
  664. #
  665. 0    lelong        0177545        old VAX archive
  666. >8    string        __.SYMDEF    random library
  667. 0    leshort        0177545        old PDP-11 archive
  668. >8    string        __.SYMDEF    random library
  669. #
  670. # From "pdp" (but why a 4-byte quantity?)
  671. #
  672. 0    lelong        0x39bed        PDP-11 old archive
  673. 0    lelong        0x39bee        PDP-11 4.0 archive
  674.  
  675. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  676. #
  677. # The first byte is the magic (0x1a), byte 2 is the compression type for
  678. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  679. # filename of the first file (null terminated).  Since some types collide
  680. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  681. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%).  0x01 collides with terminfo.
  682. 0    lelong&0x8080ffff    0x0000081a    ARC archive data, dynamic LZW
  683. 0    lelong&0x8080ffff    0x0000091a    ARC archive data, squashed
  684. 0    lelong&0x8080ffff    0x0000021a    ARC archive data, uncompressed
  685. 0    lelong&0x8080ffff    0x0000031a    ARC archive data, packed
  686. 0    lelong&0x8080ffff    0x0000041a    ARC archive data, squeezed
  687. 0    lelong&0x8080ffff    0x0000061a    ARC archive data, crunched
  688.  
  689. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  690. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  691. # [GRR:  the original entries collide with ARC, above; replaced with combined
  692. #  version (not tested)]
  693. #0    byte        0x1a        RISC OS archive
  694. #>1    string        archive        (ArcFS format)
  695. 0    string        \032archive    RISC OS archive (ArcFS format)
  696.  
  697. # ARJ archiver (jason@jarthur.Claremont.EDU)
  698. 0    leshort        0xea60        ARJ archive data
  699. >5    byte        x        \b, v%d,
  700. >8    byte        &0x04        multi-volume,
  701. >8    byte        &0x10        slash-switched,
  702. >8    byte        &0x20        backup,
  703. >34    string        x        original name: %s,
  704. >7    byte        0        os: MS-DOS
  705. >7    byte        1        os: PRIMOS
  706. >7    byte        2        os: Unix
  707. >7    byte        3        os: Amiga
  708. >7    byte        4        os: Macintosh
  709. >7    byte        5        os: OS/2
  710. >7    byte        6        os: Apple ][ GS
  711. >7    byte        7        os: Atari ST
  712. >7    byte        8        os: NeXT
  713. >7    byte        9        os: VAX/VMS
  714. >3    byte        >0        %d]
  715.  
  716. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  717. # This is a really bad format. A file containing HAWAII will match this...
  718. #0    string        HA        HA archive data,
  719. #>2    leshort        =1        1 file,
  720. #>2    leshort        >1        %u files,
  721. #>4    byte&0x0f    =0        first is type CPY
  722. #>4    byte&0x0f    =1        first is type ASC
  723. #>4    byte&0x0f    =2        first is type HSC
  724. #>4    byte&0x0f    =0x0e        first is type DIR
  725. #>4    byte&0x0f    =0x0f        first is type SPECIAL
  726.  
  727. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  728. 0    string        HPAK        HPACK archive data
  729.  
  730. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  731. 0    string        \351,\001JAM\        JAM archive,
  732. >7    string        >\0            version %.4s
  733. >0x26    byte        =0x27            -
  734. >>0x2b    string          >\0            label %.11s,
  735. >>0x27    lelong        x            serial %08x,
  736. >>0x36    string        >\0            fstype %.8s
  737.  
  738. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  739. 2    string        -lh0-        LHarc 1.x archive data [lh0]
  740. 2    string        -lh1-        LHarc 1.x archive data [lh1]
  741. 2    string        -lz4-        LHarc 1.x archive data [lz4]
  742. 2    string        -lz5-        LHarc 1.x archive data [lz5]
  743. #    [never seen any but the last; -lh4- reported in comp.compression:]
  744. 2    string        -lzs-        LHa 2.x? archive data [lzs]
  745. 2    string        -lh\40-        LHa 2.x? archive data [lh ]
  746. 2    string        -lhd-        LHa 2.x? archive data [lhd]
  747. 2    string        -lh2-        LHa 2.x? archive data [lh2]
  748. 2    string        -lh3-        LHa 2.x? archive data [lh3]
  749. 2    string        -lh4-        LHa (2.x) archive data [lh4]
  750. 2    string        -lh5-        LHa (2.x) archive data [lh5]
  751. 2    string        -lh6-        LHa (2.x) archive data [lh6]
  752. 2    string        -lh7-        LHa (2.x) archive data [lh7]
  753. >20    byte        x        - header level %d
  754.  
  755. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  756. 0    string        Rar!        RAR archive data
  757.  
  758. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  759. 0    string        SQSH        squished archive data (Acorn RISCOS)
  760.  
  761. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  762. # I can't figure out the self-extracting form of these buggers...
  763. 0    string        UC2\x1a        UC2 archive data
  764.  
  765. # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  766. 0    string        PK\003\004    Zip archive data
  767. >4    byte        0x09        \b, at least v0.9 to extract
  768. >4    byte        0x0a        \b, at least v1.0 to extract
  769. >4    byte        0x0b        \b, at least v1.1 to extract
  770. >4    byte        0x14        \b, at least v2.0 to extract
  771.  
  772. # Zoo archiver
  773. 20    lelong        0xfdc4a7dc    Zoo archive data
  774. >4    byte        >48        \b, v%c.
  775. >>6    byte        >47        \b%c
  776. >>>7    byte        >47        \b%c
  777. >32    byte        >0        \b, modify: v%d
  778. >>33    byte        x        \b.%d+
  779. >42    lelong        0xfdc4a7dc    \b,
  780. >>70    byte        >0        extract: v%d
  781. >>>71    byte        x        \b.%d+
  782.  
  783. # Shell archives
  784. 10    string        #\ This\ is\ a\ shell\ archive    shell archive text
  785.  
  786. #
  787. # LBR. NB: May conflict with the questionable 
  788. #          "binary Computer Graphics Metafile" format.
  789. #
  790. 0       string  \0\ \ \ \ \ \ \ \ \ \ \ \0\0    LBR archive data
  791. #
  792. # PMA (CP/M derivative of LHA)
  793. #
  794. 2       string          -pm0-           PMarc archive data [pm0]
  795. 2       string          -pm1-           PMarc archive data [pm1]
  796. 2       string          -pm2-           PMarc archive data [pm2]
  797. 2       string          -pms-           PMarc SFX archive (CP/M, DOS)
  798. 5       string          -pc1-           PopCom compressed executable (CP/M)
  799.  
  800. # From rafael@icp.inpg.fr (Rafael Laboissiere) 
  801. # The Project Revision Control System (see
  802. # http://www.XCF.Berkeley.EDU/~jmacd/prcs.html) generates a packaged project
  803. # file which is recognized by the following entry:
  804. 0    leshort        0xeb81    PRCS packaged project
  805.  
  806. # Microsoft cabinets 
  807. # by David Necas (Yeti) <yeti@physics.muni.cz>
  808. 0    string    MSCF\0\0\0\0    Microsoft cabinet file data,
  809. >25    byte    x        v%d
  810. >24    byte    x        \b.%d
  811.  
  812. # GTKtalog catalogs 
  813. # by David Necas (Yeti) <yeti@physics.muni.cz>
  814. 4    string    gtktalog\     GTKtalog catalog data,
  815. >13    string    3        version 3
  816. >>14    beshort    0x677a        (gzipped)
  817. >>14    beshort    !0x677a        (not gzipped)
  818. >13    string    >3        version %s
  819.  
  820. ############################################################################
  821. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  822. 0       string          PAR\0    PARity archive data
  823. >48    leshort        =0    - Index file
  824. >48    leshort        >0    - file number %d
  825.  
  826. #------------------------------------------------------------------------------
  827. # asterix:  file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
  828. # strings as "long" - we assume they're just strings:
  829. # From: guy@netapp.com (Guy Harris)
  830. #
  831. 0    string        *STA        Aster*x
  832. >7    string        WORD            Words Document
  833. >7    string        GRAP            Graphic
  834. >7    string        SPRE            Spreadsheet
  835. >7    string        MACR            Macro
  836. 0    string        2278        Aster*x Version 2
  837. >29    byte        0x36            Words Document
  838. >29    byte        0x35            Graphic
  839. >29    byte        0x32            Spreadsheet
  840. >29    byte        0x38            Macro
  841.  
  842.  
  843. #------------------------------------------------------------------------------
  844. # att3b:  file(1) magic for AT&T 3B machines
  845. #
  846. # The `versions' should be un-commented if they work for you.
  847. # (Was the problem just one of endianness?)
  848. #
  849. # 3B20
  850. #
  851. # The 3B20 conflicts with SCCS.
  852. #0    beshort        0550        3b20 COFF executable
  853. #>12    belong        >0        not stripped
  854. #>22    beshort        >0        - version %ld
  855. #0    beshort        0551        3b20 COFF executable (TV)
  856. #>12    belong        >0        not stripped
  857. #>22    beshort        >0        - version %ld
  858. #
  859. # WE32K
  860. #
  861. 0    beshort        0560        WE32000 COFF
  862. >18    beshort        ^00000020    object
  863. >18    beshort        &00000020    executable
  864. >12    belong        >0        not stripped
  865. >18    beshort        ^00010000    N/A on 3b2/300 w/paging
  866. >18    beshort        &00020000    32100 required
  867. >18    beshort        &00040000    and MAU hardware required
  868. >20    beshort        0407        (impure)
  869. >20    beshort        0410        (pure)
  870. >20    beshort        0413        (demand paged)
  871. >20    beshort        0443        (target shared library)
  872. >22    beshort        >0        - version %ld
  873. 0    beshort        0561        WE32000 COFF executable (TV)
  874. >12    belong        >0        not stripped
  875. #>18    beshort        &00020000    - 32100 required
  876. #>18    beshort        &00040000    and MAU hardware required
  877. #>22    beshort        >0        - version %ld
  878. #
  879. # core file for 3b2 
  880. 0    string        \000\004\036\212\200    3b2 core file
  881. >364    string        >\0        of '%s'
  882.  
  883. #------------------------------------------------------------------------------
  884. # audio:  file(1) magic for sound formats (see also "iff")
  885. #
  886. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  887. # and others
  888. #
  889.  
  890. # Sun/NeXT audio data
  891. 0    string        .snd        Sun/NeXT audio data:
  892. >12    belong        1        8-bit ISDN u-law,
  893. >12    belong        2        8-bit linear PCM [REF-PCM],
  894. >12    belong        3        16-bit linear PCM,
  895. >12    belong        4        24-bit linear PCM,
  896. >12    belong        5        32-bit linear PCM,
  897. >12    belong        6        32-bit IEEE floating point,
  898. >12    belong        7        64-bit IEEE floating point,
  899. >12    belong        23        8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  900. >12    belong        24        compressed (8-bit G.722 ADPCM)
  901. >12    belong        25        compressed (3-bit G.723 ADPCM),
  902. >12    belong        26        compressed (5-bit G.723 ADPCM),
  903. >12    belong        27        8-bit A-law,
  904. >20    belong        1        mono,
  905. >20    belong        2        stereo,
  906. >20    belong        4        quad,
  907. >16    belong        >0        %d Hz
  908.  
  909. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  910. # that uses little-endian encoding and has a different magic number
  911. 0    lelong        0x0064732E    DEC audio data:
  912. >12    lelong        1        8-bit ISDN u-law,
  913. >12    lelong        2        8-bit linear PCM [REF-PCM],
  914. >12    lelong        3        16-bit linear PCM,
  915. >12    lelong        4        24-bit linear PCM,
  916. >12    lelong        5        32-bit linear PCM,
  917. >12    lelong        6        32-bit IEEE floating point,
  918. >12    lelong        7        64-bit IEEE floating point,
  919. >12    lelong        23        8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  920. >20    lelong        1        mono,
  921. >20    lelong        2        stereo,
  922. >20    lelong        4        quad,
  923. >16    lelong        >0        %d Hz
  924.  
  925. # Creative Labs AUDIO stuff
  926. 0    string    MThd            Standard MIDI data
  927. >9     byte    >0            (format %d)
  928. >11    byte    >1            using %d tracks
  929. 0    string    CTMF            Creative Music (CMF) data
  930. 0    string    SBI            SoundBlaster instrument data
  931. 0    string    Creative\ Voice\ File    Creative Labs voice data
  932. # is this next line right?  it came this way...
  933. >19    byte    0x1A
  934. >23    byte    >0            - version %d
  935. >22    byte    >0            \b.%d
  936.  
  937. # first entry is also the string "NTRK"
  938. 0    belong        0x4e54524b    MultiTrack sound data
  939. >4    belong        x        - version %ld
  940.  
  941. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  942. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  943. 0    string        EMOD        Extended MOD sound data,
  944. >4    byte&0xf0    x        version %d
  945. >4    byte&0x0f    x        \b.%d,
  946. >45    byte        x        %d instruments
  947. >83    byte        0        (module)
  948. >83    byte        1        (song)
  949.  
  950. # Real Audio (Magic .ra\0375)
  951. 0    belong        0x2e7261fd    RealAudio sound file
  952. 0    string        .RMF        RealMedia file
  953.  
  954. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  955. # Oct 31, 1995
  956. 0    string        MTM        MultiTracker Module sound file
  957. #0    string        if        Composer 669 Module sound data
  958. 0    string        FAR        Module sound data
  959. 0    string        MAS_U        ULT(imate) Module sound data
  960. 0x2c    string        SCRM        ScreamTracker III Module sound data
  961. 0    string        Extended Module    Extended Module sound data
  962.  
  963. # Gravis UltraSound patches
  964. # From <ache@nagual.ru>
  965.  
  966. 0    string        GF1PATCH110\0ID#000002\0    GUS patch
  967. 0    string        GF1PATCH100\0ID#000002\0    Old GUS    patch
  968.  
  969. #
  970. # Taken from loader code from mikmod version 2.14
  971. # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  972. 0    string    JN        extended 669 module data
  973. 0    string    MAS_UTrack_V00
  974. >14    string    >/0        ultratracker V1.%.1s module sound data
  975. 0    string    UN05        MikMod UNI format module sound data
  976. 0    string    Extended\ Module: Fasttracker II module sound data
  977. 21    string    !SCREAM!    Screamtracker 2 module sound data
  978. 1080    string    M.K.        4-channel Protracker module sound data
  979. 1080    string    M!K!        4-channel Protracker module sound data
  980. 1080    string    FLT4        4-channel Startracker module sound data
  981. 1080    string    4CHN        4-channel Fasttracker module sound data
  982. 1080    string    6CHN        6-channel Fasttracker module sound data
  983. 1080    string    8CHN        8-channel Fasttracker module sound data
  984. 1080    string    CD81        8-channel Oktalyzer module sound data
  985. 1080    string    OKTA        8-channel Oktalyzer module sound data
  986. # Not good enough.
  987. #1082    string    CH
  988. #>1080    string    >/0        %.2s-channel Fasttracker "oktalyzer" module sound data
  989. 1080    string    16CN        16-channel Taketracker module sound data
  990. 1080    string    32CN        32-channel Taketracker module sound data
  991.  
  992. # TOC sound files -Trevor Johnson <trevor@jpj.net>
  993. #
  994. 0       string          TOC             TOC sound file
  995.  
  996. # sidfiles <pooka@iki.fi>
  997. 0    string        SIDPLAY\ INFOFILE    Sidplay info file
  998. 0    string        PSID            PlaySID v2.2+ (AMIGA) sidtune
  999. >4    beshort        >0            w/ header v%d,
  1000. >14    beshort        =1            single song,
  1001. >14    beshort        >1            %d songs,
  1002. >16    beshort        >0            default song: %d
  1003.  
  1004. # IRCAM <mpruett@sgi.com>
  1005. # VAX and MIPS files are little-endian; Sun and NeXT are big-endian
  1006. 0    belong        0x64a30100        IRCAM file (VAX)
  1007. 0    belong        0x64a30200        IRCAM file (Sun)
  1008. 0    belong        0x64a30300        IRCAM file (MIPS little-endian)
  1009. 0    belong        0x64a30400        IRCAM file (NeXT)
  1010.  
  1011. # NIST SPHERE <mpruett@sgi.com>
  1012. 0    string        NIST_1A\n\ \ \ 1024\n    NIST SPHERE file
  1013.  
  1014. # Sample Vision <mpruett@sgi.com>
  1015. 0    string        SOUND\ SAMPLE\ DATA\     Sample Vision file
  1016.  
  1017. # Audio Visual Research <mpruett@sgi.com>
  1018. 0    string        2BIT            Audio Visual Research file
  1019.  
  1020. # SGI SoundTrack <mpruett@sgi.com>
  1021. 0    string        _SGI_SoundTrack        SGI SoundTrack project file
  1022. # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  1023. 0    string        ID3    MP3 file with ID3 version 2.
  1024. >3    ubyte    <0xff    \b%d.
  1025. >4    ubyte    <0xff    \b%d tag
  1026.  
  1027. # NSF (NES sound file) magic
  1028. 0    string        NESM\x1a    NES Sound File
  1029. >14    string        >\0        ("%s" by
  1030. >46    string        >\0        %s, copyright
  1031. >78    string        >\0        %s),
  1032. >5    byte        x        version %d,
  1033. >6    byte        x        %d tracks,
  1034. >122    byte&0x2    =1        dual PAL/NTSC
  1035. >122    byte&0x1    =1        PAL
  1036. >122    byte&0x1    =0        NTSC
  1037.  
  1038. # Impuse tracker module (audio/x-it)
  1039. 0    string        IMPM        Impulse Tracker module sound data -
  1040. >4    string        >\0        "%s"
  1041.  
  1042. # Imago Orpheus module (audio/x-imf)
  1043. 60    string        IM10        Imago Orpheus module sound data -
  1044. >0    string        >\0        "%s"
  1045. #------------------------------------------------------------------------------
  1046. # blender: file(1) magic for Blender 3D data files
  1047. #
  1048. # Coded by Guillermo S. Romero <gsromero@alumnos.euitt.upm.es> using the
  1049. # data from Ton Roosendaal <ton@blender.nl>. Ton or his company do not
  1050. # support the rule, so mail GSR if problems with it. Rule version: 1.1.
  1051. # You can get latest version with comments and details about the format
  1052. # at http://acd.asoc.euitt.upm.es/~gsromero/3d/blender/magic.blender
  1053.  
  1054. 0    string    =BLENDER    Blender3D,
  1055. >7    string    =_        saved as 32-bits
  1056. >7      string    =-        saved as 64-bits
  1057. >8    string    =v        little endian
  1058. >8    string    =V        big endian
  1059. >9    byte    x        with version %c.
  1060. >10    byte    x        \b%c
  1061. >11    byte    x        \b%c
  1062.  
  1063. #------------------------------------------------------------------------------
  1064. # blit:  file(1) magic for 68K Blit stuff as seen from 680x0 machine
  1065. #
  1066. # Note that this 0407 conflicts with several other a.out formats...
  1067. #
  1068. # XXX - should this be redone with "be" and "le", so that it works on
  1069. # little-endian machines as well?  If so, what's the deal with
  1070. # "VAX-order" and "VAX-order2"?
  1071. #
  1072. #0    long        0407        68K Blit (standalone) executable
  1073. #0    short        0407        VAX-order2 68K Blit (standalone) executable
  1074. 0    short        03401        VAX-order 68K Blit (standalone) executable
  1075. 0    long        0406        68k Blit mpx/mux executable
  1076. 0    short        0406        VAX-order2 68k Blit mpx/mux executable
  1077. 0    short        03001        VAX-order 68k Blit mpx/mux executable
  1078. # Need more values for WE32 DMD executables.
  1079. # Note that 0520 is the same as COFF
  1080. #0    short        0520        tty630 layers executable
  1081. #------------------------------------------------------------------------------
  1082. # bsdi:  file(1) magic for BSD/OS (from BSDI) objects
  1083. #
  1084.  
  1085. 0    lelong        0314        386 compact demand paged pure executable
  1086. >16    lelong        >0        not stripped
  1087. >32    byte        0x6a        (uses shared libs)
  1088.  
  1089. 0    lelong        0407        386 executable
  1090. >16    lelong        >0        not stripped
  1091. >32    byte        0x6a        (uses shared libs)
  1092.  
  1093. 0    lelong        0410        386 pure executable
  1094. >16    lelong        >0        not stripped
  1095. >32    byte        0x6a        (uses shared libs)
  1096.  
  1097. 0    lelong        0413        386 demand paged pure executable
  1098. >16    lelong        >0        not stripped
  1099. >32    byte        0x6a        (uses shared libs)
  1100.  
  1101. # same as in SunOS 4.x, except for static shared libraries
  1102. 0    belong&077777777    0600413        sparc demand paged
  1103. >0    byte        &0x80
  1104. >>20    belong        <4096        shared library
  1105. >>20    belong        =4096        dynamically linked executable
  1106. >>20    belong        >4096        dynamically linked executable
  1107. >0    byte        ^0x80        executable
  1108. >16    belong        >0        not stripped
  1109. >36    belong        0xb4100001    (uses shared libs)
  1110.  
  1111. 0    belong&077777777    0600410        sparc pure
  1112. >0    byte        &0x80        dynamically linked executable
  1113. >0    byte        ^0x80        executable
  1114. >16    belong        >0        not stripped
  1115. >36    belong        0xb4100001    (uses shared libs)
  1116.  
  1117. 0    belong&077777777    0600407        sparc
  1118. >0    byte        &0x80        dynamically linked executable
  1119. >0    byte        ^0x80        executable
  1120. >16    belong        >0        not stripped
  1121. >36    belong        0xb4100001    (uses shared libs)
  1122.  
  1123. #------------------------------------------------------------------------------
  1124. # c-lang:  file(1) magic for C programs (or REXX)
  1125. #
  1126.  
  1127. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  1128. # if you uncomment "/*" for C/REXX below, also uncomment this entry
  1129. #0    string        /*\ XPM\ */    X pixmap image data
  1130.  
  1131. # this first will upset you if you're a PL/1 shop...
  1132. # in which case rm it; ascmagic will catch real C programs
  1133. #0    string        /*        C or REXX program text
  1134. 0    string        //        C++ program text
  1135.  
  1136. #------------------------------------------------------------------------------
  1137. # CDDB: file(1) magic for CDDB(tm) format CD text data files
  1138. #
  1139. # From <steve@gracenote.com>
  1140. #
  1141. # This is the /etc/magic entry to decode datafiles as used by
  1142. # CDDB-enabled CD player applications.
  1143. #
  1144.  
  1145. 0       string/b        #\040xmcd               CDDB(tm) format CD text data
  1146.  
  1147. #------------------------------------------------------------------------------
  1148. # chi:  file(1) magic for ChiWriter files
  1149. #
  1150. 0       string          \\1cw\          ChiWriter file
  1151. >5      string          >\0             version %s
  1152. 0       string          \\1cw           ChiWriter file
  1153. #------------------------------------------------------------------------------
  1154. # cisco:  file(1) magic for cisco Systems routers
  1155. #
  1156. # Most cisco file-formats are covered by the generic elf code
  1157. #
  1158. # Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
  1159. 0    belong&0xffffff00    0x85011400  cisco IOS microcode
  1160. >7    string        >\0            for '%s'
  1161. 0    belong&0xffffff00    0x8501cb00  cisco IOS experimental microcode
  1162. >7    string        >\0            for '%s'
  1163. #------------------------------------------------------------------------------
  1164. # citrus locale declaration
  1165. #
  1166.  
  1167. 0    string        RuneCT        Citrus locale declaration for LC_CTYPE
  1168.  
  1169.  
  1170. #------------------------------------------------------------------------------
  1171. # claris:  file(1) magic for claris
  1172. # "H. Nanosecond" <aldomel@ix.netcom.com>
  1173. # Claris Works a word processor, etc.
  1174. # Version 3.0
  1175.  
  1176. # .pct claris works clip art files
  1177. #0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
  1178. #*
  1179. #0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
  1180. #null to byte 1000 octal
  1181. 514    string    \377\377\377\377\000    Claris clip art?
  1182. >0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0    yes.
  1183. 514    string    \377\377\377\377\001    Claris clip art?
  1184. >0    string    \0\0\0\0\0\0\0\0\0\0\0\0\0    yes.
  1185.  
  1186. # Claris works files
  1187. # .cwk
  1188. 0    string    \002\000\210\003\102\117\102\117\000\001\206 Claris works document
  1189. # .plt
  1190. 0    string    \020\341\000\000\010\010    Claris Works pallete files .plt
  1191.  
  1192. # .msp a dictionary file I am not sure about this I have only one .msp file
  1193. 0    string    \002\271\262\000\040\002\000\164    Claris works dictionary
  1194.  
  1195. # .usp are user dictionary bits
  1196. # I am not sure about a magic header:
  1197. #0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
  1198. #        soh   S   p   f   8   U   D  sp   ^   S  cr  nl   p   o   d   i
  1199. #0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
  1200. #          a   t   r   i   s   t  sp   ^   S  cr  nl   d   i   v  sp   #
  1201.  
  1202. # .mth Thesaurus
  1203. # statrts with \0 but no magic header
  1204.  
  1205. # .chy Hyphenation file
  1206. # I am not sure: 000 210 034 000 000
  1207.  
  1208. # other claris files
  1209. #./windows/claris/useng.ndx: data
  1210. #./windows/claris/xtndtran.l32: data
  1211. #./windows/claris/xtndtran.lst: data
  1212. #./windows/claris/clworks.lbl: data
  1213. #./windows/claris/clworks.prf: data
  1214. #./windows/claris/userd.spl: data
  1215.  
  1216. #------------------------------------------------------------------------------
  1217. # clipper:  file(1) magic for Intergraph (formerly Fairchild) Clipper.
  1218. #
  1219. # XXX - what byte order does the Clipper use?
  1220. #
  1221. # XXX - what's the "!" stuff:
  1222. #
  1223. # >18    short        !074000,000000    C1 R1 
  1224. # >18    short        !074000,004000    C2 R1
  1225. # >18    short        !074000,010000    C3 R1
  1226. # >18    short        !074000,074000    TEST
  1227. #
  1228. # I shall assume it's ANDing the field with the first value and
  1229. # comparing it with the second, and rewrite it as:
  1230. #
  1231. # >18    short&074000    000000        C1 R1 
  1232. # >18    short&074000    004000        C2 R1
  1233. # >18    short&074000    010000        C3 R1
  1234. # >18    short&074000    074000        TEST
  1235. #
  1236. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  1237. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  1238. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  1239. # somebody else thought was a good idea; it's not documented in the
  1240. # man page for this version of "magic", nor does it appear to be
  1241. # implemented (at least not after I blew off the bogus code to turn
  1242. # old-style "&"s into new-style "&"s, which just didn't work at all).
  1243. #
  1244. 0    short        0575        CLIPPER COFF executable (VAX #)
  1245. >20    short        0407        (impure)
  1246. >20    short        0410        (5.2 compatible)
  1247. >20    short        0411        (pure)
  1248. >20    short        0413        (demand paged)
  1249. >20    short        0443        (target shared library)
  1250. >12    long        >0        not stripped
  1251. >22    short        >0        - version %ld
  1252. 0    short        0577        CLIPPER COFF executable
  1253. >18    short&074000    000000        C1 R1 
  1254. >18    short&074000    004000        C2 R1
  1255. >18    short&074000    010000        C3 R1
  1256. >18    short&074000    074000        TEST
  1257. >20    short        0407        (impure)
  1258. >20    short        0410        (pure)
  1259. >20    short        0411        (separate I&D)
  1260. >20    short        0413        (paged)
  1261. >20    short        0443        (target shared library)
  1262. >12    long        >0        not stripped
  1263. >22    short        >0        - version %ld
  1264. >48    long&01        01        alignment trap enabled
  1265. >52    byte        1        -Ctnc
  1266. >52    byte        2        -Ctsw
  1267. >52    byte        3        -Ctpw
  1268. >52    byte        4        -Ctcb
  1269. >53    byte        1        -Cdnc
  1270. >53    byte        2        -Cdsw
  1271. >53    byte        3        -Cdpw
  1272. >53    byte        4        -Cdcb
  1273. >54    byte        1        -Csnc
  1274. >54    byte        2        -Cssw
  1275. >54    byte        3        -Cspw
  1276. >54    byte        4        -Cscb
  1277. 4    string        pipe        CLIPPER instruction trace
  1278. 4    string        prof        CLIPPER instruction profile
  1279.  
  1280. #------------------------------------------------------------------------------
  1281. # commands:  file(1) magic for various shells and interpreters
  1282. #
  1283. 0    string        :            shell archive or script for antique kernel text
  1284. 0    string/b    #!\ /bin/sh        Bourne shell script text executable
  1285. 0    string/b    #!\ /bin/csh        C shell script text executable
  1286. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  1287. 0    string/b    #!\ /bin/ksh        Korn shell script text executable
  1288. 0    string/b     #!\ /bin/tcsh        Tenex C shell script text executable
  1289. 0    string/b     #!\ /usr/local/tcsh    Tenex C shell script text executable
  1290. 0    string/b    #!\ /usr/local/bin/tcsh    Tenex C shell script text executable
  1291.  
  1292. #
  1293. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  1294. 0    string/b    #!\ /usr/local/bin/zsh    Paul Falstad's zsh script text executable
  1295. 0    string/b    #!\ /usr/local/bin/ash    Neil Brown's ash script text executable
  1296. 0    string/b    #!\ /usr/local/bin/ae    Neil Brown's ae script text executable
  1297. 0    string/b    #!\ /bin/nawk        new awk script text executable
  1298. 0    string/b    #!\ /usr/bin/nawk    new awk script text executable
  1299. 0    string/b    #!\ /usr/local/bin/nawk    new awk script text executable
  1300. 0    string/b    #!\ /bin/gawk        GNU awk script text executable
  1301. 0    string/b    #!\ /usr/bin/gawk    GNU awk script text executable
  1302. 0    string/b    #!\ /usr/local/bin/gawk    GNU awk script text executable
  1303. #
  1304. 0    string/b    #!\ /bin/awk        awk script text executable
  1305. 0    string/b    #!\ /usr/bin/awk    awk script text executable
  1306. 0    string        BEGIN            awk script text
  1307.  
  1308. # AT&T Bell Labs' Plan 9 shell
  1309. 0    string/b    #!\ /bin/rc    Plan 9 rc shell script text executable
  1310.  
  1311. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  1312. 0    string/b    #!\ /bin/bash    Bourne-Again shell script text executable
  1313. 0    string/b    #!\ /usr/local/bin/bash    Bourne-Again shell script text executable
  1314.  
  1315. # using env
  1316. 0    string        #!/usr/bin/env        a
  1317. >15    string        >\0            %s script text executable
  1318. 0    string        #!\ /usr/bin/env    a
  1319. >16    string        >\0            %s script text executable
  1320.  
  1321.  
  1322. # generic shell magic
  1323. 0    string        #!\ /            a
  1324. >3    string        >\0            %s script text executable
  1325. 0    string        #!\    /        a
  1326. >3    string        >\0            %s script text executable
  1327. 0    string        #!/            a
  1328. >2    string        >\0            %s script text executable
  1329. 0    string        #!\             script text executable
  1330. >3    string        >\0            for %s
  1331.  
  1332. # PHP scripts
  1333. # Ulf Harnhammar <ulfh@update.uu.se>
  1334. 0    string/c    =<?php            PHP script text
  1335. 0    string        =<?\n            PHP script text
  1336. 0    string        =<?\r            PHP script text
  1337. 0    string/b    #!\ /usr/local/bin/php    PHP script text executable
  1338. 0    string/b    #!\ /usr/bin/php    PHP script text executable
  1339.  
  1340. 0    string        Zend\x00        PHP script Zend Optimizer data
  1341.  
  1342. #------------------------------------------------------------------------------
  1343. # compress:  file(1) magic for pure-compression formats (no archives)
  1344. #
  1345. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  1346. #
  1347. # Formats for various forms of compressed data
  1348. # Formats for "compress" proper have been moved into "compress.c",
  1349. # because it tries to uncompress it to figure out what's inside.
  1350.  
  1351. # standard unix compress
  1352. 0    string        \037\235    compress'd data
  1353. >2    byte&0x80    >0        block compressed
  1354. >2    byte&0x1f    x        %d bits
  1355.  
  1356. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  1357. #   Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  1358. #    * Original filename is only at offset 10 if "extra field" absent
  1359. #    * Produce shorter output - notably, only report compression methods
  1360. #      other than 8 ("deflate", the only method defined in RFC 1952).
  1361. 0       string          \037\213        gzip compressed data
  1362. >2    byte        <8        \b, reserved method
  1363. >2    byte        >8        \b, unknown method
  1364. >3    byte        &0x01        \b, ASCII
  1365. >3    byte        &0x02        \b, continuation
  1366. >3    byte        &0x04        \b, extra field
  1367. >3    byte&0xC    =0x08
  1368. >>10    string        x        \b, was "%s"
  1369. >9    byte        =0x00        \b, from MS-DOS
  1370. >9    byte        =0x01        \b, from Amiga
  1371. >9    byte        =0x02        \b, from VMS
  1372. >9    byte        =0x03        \b, from Unix
  1373. >9    byte        =0x05        \b, from Atari
  1374. >9    byte        =0x06        \b, from OS/2
  1375. >9    byte        =0x07        \b, from MacOS
  1376. >9    byte        =0x0A        \b, from Tops/20
  1377. >9    byte        =0x0B        \b, from Win/32
  1378. >3    byte        &0x10        \b, comment
  1379. >3    byte        &0x20        \b, encrypted
  1380. ### >4    ledate        x        last modified: %s,
  1381. >8    byte        2        \b, max compression
  1382. >8    byte        4        \b, max speed
  1383.  
  1384. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  1385. 0    string        \037\036    packed data
  1386. >2    belong        >1        \b, %d characters originally
  1387. >2    belong        =1        \b, %d character originally
  1388. #
  1389. # This magic number is byte-order-independent.  XXX - Does that mean this
  1390. # is big-endian, little-endian, either, or that you can't tell?
  1391. # this short is valid for SunOS
  1392. 0    short        017437        old packed data
  1393.  
  1394. # XXX - why *two* entries for "compacted data", one of which is
  1395. # byte-order independent, and one of which is byte-order dependent?
  1396. #
  1397. 0    short        0x1fff        compacted data
  1398. # This string is valid for SunOS (BE) and a matching "short" is listed
  1399. # in the Ultrix (LE) magic file.
  1400. 0    string        \377\037    compacted data
  1401. 0    short        0145405        huf output
  1402.  
  1403. # bzip2
  1404. 0    string        BZh        bzip2 compressed data
  1405. >3    byte        >47        \b, block size = %c00k
  1406.  
  1407. # squeeze and crunch
  1408. # Michael Haardt <michael@cantor.informatik.rwth-aachen.de>
  1409. 0    beshort        0x76FF        squeezed data,
  1410. >4    string        x        original name %s
  1411. 0    beshort        0x76FE        crunched data,
  1412. >2    string        x        original name %s
  1413. 0    beshort        0x76FD        LZH compressed data,
  1414. >2    string        x        original name %s
  1415.  
  1416. # Freeze
  1417. 0    string        \037\237    frozen file 2.1
  1418. 0    string        \037\236    frozen file 1.0 (or gzip 0.5)
  1419.  
  1420. # SCO compress -H (LZH)
  1421. 0    string        \037\240    SCO compress -H (LZH) data
  1422.  
  1423. # European GSM 06.10 is a provisional standard for full-rate speech
  1424. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  1425. # excitation/long term prediction) coding at 13 kbit/s.
  1426. #
  1427. # There's only a magic nibble (4 bits); that nibble repeats every 33
  1428. # bytes.  This isn't suited for use, but maybe we can use it someday.
  1429. #
  1430. # This will cause very short GSM files to be declared as data and
  1431. # mismatches to be declared as data too!
  1432. #0    byte&0xF0    0xd0        data
  1433. #>33    byte&0xF0    0xd0
  1434. #>66    byte&0xF0    0xd0
  1435. #>99    byte&0xF0    0xd0
  1436. #>132    byte&0xF0    0xd0        GSM 06.10 compressed audio
  1437.  
  1438. # bzip    a block-sorting file compressor
  1439. #    by Julian Seward <sewardj@cs.man.ac.uk> and others
  1440. #
  1441. 0    string        BZ        bzip compressed data
  1442. >2    byte        x        \b, version: %c
  1443. >3    string        =1        \b, compression block size 100k
  1444. >3    string        =2        \b, compression block size 200k
  1445. >3    string        =3        \b, compression block size 300k
  1446. >3    string        =4        \b, compression block size 400k
  1447. >3    string        =5        \b, compression block size 500k
  1448. >3    string        =6        \b, compression block size 600k
  1449. >3    string        =7        \b, compression block size 700k
  1450. >3    string        =8        \b, compression block size 800k
  1451. >3    string        =9        \b, compression block size 900k
  1452.  
  1453. # lzop from <markus.oberhumer@jk.uni-linz.ac.at>
  1454. 0    string        \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a    lzop compressed data
  1455. >9    beshort        <0x0940
  1456. >>9    byte&0xf0    =0x00        - version 0.
  1457. >>9    beshort&0x0fff    x        \b%03x,
  1458. >>13    byte        1        LZO1X-1,
  1459. >>13    byte        2        LZO1X-1(15),
  1460. >>13    byte        3        LZO1X-999,
  1461. ## >>22    bedate        >0        last modified: %s,
  1462. >>14    byte        =0x00        os: MS-DOS
  1463. >>14    byte        =0x01        os: Amiga
  1464. >>14    byte        =0x02        os: VMS
  1465. >>14    byte        =0x03        os: Unix
  1466. >>14    byte        =0x05        os: Atari
  1467. >>14    byte        =0x06        os: OS/2
  1468. >>14    byte        =0x07        os: MacOS
  1469. >>14    byte        =0x0A        os: Tops/20
  1470. >>14    byte        =0x0B        os: WinNT
  1471. >>14    byte        =0x0E        os: Win32
  1472. >9    beshort        >0x0939
  1473. >>9    byte&0xf0    =0x00        - version 0.
  1474. >>9    byte&0xf0    =0x10        - version 1.
  1475. >>9    byte&0xf0    =0x20        - version 2.
  1476. >>9    beshort&0x0fff    x        \b%03x,
  1477. >>15    byte        1        LZO1X-1,
  1478. >>15    byte        2        LZO1X-1(15),
  1479. >>15    byte        3        LZO1X-999,
  1480. ## >>25    bedate        >0        last modified: %s,
  1481. >>17    byte        =0x00        os: MS-DOS
  1482. >>17    byte        =0x01        os: Amiga
  1483. >>17    byte        =0x02        os: VMS
  1484. >>17    byte        =0x03        os: Unix
  1485. >>17    byte        =0x05        os: Atari
  1486. >>17    byte        =0x06        os: OS/2
  1487. >>17    byte        =0x07        os: MacOS
  1488. >>17    byte        =0x0A        os: Tops/20
  1489. >>17    byte        =0x0B        os: WinNT
  1490. >>17    byte        =0x0E        os: Win32
  1491.  
  1492. # 4.3BSD-Quasijarus Strong Compression
  1493. # http://minnie.tuhs.org/Quasijarus/compress.html
  1494. 0    string        \037\241    Quasijarus strong compressed data
  1495. #------------------------------------------------------------------------------
  1496. # Console game magic
  1497. # Toby Deshane <hac@shoelace.digivill.net>
  1498. #    ines:  file(1) magic for Marat's iNES Nintendo Entertainment System
  1499. #           ROM dump format
  1500.  
  1501. 0 string NES\032 iNES ROM dump,
  1502. >4 byte  x     %dx16k PRG
  1503. >5 byte  x     \b, %dx8k CHR
  1504. >6 byte&0x01  =0x1  \b, [Vert.]
  1505. >6 byte&0x01  =0x0  \b, [Horiz.]
  1506. >6 byte&0x02  =0x2  \b, [SRAM]
  1507. >6 byte&0x04  =0x4  \b, [Trainer]
  1508. >6 byte&0x04  =0x8  \b, [4-Scr]
  1509.  
  1510. #------------------------------------------------------------------------------
  1511. # gameboy:  file(1) magic for the Nintendo (Color) Gameboy raw ROM format
  1512. #
  1513. 0x104 belong 0xCEED6666 Gameboy ROM:
  1514. >0x134 string >\0 "%.16s"
  1515. >0x146 byte 0x03  \b,[SGB]
  1516. >0x147 byte 0x00  \b, [ROM ONLY]
  1517. >0x147 byte 0x01  \b, [ROM+MBC1]
  1518. >0x147 byte 0x02  \b, [ROM+MBC1+RAM]
  1519. >0x147 byte 0x03  \b, [ROM+MBC1+RAM+BATT]
  1520. >0x147 byte 0x05  \b, [ROM+MBC2]
  1521. >0x147 byte 0x06  \b, [ROM+MBC2+BATTERY]
  1522. >0x147 byte 0x08  \b, [ROM+RAM]
  1523. >0x147 byte 0x09  \b, [ROM+RAM+BATTERY]
  1524. >0x147 byte 0x0B  \b, [ROM+MMM01]
  1525. >0x147 byte 0x0C  \b, [ROM+MMM01+SRAM]
  1526. >0x147 byte 0x0D  \b, [ROM+MMM01+SRAM+BATT]
  1527. >0x147 byte 0x0F  \b, [ROM+MBC3+TIMER+BATT]
  1528. >0x147 byte 0x10  \b, [ROM+MBC3+TIMER+RAM+BATT]
  1529. >0x147 byte 0x11  \b, [ROM+MBC3]
  1530. >0x147 byte 0x12  \b, [ROM+MBC3+RAM]
  1531. >0x147 byte 0x13  \b, [ROM+MBC3+RAM+BATT]
  1532. >0x147 byte 0x19  \b, [ROM+MBC5]
  1533. >0x147 byte 0x1A  \b, [ROM+MBC5+RAM]
  1534. >0x147 byte 0x1B  \b, [ROM+MBC5+RAM+BATT]
  1535. >0x147 byte 0x1C  \b, [ROM+MBC5+RUMBLE]
  1536. >0x147 byte 0x1D  \b, [ROM+MBC5+RUMBLE+SRAM]
  1537. >0x147 byte 0x1E  \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
  1538. >0x147 byte 0x1F  \b, [Pocket Camera]
  1539. >0x147 byte 0xFD  \b, [Bandai TAMA5]
  1540. >0x147 byte 0xFE  \b, [Hudson HuC-3]
  1541. >0x147 byte 0xFF  \b, [Hudson HuC-1]
  1542.  
  1543. >0x148 byte 0     \b, ROM: 256Kbit
  1544. >0x148 byte 1     \b, ROM: 512Kbit
  1545. >0x148 byte 2     \b, ROM: 1Mbit
  1546. >0x148 byte 3     \b, ROM: 2Mbit
  1547. >0x148 byte 4     \b, ROM: 4Mbit
  1548. >0x148 byte 5     \b, ROM: 8Mbit
  1549. >0x148 byte 6     \b, ROM: 16Mbit
  1550. >0x148 byte 0x52  \b, ROM: 9Mbit
  1551. >0x148 byte 0x53  \b, ROM: 10Mbit
  1552. >0x148 byte 0x54  \b, ROM: 12Mbit
  1553.  
  1554. >0x149 byte 1     \b, RAM: 16Kbit
  1555. >0x149 byte 2     \b, RAM: 64Kbit
  1556. >0x149 byte 3     \b, RAM: 128Kbit
  1557. >0x149 byte 4     \b, RAM: 1Mbit
  1558.  
  1559. #>0x14e long  x     \b, CRC: %x
  1560.  
  1561. #------------------------------------------------------------------------------
  1562. # genesis:  file(1) magic for the Sega MegaDrive/Genesis raw ROM format
  1563. #
  1564. 0x100 string SEGA  Sega MegaDrive/Genesis raw ROM dump
  1565. >0x120 string >\0 Name: "%.16s"
  1566. >0x110 string >\0 %.16s
  1567. >0x1B0 string RA with SRAM
  1568.  
  1569. #------------------------------------------------------------------------------
  1570. # genesis:  file(1) magic for the Super MegaDrive ROM dump format
  1571. #
  1572. 0x280 string EAGN  Super MagicDrive ROM dump
  1573. >0 byte x %dx16k blocks
  1574. >2 byte 0 \b, last in series or standalone
  1575. >2 byte >0 \b, split ROM
  1576. >8 byte 0xAA
  1577. >9 byte 0xBB
  1578.  
  1579. #------------------------------------------------------------------------------
  1580. # genesis:  file(1) alternate magic for the Super MegaDrive ROM dump format
  1581. #
  1582. 0x280 string EAMG  Super MagicDrive ROM dump
  1583. >0 byte x %dx16k blocks
  1584. >2 byte x \b, last in series or standalone
  1585. >8 byte 0xAA
  1586. >9 byte 0xBB
  1587.  
  1588. #------------------------------------------------------------------------------
  1589. # smsgg:  file(1) magic for Sega Master System and Game Gear ROM dumps
  1590. #
  1591. # Does not detect all images.  Very preliminary guesswork.  Need more data
  1592. # on format.
  1593. #
  1594. # FIXME: need a little more info...;P
  1595. #
  1596. #0 byte 0xF3
  1597. #>1 byte 0xED  Sega Master System/Game Gear ROM dump
  1598. #>1 byte 0x31  Sega Master System/Game Gear ROM dump
  1599. #>1 byte 0xDB  Sega Master System/Game Gear ROM dump
  1600. #>1 byte 0xAF  Sega Master System/Game Gear ROM dump
  1601. #>1 byte 0xC3  Sega Master System/Game Gear ROM dump
  1602.  
  1603. #------------------------------------------------------------------------------
  1604. # dreamcast:  file(1) uncertain magic for the Sega Dreamcast VMU image format
  1605. #
  1606. 0 belong 0x21068028   Sega Dreamcast VMU game image
  1607. 0 string LCDi         Dream Animator file
  1608.  
  1609. #------------------------------------------------------------------------------
  1610. # v64: file(1) uncertain magic for the V64 format N64 ROM dumps
  1611. #
  1612. 0 belong 0x37804012    V64 Nintendo 64 ROM dump
  1613.  
  1614. #------------------------------------------------------------------------------
  1615. # msx: file(1) magic for MSX game cartridge dumps
  1616. 0 beshort 0x4142 MSX game cartridge dump 
  1617. #------------------------------------------------------------------------------
  1618. # convex:  file(1) magic for Convex boxes
  1619. #
  1620. # Convexes are big-endian.
  1621. #
  1622. # /*\
  1623. #  * Below are the magic numbers and tests added for Convex.
  1624. #  * Added at beginning, because they are expected to be used most.
  1625. # \*/
  1626. 0    belong    0507    Convex old-style object
  1627. >16    belong    >0    not stripped
  1628. 0    belong    0513    Convex old-style demand paged executable
  1629. >16    belong    >0    not stripped
  1630. 0    belong    0515    Convex old-style pre-paged executable
  1631. >16    belong    >0    not stripped
  1632. 0    belong    0517    Convex old-style pre-paged, non-swapped executable
  1633. >16    belong    >0    not stripped
  1634. 0    belong    0x011257    Core file
  1635. #
  1636. # The following are a series of dump format magic numbers.  Each one
  1637. # corresponds to a drastically different dump format.  The first on is
  1638. # the original dump format on a 4.1 BSD or earlier file system.  The
  1639. # second marks the change between the 4.1 file system and the 4.2 file
  1640. # system.  The Third marks the changing of the block size from 1K
  1641. # to 2K to be compatible with an IDC file system.  The fourth indicates
  1642. # a dump that is dependent on Convex Storage Manager, because data in
  1643. # secondary storage is not physically contained within the dump.
  1644. # The restore program uses these number to determine how the data is
  1645. # to be extracted.
  1646. #
  1647. 24    belong    =60011    dump format, 4.1 BSD or earlier
  1648. 24    belong    =60012    dump format, 4.2 or 4.3 BSD without IDC
  1649. 24    belong    =60013    dump format, 4.2 or 4.3 BSD (IDC compatible)
  1650. 24    belong    =60014    dump format, Convex Storage Manager by-reference dump
  1651. #
  1652. # what follows is a bunch of bit-mask checks on the flags field of the opthdr.
  1653. # If there is no `=' sign, assume just checking for whether the bit is set?
  1654. #
  1655. 0    belong    0601        Convex SOFF
  1656. >88    belong&0x000f0000    =0x00000000    c1
  1657. >88    belong            &0x00010000    c2
  1658. >88    belong            &0x00020000    c2mp
  1659. >88    belong            &0x00040000    parallel
  1660. >88    belong            &0x00080000    intrinsic
  1661. >88    belong            &0x00000001    demand paged
  1662. >88    belong            &0x00000002    pre-paged
  1663. >88    belong            &0x00000004    non-swapped
  1664. >88    belong            &0x00000008    POSIX
  1665. #
  1666. >84    belong            &0x80000000    executable
  1667. >84    belong            &0x40000000    object
  1668. >84    belong&0x20000000    =0        not stripped
  1669. >84    belong&0x18000000    =0x00000000    native fpmode
  1670. >84    belong&0x18000000    =0x10000000    ieee fpmode
  1671. >84    belong&0x18000000    =0x18000000    undefined fpmode
  1672. #
  1673. 0    belong            0605        Convex SOFF core
  1674. #
  1675. 0    belong            0607        Convex SOFF checkpoint
  1676. >88    belong&0x000f0000    =0x00000000    c1
  1677. >88    belong            &0x00010000    c2
  1678. >88    belong            &0x00020000    c2mp
  1679. >88    belong            &0x00040000    parallel
  1680. >88    belong            &0x00080000    intrinsic
  1681. >88    belong            &0x00000008    POSIX
  1682. #
  1683. >84    belong&0x18000000    =0x00000000    native fpmode
  1684. >84    belong&0x18000000    =0x10000000    ieee fpmode
  1685. >84    belong&0x18000000    =0x18000000    undefined fpmode
  1686.  
  1687. # ----------------------------------------------------------------------------
  1688. # ctags:  file (1) magic for Exuberant Ctags files
  1689. # From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
  1690. 0       string  !_TAG   Exuberant Ctags tag file
  1691. #------------------------------------------------------------------------------
  1692. # file(1) magic for cvs(1) files
  1693. # From Hendrik Scholz <hendrik@scholz.net>
  1694.  
  1695. 0   string /1\ :pserver:    cvs password text file
  1696.  
  1697.  
  1698. #------------------------------------------------------------------------------
  1699. # database:  file(1) magic for various databases
  1700. #
  1701. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  1702. #
  1703. #
  1704. # GDBM magic numbers
  1705. #  Will be maintained as part of the GDBM distribution in the future.
  1706. #  <downsj@teeny.org>
  1707. 0    belong    0x13579ace    GNU dbm 1.x or ndbm database, big endian
  1708. 0    lelong    0x13579ace    GNU dbm 1.x or ndbm database, little endian
  1709. 0    string    GDBM        GNU dbm 2.x database
  1710. #
  1711. # Berkeley DB
  1712. #
  1713. # Ian Darwin's file /etc/magic files: big/little-endian version.
  1714. #
  1715. # Hash 1.85/1.86 databases store metadata in network byte order.
  1716. # Btree 1.85/1.86 databases store the metadata in host byte order.
  1717. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  1718.  
  1719. 0    long    0x00061561    Berkeley DB
  1720. >8    belong    4321
  1721. >>4    belong    >2        1.86
  1722. >>4    belong    <3        1.85
  1723. >>4    belong    >0        (Hash, version %d, native byte-order)
  1724. >8    belong    1234
  1725. >>4    belong    >2        1.86
  1726. >>4    belong    <3        1.85
  1727. >>4    belong    >0        (Hash, version %d, little-endian)
  1728.  
  1729. 0    belong    0x00061561    Berkeley DB
  1730. >8    belong    4321
  1731. >>4    belong    >2        1.86
  1732. >>4    belong    <3        1.85
  1733. >>4    belong    >0        (Hash, version %d, big-endian)
  1734. >8    belong    1234
  1735. >>4    belong    >2        1.86
  1736. >>4    belong    <3        1.85
  1737. >>4    belong    >0        (Hash, version %d, native byte-order)
  1738.  
  1739. 0    long    0x00053162    Berkeley DB 1.85/1.86
  1740. >4    long    >0        (Btree, version %d, native byte-order)
  1741. 0    belong    0x00053162    Berkeley DB 1.85/1.86
  1742. >4    belong    >0        (Btree, version %d, big-endian)
  1743. 0    lelong    0x00053162    Berkeley DB 1.85/1.86
  1744. >4    lelong    >0        (Btree, version %d, little-endian)
  1745.  
  1746. 12    long    0x00061561    Berkeley DB
  1747. >16    long    >0        (Hash, version %d, native byte-order)
  1748. 12    belong    0x00061561    Berkeley DB
  1749. >16    belong    >0        (Hash, version %d, big-endian)
  1750. 12    lelong    0x00061561    Berkeley DB
  1751. >16    lelong    >0        (Hash, version %d, little-endian)
  1752.  
  1753. 12    long    0x00053162    Berkeley DB
  1754. >16    long    >0        (Btree, version %d, native byte-order)
  1755. 12    belong    0x00053162    Berkeley DB
  1756. >16    belong    >0        (Btree, version %d, big-endian)
  1757. 12    lelong    0x00053162    Berkeley DB
  1758. >16    lelong    >0        (Btree, version %d, little-endian)
  1759.  
  1760. 12    long    0x00042253    Berkeley DB
  1761. >16    long    >0        (Queue, version %d, native byte-order)
  1762. 12    belong    0x00042253    Berkeley DB
  1763. >16    belong    >0        (Queue, version %d, big-endian)
  1764. 12    lelong    0x00042253    Berkeley DB
  1765. >16    lelong    >0        (Queue, version %d, little-endian)
  1766. #
  1767. #
  1768. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  1769. 0    string    RRD        RRDTool DB
  1770. >4    string    x        version %s
  1771. #----------------------------------------------------------------------
  1772. # ROOT: file(1) magic for ROOT databases
  1773. #
  1774. 0       string  root\0  ROOT file
  1775. >4      belong  x       Version %d
  1776. >33     belong  x       (Compression: %d)
  1777.  
  1778. #------------------------------------------------------------------------------
  1779. # diamond:  file(1) magic for Diamond system
  1780. #
  1781. # ... diamond is a multi-media mail and electronic conferencing system....
  1782. #
  1783. # XXX - I think it was either renamed Slate, or replaced by Slate....
  1784. #
  1785. #    The full deal is too long...
  1786. #0    string    <list>\n<protocol\ bbn-multimedia-format>    Diamond Multimedia Document
  1787. 0    string    =<list>\n<protocol\ bbn-m    Diamond Multimedia Document
  1788.  
  1789. #------------------------------------------------------------------------------
  1790. # diff:  file(1) magic for diff(1) output
  1791. #
  1792. 0    string        diff\     'diff' output text
  1793. 0    string        ***\         'diff' output text
  1794. 0    string        Only\ in\     'diff' output text
  1795. 0    string        Common\ subdirectories:\     'diff' output text
  1796.  
  1797. # xdelta is like diff(1) for binary files (works for text, too).
  1798. # Available from: ftp://ftp.xcf.berkeley.edu/pub/xdelta/
  1799. 0       string          %XDZ            xdelta diff file
  1800. >4      string          >%              version %.3s
  1801. #  Digital UNIX - Info
  1802. #
  1803. 0    string    !<arch>\n________64E    Alpha archive
  1804. >22    string    X            -- out of date
  1805. #
  1806. # Alpha COFF Based Executables
  1807. # The stripped stuff really needs to be an 8 byte (64 bit) compare,
  1808. # but this works
  1809. 0    leshort        0x183        COFF format alpha
  1810. >22    leshort&020000    &010000        sharable library,
  1811. >22    leshort&020000    ^010000        dynamically linked,
  1812. >24    leshort        0410        pure
  1813. >24    leshort        0413        demand paged
  1814. >8    lelong        >0        executable or object module, not stripped
  1815. >8    lelong        0
  1816. >>12    lelong        0        executable or object module, stripped
  1817. >>12    lelong        >0        executable or object module, not stripped
  1818. >27     byte            >0              - version %d.
  1819. >26     byte            >0              %d-
  1820. >28     leshort         >0              %d
  1821. #
  1822. # The next is incomplete, we could tell more about this format,
  1823. # but its not worth it.
  1824. 0    leshort        0x188    Alpha compressed COFF
  1825. 0    leshort        0x18f    Alpha u-code object
  1826. #
  1827. #
  1828. # Some other interesting Digital formats,
  1829. 0    string    \377\377\177        ddis/ddif
  1830. 0    string    \377\377\174        ddis/dots archive
  1831. 0    string    \377\377\176        ddis/dtif table data
  1832. 0    string    \033c\033        LN03 output
  1833. 0    long    04553207        X image
  1834. #
  1835. 0    string    !<PDF>!\n        profiling data file
  1836. #
  1837. # Locale data tables (MIPS and Alpha).
  1838. #
  1839. 0    short        0x0501        locale data table
  1840. >6    short        0x24        for MIPS
  1841. >6    short        0x40        for Alpha
  1842. # ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
  1843. # from http://www.atsc.org/standards/a_52a.pdf
  1844. # corrections, additions, etc. are always welcome!
  1845. #
  1846. # syncword
  1847. 0       beshort         0x0b77  ATSC A/52 aka AC-3 aka Dolby Digital stream,
  1848. # fscod
  1849. >4      byte&0xc0       0x00    48 kHz,
  1850. >4      byte&0xc0       0x40    44.1 kHz,
  1851. >4      byte&0xc0       0x80    32 kHz,
  1852. # is this one used for 96 kHz?
  1853. >4      byte&0xc0       0xc0    reserved frequency,
  1854. #
  1855. >5    byte&7 = 0        \b, complete main (CM)
  1856. >5    byte&7 = 1        \b, music and effects (ME)
  1857. >5    byte&7 = 2        \b, visually impaired (VI)
  1858. >5    byte&7 = 3        \b, hearing impaired (HI)
  1859. >5    byte&7 = 4        \b, dialogue (D)
  1860. >5    byte&7 = 5        \b, commentary (C)
  1861. >5    byte&7 = 6        \b, emergency (E)
  1862. # acmod
  1863. >6      byte&0xe0       0x00    1+1 front,
  1864. >6      byte&0xe0       0x20    1 front/0 rear,
  1865. >6      byte&0xe0       0x40    2 front/0 rear,
  1866. >6      byte&0xe0       0x60    3 front/0 rear,
  1867. >6      byte&0xe0       0x80    2 front/1 rear,
  1868. >6      byte&0xe0       0xa0    3 front/1 rear,
  1869. >6      byte&0xe0       0xc0    2 front/2 rear,
  1870. >6      byte&0xe0       0xe0    3 front/2 rear,
  1871. # lfeon (these may be incorrect)
  1872. >7      byte&0x40       0x00    LFE off,
  1873. >7      byte&0x40       0x40    LFE on,
  1874. #
  1875. >4    byte&0x3e = 0x00    \b, 32 kbit/s
  1876. >4    byte&0x3e = 0x02        \b, 40 kbit/s
  1877. >4    byte&0x3e = 0x04        \b, 48 kbit/s
  1878. >4    byte&0x3e = 0x06        \b, 56 kbit/s
  1879. >4    byte&0x3e = 0x08        \b, 64 kbit/s
  1880. >4    byte&0x3e = 0x0a        \b, 80 kbit/s
  1881. >4    byte&0x3e = 0x0c        \b, 96 kbit/s
  1882. >4    byte&0x3e = 0x0e        \b, 112 kbit/s
  1883. >4    byte&0x3e = 0x10        \b, 128 kbit/s
  1884. >4    byte&0x3e = 0x12        \b, 160 kbit/s
  1885. >4    byte&0x3e = 0x14        \b, 192 kbit/s
  1886. >4    byte&0x3e = 0x16        \b, 224 kbit/s
  1887. >4    byte&0x3e = 0x18        \b, 256 kbit/s
  1888. >4    byte&0x3e = 0x1a        \b, 320 kbit/s
  1889. >4    byte&0x3e = 0x1c        \b, 384 kbit/s
  1890. >4    byte&0x3e = 0x1e        \b, 448 kbit/s
  1891. >4    byte&0x3e = 0x20        \b, 512 kbit/s
  1892. >4    byte&0x3e = 0x22        \b, 576 kbit/s
  1893. >4    byte&0x3e = 0x24        \b, 640 kbit/s
  1894. # dsurmod (these may be incorrect)
  1895. >6      beshort&0x0180  0x0000  Dolby Surround not indicated
  1896. >6      beshort&0x0180  0x0080  not Dolby Surround encoded
  1897. >6      beshort&0x0180  0x0100  Dolby Surround encoded
  1898. >6      beshort&0x0180  0x0180  reserved Dolby Surround mode
  1899.  
  1900. #------------------------------------------------------------------------------
  1901. # dump:  file(1) magic for dump file format--for new and old dump filesystems
  1902. #
  1903. # We specify both byte orders in order to recognize byte-swapped dumps.
  1904. #
  1905. 24    belong    60012        new-fs dump file (big endian),
  1906. >4    bedate    x        Previous dump %s,
  1907. >8    bedate    x        This dump %s,
  1908. >12    belong    >0        Volume %ld,
  1909. >692    belong    0        Level zero, type:
  1910. >692    belong    >0        Level %d, type:
  1911. >0    belong    1        tape header,
  1912. >0    belong    2        beginning of file record,
  1913. >0    belong    3        map of inodes on tape,
  1914. >0    belong    4        continuation of file record,
  1915. >0    belong    5        end of volume,
  1916. >0    belong    6        map of inodes deleted,
  1917. >0    belong    7        end of medium (for floppy),
  1918. >676    string    >\0        Label %s,
  1919. >696    string    >\0        Filesystem %s,
  1920. >760    string    >\0        Device %s,
  1921. >824    string    >\0        Host %s,
  1922. >888    belong    >0        Flags %x
  1923.  
  1924. 24    belong    60011        old-fs dump file (big endian),
  1925. #>4    bedate    x        Previous dump %s,
  1926. #>8    bedate    x        This dump %s,
  1927. >12    belong    >0        Volume %ld,
  1928. >692    belong    0        Level zero, type:
  1929. >692    belong    >0        Level %d, type:
  1930. >0    belong    1        tape header,
  1931. >0    belong    2        beginning of file record,
  1932. >0    belong    3        map of inodes on tape,
  1933. >0    belong    4        continuation of file record,
  1934. >0    belong    5        end of volume,
  1935. >0    belong    6        map of inodes deleted,
  1936. >0    belong    7        end of medium (for floppy),
  1937. >676    string    >\0        Label %s,
  1938. >696    string    >\0        Filesystem %s,
  1939. >760    string    >\0        Device %s,
  1940. >824    string    >\0        Host %s,
  1941. >888    belong    >0        Flags %x
  1942.  
  1943. 24    lelong    60012        new-fs dump file (little endian),
  1944. >4    ledate    x        This dump %s,
  1945. >8    ledate    x        Previous dump %s,
  1946. >12    lelong    >0        Volume %ld,
  1947. >692    lelong    0        Level zero, type:
  1948. >692    lelong    >0        Level %d, type:
  1949. >0    lelong    1        tape header,
  1950. >0    lelong    2        beginning of file record,
  1951. >0    lelong    3        map of inodes on tape,
  1952. >0    lelong    4        continuation of file record,
  1953. >0    lelong    5        end of volume,
  1954. >0    lelong    6        map of inodes deleted,
  1955. >0    lelong    7        end of medium (for floppy),
  1956. >676    string    >\0        Label %s,
  1957. >696    string    >\0        Filesystem %s,
  1958. >760    string    >\0        Device %s,
  1959. >824    string    >\0        Host %s,
  1960. >888    lelong    >0        Flags %x
  1961.  
  1962. 24    lelong    60011        old-fs dump file (little endian),
  1963. #>4    ledate    x        Previous dump %s,
  1964. #>8    ledate    x        This dump %s,
  1965. >12    lelong    >0        Volume %ld,
  1966. >692    lelong    0        Level zero, type:
  1967. >692    lelong    >0        Level %d, type:
  1968. >0    lelong    1        tape header,
  1969. >0    lelong    2        beginning of file record,
  1970. >0    lelong    3        map of inodes on tape,
  1971. >0    lelong    4        continuation of file record,
  1972. >0    lelong    5        end of volume,
  1973. >0    lelong    6        map of inodes deleted,
  1974. >0    lelong    7        end of medium (for floppy),
  1975. >676    string    >\0        Label %s,
  1976. >696    string    >\0        Filesystem %s,
  1977. >760    string    >\0        Device %s,
  1978. >824    string    >\0        Host %s,
  1979. >888    lelong    >0        Flags %x
  1980.  
  1981. #------------------------------------------------------------------------------
  1982. # Dyadic: file(1) magic for Dyalog APL.
  1983. #
  1984. 0     byte    0xaa
  1985. >1    byte    <4        Dyalog APL
  1986. >>1    byte    0x00        incomplete workspace
  1987. >>1    byte    0x01        component file
  1988. >>1    byte    0x02        external variable
  1989. >>1    byte    0x03        workspace
  1990. >>2    byte    x        version %d
  1991. >>3    byte    x        .%d
  1992.  
  1993. #------------------------------------------------------------------------------
  1994. # T602 editor documents 
  1995. # by David Necas <yeti@physics.muni.cz>
  1996. 0    string    @CT\     T602 document data,
  1997. >4    string    0    Kamenicky
  1998. >4    string    1    CP 852
  1999. >4    string    2    KOI8-CS
  2000. >4    string    >2    unknown encoding
  2001.  
  2002. # Vi IMproved Encrypted file 
  2003. # by David Necas <yeti@physics.muni.cz>
  2004. 0    string    VimCrypt~    Vim encrypted file data
  2005.  
  2006. #------------------------------------------------------------------------------
  2007. # elf:  file(1) magic for ELF executables
  2008. #
  2009. # We have to check the byte order flag to see what byte order all the
  2010. # other stuff in the header is in.
  2011. #
  2012. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  2013. #
  2014. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  2015. 0    string        \177ELF        ELF
  2016. >4    byte        0        invalid class
  2017. >4    byte        1        32-bit
  2018. # only for MIPS - in the future, the ABI field of e_flags should be used.
  2019. >>18    beshort        8
  2020. >>18    beshort        10
  2021. >>>36   belong          &0x20           N32
  2022. >4    byte        2        64-bit
  2023. >5    byte        0        invalid byte order
  2024. >5    byte        1        LSB
  2025. # The official e_machine number for MIPS is now #8, regardless of endianness.
  2026. # The second number (#10) will be deprecated later. For now, we still
  2027. # say something if #10 is encountered, but only gory details for #8.
  2028. >>18    leshort        8
  2029. # only for 32-bit
  2030. >>>4    byte        1
  2031. >>>>36  lelong&0xf0000000    0x00000000    MIPS-I
  2032. >>>>36  lelong&0xf0000000    0x10000000    MIPS-II
  2033. >>>>36  lelong&0xf0000000    0x20000000    MIPS-III
  2034. >>>>36  lelong&0xf0000000    0x30000000    MIPS-IV
  2035. >>>>36  lelong&0xf0000000    0x40000000    MIPS-V
  2036. >>>>36  lelong&0xf0000000    0x60000000    MIPS32
  2037. >>>>36  lelong&0xf0000000    0x70000000    MIPS64
  2038. >>>>36  lelong&0xf0000000    0x80000000    MIPS32 rel2
  2039. >>>>36  lelong&0xf0000000    0x90000000    MIPS64 rel2
  2040. # only for 64-bit
  2041. >>>4    byte        2
  2042. >>>>48  lelong&0xf0000000    0x00000000    MIPS-I
  2043. >>>>48  lelong&0xf0000000    0x10000000    MIPS-II
  2044. >>>>48  lelong&0xf0000000    0x20000000    MIPS-III
  2045. >>>>48  lelong&0xf0000000    0x30000000    MIPS-IV
  2046. >>>>48  lelong&0xf0000000    0x40000000    MIPS-V
  2047. >>>>48  lelong&0xf0000000    0x60000000    MIPS32
  2048. >>>>48  lelong&0xf0000000    0x70000000    MIPS64 
  2049. >>>>48  lelong&0xf0000000    0x80000000    MIPS32 rel2
  2050. >>>>48  lelong&0xf0000000    0x90000000    MIPS64 rel2
  2051. >>16    leshort        0        no file type,
  2052. >>16    leshort        1        relocatable,
  2053. >>16    leshort        2        executable,
  2054. >>16    leshort        3        shared object,
  2055. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  2056. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  2057. >>16    leshort        4        core file
  2058. # Core file detection is not reliable.
  2059. #>>>(0x38+0xcc) string    >\0        of '%s'
  2060. #>>>(0x38+0x10) lelong    >0        (signal %d),
  2061. >>16    leshort        &0xff00        processor-specific,
  2062. >>18    leshort        0        no machine,
  2063. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  2064. >>18    leshort        2        SPARC - invalid byte order,
  2065. >>18    leshort        3        Intel 80386,
  2066. >>18    leshort        4        Motorola
  2067. >>>36    lelong        &0x01000000    68000 - invalid byte order,
  2068. >>>36    lelong        &0x00810000    CPU32 - invalid byte order,
  2069. >>>36    lelong        0        68020 - invalid byte order,
  2070. >>18    leshort        5        Motorola 88000 - invalid byte order,
  2071. >>18    leshort        6        Intel 80486,
  2072. >>18    leshort        7        Intel 80860,
  2073. >>18    leshort        8        MIPS,
  2074. >>18    leshort        9        Amdahl - invalid byte order,
  2075. >>18    leshort        10        MIPS (deprecated),
  2076. >>18    leshort        11        RS6000 - invalid byte order,
  2077. >>18    leshort        15        PA-RISC - invalid byte order,
  2078. >>>50    leshort        0x0214        2.0
  2079. >>>48    leshort        &0x0008        (LP64),
  2080. >>18    leshort        16        nCUBE,
  2081. >>18    leshort        17        Fujitsu VPP500,
  2082. >>18    leshort        18        SPARC32PLUS,
  2083. >>18    leshort        20        PowerPC,
  2084. >>18    leshort        36        NEC V800,
  2085. >>18    leshort        37        Fujitsu FR20,
  2086. >>18    leshort        38        TRW RH-32,
  2087. >>18    leshort        39        Motorola RCE,
  2088. >>18    leshort        40        ARM,
  2089. >>18    leshort        41        Alpha,
  2090. >>18    leshort        42        Hitachi SH,
  2091. >>18    leshort        43        SPARC V9 - invalid byte order,
  2092. >>18    leshort        44        Siemens Tricore Embedded Processor,
  2093. >>18    leshort        45        Argonaut RISC Core, Argonaut Technologies Inc.,
  2094. >>18    leshort        46        Hitachi H8/300,
  2095. >>18    leshort        47        Hitachi H8/300H,
  2096. >>18    leshort        48        Hitachi H8S,
  2097. >>18    leshort        49        Hitachi H8/500,
  2098. >>18    leshort        50        IA-64,
  2099. >>18    leshort        51        Stanford MIPS-X,
  2100. >>18    leshort        52        Motorola Coldfire,
  2101. >>18    leshort        53        Motorola M68HC12,
  2102. >>18    leshort        62        AMD x86-64,
  2103. >>18    leshort        75        Digital VAX,
  2104. >>18    leshort        0x9026        Alpha (unofficial),
  2105. >>20    lelong        0        invalid version
  2106. >>20    lelong        1        version 1
  2107. >>36    lelong        1        MathCoPro/FPU/MAU Required
  2108. >5    byte        2        MSB
  2109. # only for MIPS - see comment in little-endian section above.
  2110. >>18    beshort        8
  2111. # only for 32-bit
  2112. >>>4    byte        1
  2113. >>>>36  belong&0xf0000000    0x00000000    MIPS-I
  2114. >>>>36  belong&0xf0000000    0x10000000    MIPS-II
  2115. >>>>36  belong&0xf0000000    0x20000000    MIPS-III
  2116. >>>>36  belong&0xf0000000    0x30000000    MIPS-IV
  2117. >>>>36  belong&0xf0000000    0x40000000    MIPS-V
  2118. >>>>36  belong&0xf0000000    0x60000000    MIPS32
  2119. >>>>36  belong&0xf0000000    0x70000000    MIPS64
  2120. >>>>36  belong&0xf0000000    0x80000000    MIPS32 rel2
  2121. >>>>36  belong&0xf0000000    0x90000000    MIPS64 rel2
  2122. # only for 64-bit
  2123. >>>4    byte        2
  2124. >>>>48    belong&0xf0000000    0x00000000    MIPS-I
  2125. >>>>48    belong&0xf0000000    0x10000000    MIPS-II
  2126. >>>>48    belong&0xf0000000    0x20000000    MIPS-III
  2127. >>>>48    belong&0xf0000000    0x30000000    MIPS-IV
  2128. >>>>48    belong&0xf0000000    0x40000000    MIPS-V
  2129. >>>>48    belong&0xf0000000    0x60000000    MIPS32
  2130. >>>>48    belong&0xf0000000    0x70000000    MIPS64 
  2131. >>>>48    belong&0xf0000000    0x80000000    MIPS32 rel2
  2132. >>>>48    belong&0xf0000000    0x90000000    MIPS64 rel2
  2133. >>16    beshort        0        no file type,
  2134. >>16    beshort        1        relocatable,
  2135. >>16    beshort        2        executable,
  2136. >>16    beshort        3        shared object,
  2137. >>16    beshort        4        core file,
  2138. #>>>(0x38+0xcc) string    >\0        of '%s'
  2139. #>>>(0x38+0x10) belong    >0        (signal %d),
  2140. >>16    beshort        &0xff00        processor-specific,
  2141. >>18    beshort        0        no machine,
  2142. >>18    beshort        1        AT&T WE32100,
  2143. >>18    beshort        2        SPARC,
  2144. >>18    beshort        3        Intel 80386 - invalid byte order,
  2145. >>18    beshort        4        Motorola
  2146. >>>36    belong        &0x01000000    68000,
  2147. >>>36    belong        &0x00810000    CPU32,
  2148. >>>36    belong        0        68020,
  2149. >>18    beshort        5        Motorola 88000,
  2150. >>18    beshort        6        Intel 80486 - invalid byte order,
  2151. >>18    beshort        7        Intel 80860,
  2152. >>18    beshort        8        MIPS,
  2153. >>18    beshort        9        Amdahl,
  2154. >>18    beshort        10        MIPS (deprecated),
  2155. >>18    beshort        11        RS6000,
  2156. >>18    beshort        15        PA-RISC
  2157. >>>50    beshort        0x0214        2.0
  2158. >>>48    beshort        &0x0008        (LP64)
  2159. >>18    beshort        16        nCUBE,
  2160. >>18    beshort        17        Fujitsu VPP500,
  2161. >>18    beshort        18        SPARC32PLUS,
  2162. >>>36    belong&0xffff00    &0x000100    V8+ Required,
  2163. >>>36    belong&0xffff00    &0x000200    Sun UltraSPARC1 Extensions Required,
  2164. >>>36    belong&0xffff00    &0x000400    HaL R1 Extensions Required,
  2165. >>>36    belong&0xffff00    &0x000800    Sun UltraSPARC3 Extensions Required,
  2166. >>18    beshort        20        PowerPC or cisco 4500,
  2167. >>18    beshort        21        cisco 7500,
  2168. >>18    beshort        24        cisco SVIP,
  2169. >>18    beshort        25        cisco 7200,
  2170. >>18    beshort        36        NEC V800 or cisco 12000,
  2171. >>18    beshort        37        Fujitsu FR20,
  2172. >>18    beshort        38        TRW RH-32,
  2173. >>18    beshort        39        Motorola RCE,
  2174. >>18    beshort        40        ARM,
  2175. >>18    beshort        41        Alpha,
  2176. >>18    beshort        42        Hitachi SH,
  2177. >>18    beshort        43        SPARC V9,
  2178. >>18    beshort        44        Siemens Tricore Embedded Processor,
  2179. >>18    beshort        45        Argonaut RISC Core, Argonaut Technologies Inc.,
  2180. >>18    beshort        46        Hitachi H8/300,
  2181. >>18    beshort        47        Hitachi H8/300H,
  2182. >>18    beshort        48        Hitachi H8S,
  2183. >>18    beshort        49        Hitachi H8/500,
  2184. >>18    beshort        50        IA-64,
  2185. >>18    beshort        51        Stanford MIPS-X,
  2186. >>18    beshort        52        Motorola Coldfire,
  2187. >>18    beshort        53        Motorola M68HC12,
  2188. >>18    beshort        73        Cray NV1,
  2189. >>18    beshort        75        Digital VAX,
  2190. >>18    beshort        0x9026        Alpha (unofficial),
  2191. >>20    belong        0        invalid version
  2192. >>20    belong        1        version 1
  2193. >>36    belong        1        MathCoPro/FPU/MAU Required
  2194. >8    string        >\0        (%s)
  2195. >8    string        \0
  2196. >>7    byte        0        (SYSV)
  2197. >>7    byte        1        (HP-UX)
  2198. >>7    byte        2        (NetBSD)
  2199. >>7    byte        3        (GNU/Linux)
  2200. >>7    byte        4        (GNU/Hurd)
  2201. >>7    byte        5        (86Open)
  2202. >>7    byte        6        (Solaris)
  2203. >>7    byte        7        (Monterey)
  2204. >>7    byte        8        (IRIX)
  2205. >>7    byte        9        (FreeBSD)
  2206. >>7    byte        10        (Tru64)
  2207. >>7    byte        11        (Novell Modesto)
  2208. >>7    byte        12        (OpenBSD)
  2209. >>7    byte        97        (ARM)
  2210. >>7    byte        255        (embedded)
  2211.  
  2212. #------------------------------------------------------------------------------
  2213. # encore:  file(1) magic for Encore machines
  2214. #
  2215. # XXX - needs to have the byte order specified (NS32K was little-endian,
  2216. # dunno whether they run the 88K in little-endian mode or not).
  2217. #
  2218. 0    short        0x154        Encore
  2219. >20    short        0x107        executable
  2220. >20    short        0x108        pure executable
  2221. >20    short        0x10b        demand-paged executable
  2222. >20    short        0x10f        unsupported executable
  2223. >12    long        >0        not stripped
  2224. >22    short        >0        - version %ld
  2225. >22    short        0        -
  2226. #>4    date        x        stamp %s
  2227. 0    short        0x155        Encore unsupported executable
  2228. >12    long        >0        not stripped
  2229. >22    short        >0        - version %ld
  2230. >22    short        0        -
  2231. #>4    date        x        stamp %s
  2232.  
  2233. #------------------------------------------------------------------------------
  2234. # Epoc 32 : file(1) magic for Epoc Documents [psion/osaris
  2235. # Stefan Praszalowicz (hpicollo@worldnet.fr)
  2236. #0    lelong        0x10000037    Epoc32
  2237. >4    lelong        0x1000006D
  2238. >>8    lelong        0x1000007F    Word
  2239. >>8    lelong        0x10000088    Sheet
  2240. >>8    lelong        0x1000007D    Sketch
  2241. >>8    lelong        0x10000085    TextEd
  2242.  
  2243. #------------------------------------------------------------------------------
  2244. # filesystems:  file(1) magic for different filesystems
  2245. #
  2246. 0    string    \366\366\366\366    PC formatted floppy with no filesystem
  2247. # Sun disk labels
  2248. # From /usr/include/sun/dklabel.h:
  2249. 0774    beshort        0xdabe        Sun disk label
  2250. >0    string        x        '%s
  2251. >>31      string        >\0        \b%s
  2252. >>>63      string        >\0        \b%s
  2253. >>>>95     string        >\0        \b%s
  2254. >0    string        x        \b'
  2255. >0734    short        >0        %d rpm,
  2256. >0736    short        >0        %d phys cys,
  2257. >0740    short        >0        %d alts/cyl,
  2258. >0746    short        >0        %d interleave,
  2259. >0750    short        >0        %d data cyls,
  2260. >0752    short        >0        %d alt cyls,
  2261. >0754    short        >0        %d heads/partition,
  2262. >0756    short        >0        %d sectors/track,
  2263. >0764    long        >0        start cyl %ld,
  2264. >0770    long        x        %ld blocks
  2265. # Is there a boot block written 1 sector in?
  2266. >512    belong&077777777    0600407    \b, boot block present
  2267. 0x1FE    leshort    0xAA55            x86 boot sector
  2268. >2    string    OSBS            \b, OS/BS MBR
  2269. # J\xf6rg Jenderek <joerg@pcialias.localnet>
  2270. >0x8C    string    Invalid\ partition\ table    \b, MS-DOS MBR
  2271. >0x9D    string    Invalid\ partition\ table    \b, DR-DOS MBR, version 7.01 to 7.03
  2272. >0x10F    string    Ung\201ltige\ Partitionstabelle    \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
  2273. >0x8B    string    Ung\201ltige\ Partitionstabelle    \b, MS-DOS MBR, german version 5.00 to 4.00.950
  2274. >0x145    string    Default:\ F            \b, FREE-DOS MBR
  2275. >0    string    \0\0\0\0        \b, extended partition table
  2276. >0    leshort 0x3CEB            \b, system
  2277. >>3    string    >\0            %s
  2278. >>0x36    string    FAT            \b, %s
  2279. >>>0x39    string    12            (%s bit)
  2280. >>>0x39    string    16            (%s bit)
  2281. >0x52    string    FAT32            \b, FAT (32 bit)
  2282. >>>43    string        >NO\ NAME    label: %.11s,
  2283. >>>43    string        <NO\ NAME    label: %.11s,
  2284. >>>43    string        NO\ NAME    unlabeled,
  2285. >>>19    leshort        >0        %d sectors
  2286. >>>19    leshort        0        
  2287. >>>>32    lelong        x        %d sectors
  2288. >0x200    lelong    0x82564557        \b, BSD disklabel
  2289.  
  2290. # Solaris 7 FAT12 floppies J\xf6rg Jenderek <joerg@pcialias.localnet>
  2291. >0    leshort 0x7AEB            \b, system
  2292. >>3    string    >\0            %s
  2293. >>0x36    string    FAT            \b, %s
  2294. >>>0x39    string    12            (%s bit)
  2295.  
  2296. # Minix filesystems - Juan Cespedes <cespedes@debian.org>
  2297. 0x410    leshort        0x137f        Minix filesystem
  2298. 0x410    beshort        0x137f        Minix filesystem (big endian),
  2299. >0x402    beshort        !0        \b, %d zones
  2300. >0x1e    string        minix        \b, bootable
  2301. 0x410    leshort        0x138f        Minix filesystem, 30 char names
  2302. 0x410    leshort        0x2468        Minix filesystem, version 2
  2303. 0x410    leshort        0x2478        Minix filesystem, version 2, 30 char names
  2304.  
  2305. # romfs filesystems - Juan Cespedes <cespedes@debian.org>
  2306. 0    string        -rom1fs-\0    romfs filesystem, version 1
  2307. >8    belong    x            %d bytes,
  2308. >16    string    x            named %s.
  2309.  
  2310. # netboot image - Juan Cespedes <cespedes@debian.org>
  2311. 0    lelong        0x1b031336L    Netboot image,
  2312. >4    lelong&0xFFFFFF00    0
  2313. >>4    lelong&0x100    0x000        mode 2
  2314. >>4    lelong&0x100    0x100        mode 3
  2315. >4    lelong&0xFFFFFF00    !0    unknown mode
  2316.  
  2317. 0x18b    string    OS/2    OS/2 Boot Manager
  2318.  
  2319. 9564    lelong        0x00011954    Unix Fast File system (little-endian),
  2320. >8404    string        x        last mounted on %s,
  2321. #>9504    ledate        x        last checked at %s,
  2322. >8224    ledate        x        last written at %s,
  2323. >8401    byte        x        clean flag %d,
  2324. >8228    lelong        x        number of blocks %d,
  2325. >8232    lelong        x        number of data blocks %d,
  2326. >8236    lelong        x        number of cylinder groups %d,
  2327. >8240    lelong        x        block size %d,
  2328. >8244    lelong        x        fragment size %d,
  2329. >8252    lelong        x        minimum percentage of free blocks %d,
  2330. >8256    lelong        x        rotational delay %dms,
  2331. >8260    lelong        x        disk rotational speed %drps,
  2332. >8320    lelong        0        TIME optimization
  2333. >8320    lelong        1        SPACE optimization
  2334.  
  2335. 9564    belong        0x00011954    Unix Fast File system (big-endian),
  2336. >8404    string        x        last mounted on %s,
  2337. #>9504    bedate        x        last checked at %s,
  2338. >8224    bedate        x        last written at %s,
  2339. >8401    byte        x        clean flag %d,
  2340. >8228    belong        x        number of blocks %d,
  2341. >8232    belong        x        number of data blocks %d,
  2342. >8236    belong        x        number of cylinder groups %d,
  2343. >8240    belong        x        block size %d,
  2344. >8244    belong        x        fragment size %d,
  2345. >8252    belong        x        minimum percentage of free blocks %d,
  2346. >8256    belong        x        rotational delay %dms,
  2347. >8260    belong        x        disk rotational speed %drps,
  2348. >8320    belong        0        TIME optimization
  2349. >8320    belong        1        SPACE optimization
  2350.  
  2351. # ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
  2352. 0x438    leshort        0xEF53        Linux
  2353. >0x44c    lelong        x        rev %d
  2354. >0x43e    leshort        x        \b.%d
  2355. >0x45c    lelong        ^0x0000004    ext2 filesystem data
  2356. >>0x43a    leshort        ^0x0000001    (mounted or unclean)
  2357. >0x45c    lelong        &0x0000004    ext3 filesystem data
  2358. >>0x460    lelong        &0x0000004    (needs journal recovery)
  2359. >0x43a    leshort        &0x0000002    (errors)
  2360. >0x460    lelong        &0x0000001    (compressed)
  2361. #>0x460    lelong        &0x0000002    (filetype)
  2362. #>0x464    lelong        &0x0000001    (sparse_super)
  2363. >0x464    lelong        &0x0000002    (large files)
  2364.  
  2365. # SGI disk labels - Nathan Scott <nathans@debian.org>
  2366. 0    belong        0x0BE5A941    SGI disk label (volume header)
  2367.  
  2368. # SGI XFS filesystem - Nathan Scott <nathans@debian.org>
  2369. 0    belong        0x58465342    SGI XFS filesystem data
  2370. >0x4    belong        x        (blksz=3D%d,
  2371. >0x68    beshort        x        inosz=3D%d,
  2372. >0x64    beshort        ^0x2004        v1 dirs)
  2373. >0x64    beshort        &0x2004        v2 dirs)
  2374.  
  2375. ############################################################################
  2376. # Minix-ST kernel floppy
  2377. 0x800    belong        0x46fc2700    Atari-ST Minix kernel image
  2378. >19    string        \240\5\371\5\0\011\0\2\0    \b, 720k floppy
  2379. >19    string        \320\2\370\5\0\011\0\1\0    \b, 360k floppy
  2380.  
  2381. ############################################################################
  2382. # Hmmm, is this a better way of detecting _standard_ floppy images ?
  2383. 19    string        \320\2\360\3\0\011\0\1\0    DOS floppy 360k
  2384. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  2385. 19    string        \240\5\371\3\0\011\0\2\0    DOS floppy 720k
  2386. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  2387. 19    string        \100\013\360\011\0\022\0\2\0    DOS floppy 1440k
  2388. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  2389.  
  2390. 19    string        \240\5\371\5\0\011\0\2\0    DOS floppy 720k, IBM
  2391. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  2392. 19    string        \100\013\371\5\0\011\0\2\0    DOS floppy 1440k, mkdosfs
  2393. >0x1FE    leshort        0xAA55        \b, x86 hard disk boot sector
  2394.  
  2395. 19    string        \320\2\370\5\0\011\0\1\0    Atari-ST floppy 360k
  2396. 19    string        \240\5\371\5\0\011\0\2\0    Atari-ST floppy 720k
  2397.  
  2398. #  Valid media descriptor bytes for MS-DOS:
  2399. #
  2400. #     Byte   Capacity   Media Size and Type
  2401. #     -------------------------------------------------
  2402. #
  2403. #     F0     2.88 MB    3.5-inch, 2-sided, 36-sector
  2404. #     F0     1.44 MB    3.5-inch, 2-sided, 18-sector
  2405. #     F9     720K       3.5-inch, 2-sided, 9-sector
  2406. #     F9     1.2 MB     5.25-inch, 2-sided, 15-sector
  2407. #     FD     360K       5.25-inch, 2-sided, 9-sector
  2408. #     FF     320K       5.25-inch, 2-sided, 8-sector
  2409. #     FC     180K       5.25-inch, 1-sided, 9-sector
  2410. #     FE     160K       5.25-inch, 1-sided, 8-sector
  2411. #     FE     250K       8-inch, 1-sided, single-density
  2412. #     FD     500K       8-inch, 2-sided, single-density
  2413. #     FE     1.2 MB     8-inch, 2-sided, double-density
  2414. #     F8     -----      Fixed disk 
  2415. #
  2416. #     FC     xxxK       Apricot 70x1x9 boot disk.
  2417. #
  2418. # Originally a bitmap:
  2419. #  xxxxxxx0    Not two sided
  2420. #  xxxxxxx1    Double sided
  2421. #  xxxxxx0x    Not 8 SPT
  2422. #  xxxxxx1x    8 SPT
  2423. #  xxxxx0xx    Not Removable drive
  2424. #  xxxxx1xx    Removable drive
  2425. #  11111xxx    Must be one.
  2426. #
  2427. # But now it's rather random:
  2428. #  111111xx    Low density disk
  2429. #        00    SS, Not 8 SPT
  2430. #        01    DS, Not 8 SPT
  2431. #        10    SS, 8 SPT
  2432. #        11    DS, 8 SPT
  2433. #
  2434. #  11111001    Double density 3╜ floppy disk, high density 5╝
  2435. #  11110000    High density 3╜ floppy disk
  2436. #  11111000    Hard disk any format
  2437. #
  2438.  
  2439. # CDROM Filesystems
  2440. 32769    string    CD001     ISO 9660 CD-ROM filesystem data
  2441. 37633    string    CD001     ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
  2442. 32776    string    CDROM     High Sierra CD-ROM filesystem data
  2443.  
  2444. #------------------------------------------------------------------------------
  2445. # flash:    file(1) magic for Macromedia Flash file format
  2446. #
  2447. # See
  2448. #
  2449. #    http://www.macromedia.com/software/flash/open/
  2450. #
  2451. 0    string        FWS        Macromedia Flash data,
  2452. >3    byte        x        version %d
  2453.  
  2454. #------------------------------------------------------------------------------
  2455. # fonts:  file(1) magic for font data
  2456. #
  2457. 0    string        FONT        ASCII vfont text
  2458. 0    short        0436        Berkeley vfont data
  2459. 0    short        017001        byte-swapped Berkeley vfont data
  2460.  
  2461. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  2462. 0    string        %!PS-AdobeFont-1.0    PostScript Type 1 font text
  2463. >20    string        >\0            (%s)
  2464. 6    string        %!PS-AdobeFont-1.0    PostScript Type 1 font program data
  2465.  
  2466. # X11 font files in SNF (Server Natural Format) format
  2467. 0    belong        00000004        X11 SNF font data, MSB first
  2468. 0    lelong        00000004        X11 SNF font data, LSB first
  2469.  
  2470. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  2471. 0    string        STARTFONT\040        X11 BDF font text
  2472.  
  2473. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  2474. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  2475. 0    string        \001fcp            X11 Portable Compiled Font data
  2476. >12    byte        0x02            \b, LSB first
  2477. >12    byte        0x0a            \b, MSB first
  2478. 0    string        D1.0\015        X11 Speedo font data
  2479.  
  2480. #------------------------------------------------------------------------------
  2481. # FIGlet fonts and controlfiles
  2482. # From figmagic supplied with Figlet version 2.2
  2483. # "David E. O'Brien" <obrien@FreeBSD.ORG>
  2484. 0    string        flf        FIGlet font
  2485. >3    string        >2a        version %-2.2s
  2486. 0    string        flc        FIGlet controlfile
  2487. >3    string        >2a        version %-2.2s
  2488.  
  2489. # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  2490. # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
  2491. 0    belong        0x14025919    libGrx font data,
  2492. >8    leshort        x        %dx
  2493. >10    leshort        x        \b%d
  2494. >40    string        x        %s
  2495. # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  2496. 0    belong        0xff464f4e    DOS code page font data collection
  2497. 7    belong        0x00454741    DOS code page font data
  2498. 7    belong        0x00564944    DOS code page font data (from Linux?)
  2499. 4098    string        DOSFONT        DOSFONT2 encrypted font data
  2500.  
  2501. # downloadable fonts for browser (prints type) anthon@mnt.org
  2502. 0    string        PFR1        PFR1 font
  2503. >102    string        >0        \b: %s
  2504.  
  2505. #------------------------------------------------------------------------------
  2506. # frame:  file(1) magic for FrameMaker files
  2507. #
  2508. # This stuff came on a FrameMaker demo tape, most of which is
  2509. # copyright, but this file is "published" as witness the following:
  2510. #
  2511. 0    string        \<MakerFile    FrameMaker document
  2512. >11    string        5.5         (5.5
  2513. >11    string        5.0         (5.0
  2514. >11    string        4.0         (4.0
  2515. >11    string        3.0         (3.0
  2516. >11    string        2.0         (2.0
  2517. >11    string        1.0         (1.0
  2518. >14    byte        x          %c)
  2519. 0    string        \<MIFFile    FrameMaker MIF (ASCII) file
  2520. >9    string        4.0         (4.0)
  2521. >9    string        3.0         (3.0)
  2522. >9    string        2.0         (2.0)
  2523. >9    string        1.0         (1.x)
  2524. 0    string        \<MakerDictionary    FrameMaker Dictionary text
  2525. >17    string        3.0         (3.0)
  2526. >17    string        2.0         (2.0)
  2527. >17    string        1.0         (1.x)
  2528. 0    string        \<MakerScreenFont    FrameMaker Font file
  2529. >17    string        1.01         (%s)
  2530. 0    string        \<MML        FrameMaker MML file
  2531. 0    string        \<BookFile    FrameMaker Book file
  2532. >10    string        3.0         (3.0
  2533. >10    string        2.0         (2.0
  2534. >10    string        1.0         (1.0
  2535. >13    byte        x          %c)
  2536. # XXX - this book entry should be verified, if you find one, uncomment this
  2537. #0    string        \<Book\     FrameMaker Book (ASCII) file
  2538. #>6    string        3.0         (3.0)
  2539. #>6    string        2.0         (2.0)
  2540. #>6    string        1.0         (1.0)
  2541. 0    string        \<Maker    Intermediate Print File    FrameMaker IPL file
  2542.  
  2543. #------------------------------------------------------------------------------
  2544. # freebsd:  file(1) magic for FreeBSD objects
  2545. #
  2546. # All new-style FreeBSD magic numbers are in host byte order (i.e.,
  2547. # little-endian on x86).
  2548. #
  2549. # XXX - this comes from the file "freebsd" in a recent FreeBSD version of
  2550. # "file"; it, and the NetBSD stuff in "netbsd", appear to use different
  2551. # schemes for distinguishing between executable images, shared libraries,
  2552. # and object files.
  2553. #
  2554. # FreeBSD says:
  2555. #
  2556. #    Regardless of whether it's pure, demand-paged, or none of the
  2557. #    above:
  2558. #
  2559. #    if the entry point is < 4096, then it's a shared library if
  2560. #    the "has run-time loader information" bit is set, and is
  2561. #    position-independent if the "is position-independent" bit
  2562. #    is set;
  2563. #
  2564. #    if the entry point is >= 4096 (or >4095, same thing), then it's
  2565. #    an executable, and is dynamically-linked if the "has run-time
  2566. #    loader information" bit is set.
  2567. #
  2568. # On x86, NetBSD says:
  2569. #
  2570. #    If it's neither pure nor demand-paged:
  2571. #
  2572. #    if it has the "has run-time loader information" bit set, it's
  2573. #    a dynamically-linked executable;
  2574. #
  2575. #    if it doesn't have that bit set, then:
  2576. #
  2577. #        if it has the "is position-independent" bit set, it's
  2578. #        position-independent;
  2579. #
  2580. #        if the entry point is non-zero, it's an executable, otherwise
  2581. #        it's an object file.
  2582. #
  2583. #    If it's pure:
  2584. #
  2585. #    if it has the "has run-time loader information" bit set, it's
  2586. #    a dynamically-linked executable, otherwise it's just an
  2587. #    executable.
  2588. #
  2589. #    If it's demand-paged:
  2590. #
  2591. #    if it has the "has run-time loader information" bit set,
  2592. #    then:
  2593. #
  2594. #        if the entry point is < 4096, it's a shared library;
  2595. #
  2596. #        if the entry point is = 4096 or > 4096 (i.e., >= 4096),
  2597. #        it's a dynamically-linked executable);
  2598. #
  2599. #    if it doesn't have the "has run-time loader information" bit
  2600. #    set, then it's just an executable.
  2601. #
  2602. # (On non-x86, NetBSD does much the same thing, except that it uses
  2603. # 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
  2604. # pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
  2605. # had 8K pages; dunno about MIPS.)
  2606. #
  2607. # I suspect the two will differ only in perverse and uninteresting cases
  2608. # ("shared" libraries that aren't demand-paged and whose pages probably
  2609. # won't actually be shared, executables with entry points <4096).
  2610. #
  2611. # I leave it to those more familiar with FreeBSD and NetBSD to figure out
  2612. # what the right answer is (although using ">4095", FreeBSD-style, is
  2613. # probably better than separately checking for "=4096" and ">4096",
  2614. # NetBSD-style).  (The old "netbsd" file analyzed FreeBSD demand paged
  2615. # executables using the NetBSD technique.)
  2616. #
  2617. 0    lelong&0377777777    041400407    FreeBSD/i386
  2618. >20    lelong            <4096
  2619. >>3    byte&0xC0        &0x80        shared library
  2620. >>3    byte&0xC0        0x40        PIC object
  2621. >>3    byte&0xC0        0x00        object
  2622. >20    lelong            >4095
  2623. >>3    byte&0x80        0x80        dynamically linked executable
  2624. >>3    byte&0x80        0x00        executable
  2625. >16    lelong            >0        not stripped
  2626.  
  2627. 0    lelong&0377777777    041400410    FreeBSD/i386 pure
  2628. >20    lelong            <4096
  2629. >>3    byte&0xC0        &0x80        shared library
  2630. >>3    byte&0xC0        0x40        PIC object
  2631. >>3    byte&0xC0        0x00        object
  2632. >20    lelong            >4095
  2633. >>3    byte&0x80        0x80        dynamically linked executable
  2634. >>3    byte&0x80        0x00        executable
  2635. >16    lelong            >0        not stripped
  2636.  
  2637. 0    lelong&0377777777    041400413    FreeBSD/i386 demand paged
  2638. >20    lelong            <4096
  2639. >>3    byte&0xC0        &0x80        shared library
  2640. >>3    byte&0xC0        0x40        PIC object
  2641. >>3    byte&0xC0        0x00        object
  2642. >20    lelong            >4095
  2643. >>3    byte&0x80        0x80        dynamically linked executable
  2644. >>3    byte&0x80        0x00        executable
  2645. >16    lelong            >0        not stripped
  2646.  
  2647. 0    lelong&0377777777    041400314    FreeBSD/i386 compact demand paged
  2648. >20    lelong            <4096
  2649. >>3    byte&0xC0        &0x80        shared library
  2650. >>3    byte&0xC0        0x40        PIC object
  2651. >>3    byte&0xC0        0x00        object
  2652. >20    lelong            >4095
  2653. >>3    byte&0x80        0x80        dynamically linked executable
  2654. >>3    byte&0x80        0x00        executable
  2655. >16    lelong            >0        not stripped
  2656.  
  2657. # XXX gross hack to identify core files
  2658. # cores start with a struct tss; we take advantage of the following:
  2659. # byte 7:     highest byte of the kernel stack pointer, always 0xfe
  2660. #      8/9:   kernel (ring 0) ss value, always 0x0010
  2661. #      10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
  2662. #      28:    low order byte of the current PTD entry, always 0 since the
  2663. #             PTD is page-aligned
  2664. #
  2665. 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
  2666. >1039    string    >\0    from '%s'
  2667.  
  2668. # /var/run/ld.so.hints
  2669. # What are you laughing about?
  2670. 0    lelong            011421044151    ld.so hints file (Little Endian
  2671. >4    lelong            >0        \b, version %d)
  2672. >4    belong            <=0        \b)
  2673. 0    belong            011421044151    ld.so hints file (Big Endian
  2674. >4    belong            >0        \b, version %d)
  2675. >4    belong            <=0        \b)
  2676.  
  2677. #
  2678. # Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
  2679. #
  2680. 0    string    SCRSHOT_    scrshot(1) screenshot,
  2681. >8    byte    x        version %d,
  2682. >9    byte    2        %d bytes in header,
  2683. >>10    byte    x        %d chars wide by
  2684. >>11    byte    x        %d chars high
  2685.  
  2686. #------------------------------------------------------------------------------
  2687. # fsav:  file(1) magic for datafellows fsav virus definition files
  2688. # Anthon van der Neut (anthon@mnt.org)
  2689. 0    beshort        0x1575        fsav (linux) macro virus
  2690. >8    leshort        >0        (%d-
  2691. >11    byte        >0        \b%02d-
  2692. >10    byte        >0        \b%02d)
  2693.  
  2694. # comment this out for now because it regognizes every file where
  2695. # the eighth character is \n
  2696. #8    byte        0x0a
  2697. #>12    byte        0x07
  2698. #>11    leshort        >0        fsav (linux) virus (%d-
  2699. #>10    byte        0        \b01-
  2700. #>10    byte        1        \b02-
  2701. #>10    byte        2        \b03-
  2702. #>10    byte        3        \b04-
  2703. #>10    byte        4        \b05-
  2704. #>10    byte        5        \b06-
  2705. #>10    byte        6        \b07-
  2706. #>10    byte        7        \b08-
  2707. #>10    byte        8        \b08-
  2708. #>10    byte        9        \b10-
  2709. #>10    byte        10        \b11-
  2710. #>10    byte        11        \b12-
  2711. #>9    byte        >0        \b%02d)
  2712. #------------------------------------------------------------------------------
  2713. # GIMP Gradient: file(1) magic for the GIMP's gradient data files
  2714. # by Federico Mena <federico@nuclecu.unam.mx>
  2715.  
  2716. 0       string          GIMP\ Gradient  GIMP gradient data
  2717.  
  2718. #------------------------------------------------------------------------------
  2719. # XCF:  file(1) magic for the XCF image format used in the GIMP developed
  2720. #       by Spencer Kimball and Peter Mattis
  2721. #       ('Bucky' LaDieu, nega@vt.edu)
  2722.  
  2723. 0    string        gimp\ xcf    GIMP XCF image data,
  2724. >9    string        file        version 0,
  2725. >9    string        v        version
  2726. >>10    string        >\0        %s,
  2727. >14    belong        x        %lu x
  2728. >18    belong        x        %lu,
  2729. >22     belong          0               RGB Color
  2730. >22     belong          1               Greyscale
  2731. >22     belong          2               Indexed Color
  2732. >22    belong        >2        Unknown Image Type.
  2733.  
  2734. #------------------------------------------------------------------------------
  2735. # XCF:  file(1) magic for the patterns used in the GIMP, developed
  2736. #       by Spencer Kimball and Peter Mattis
  2737. #       ('Bucky' LaDieu, nega@vt.edu)
  2738.  
  2739. 20      string          GPAT            GIMP pattern data,
  2740. >24     string          x               %s
  2741.  
  2742. #------------------------------------------------------------------------------
  2743. # XCF:  file(1) magic for the brushes used in the GIMP, developed
  2744. #       by Spencer Kimball and Peter Mattis
  2745. #       ('Bucky' LaDieu, nega@vt.edu)
  2746.  
  2747. 20      string          GIMP            GIMP brush data
  2748. #
  2749. # GNU nlsutils message catalog file format
  2750. #
  2751. 0    string        \336\22\4\225    GNU message catalog (little endian),
  2752. >4    lelong        x        revision %d,
  2753. >8    lelong        x        %d messages
  2754. 0    string        \225\4\22\336    GNU message catalog (big endian),
  2755. >4    belong        x        revision %d,
  2756. >8    belong        x        %d messages
  2757. # message catalogs, from Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
  2758. 0    string        *nazgul*    Nazgul style compiled message catalog
  2759. >8    lelong        >0        \b, version %ld
  2760.  
  2761. #------------------------------------------------------------------------------
  2762. # ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  2763. #
  2764. # ACE/gr binary
  2765. 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
  2766. >39    byte    >0            - version %c
  2767. # ACE/gr ascii
  2768. 0    string    #\ xvgr\ parameter\ file    ACE/gr ascii file
  2769. 0    string    #\ xmgr\ parameter\ file    ACE/gr ascii file
  2770. 0    string    #\ ACE/gr\ parameter\ file    ACE/gr ascii file
  2771. # Grace projects
  2772. 0    string    #\ Grace\ project\ file        Grace project file
  2773. >23    string    @version\              (version
  2774. >>32    byte    >0                 %c
  2775. >>33    string    >\0                 \b.%.2s
  2776. >>35    string    >\0                 \b.%.2s)
  2777. # ACE/gr fit description files
  2778. 0    string    #\ ACE/gr\ fit\ description\     ACE/gr fit description file
  2779. # end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  2780.  
  2781. #------------------------------------------------------------------------------
  2782. # gringotts:  file(1) magic for Gringotts
  2783. # http://devel.pluto.linux.it/projects/Gringotts/
  2784. # author: Germano Rizzo <mano@pluto.linux.it>
  2785. #GRG2????Y
  2786. 0    string    GRG        Gringotts data file
  2787. >3    string        1        v.1, SERPENT crypt, SHA-256 hash, ZLib lvl.9
  2788. >3    string        2        v.2,
  2789. >>8    byte&0x70    0x00        RIJNDAEL-128 crypt,
  2790. >>8    byte&0x70    0x10        SERPENT crypt,
  2791. >>8    byte&0x70    0x20        TWOFISH crypt, 
  2792. >>8    byte&0x70    0x30        CAST-256 crypt,
  2793. >>8    byte&0x70    0x40        SAFER+ crypt,
  2794. >>8    byte&0x70    0x50        LOKI97 crypt,
  2795. >>8    byte&0x70    0x60        3DES crypt,
  2796. >>8    byte&0x70    0x70        RIJNDAEL-256 crypt,
  2797. >>8    byte&0x08    0x00        SHA1 hash,
  2798. >>8    byte&0x08    0x08        RIPEMD-160 hash,
  2799. >>8    byte&0x04    0x00        ZLib
  2800. >>8    byte&0x04    0x04        BZip2
  2801. >>8    byte&0x03    0x00        lvl.0
  2802. >>8    byte&0x03    0x01        lvl.3
  2803. >>8    byte&0x03    0x02        lvl.6
  2804. >>8    byte&0x03    0x03        lvl.9
  2805.  
  2806. #------------------------------------------------------------------------------
  2807. # hitach-sh: file(1) magic for Hitachi Super-H
  2808. #
  2809. # Super-H COFF
  2810. #
  2811. 0    beshort        0x0500        Hitachi SH big-endian COFF
  2812. >18    beshort&0x0002    =0x0000        object
  2813. >18    beshort&0x0002    =0x0002        executable
  2814. >18    beshort&0x0008    =0x0008        \b, stripped
  2815. >18    beshort&0x0008    =0x0000        \b, not stripped
  2816. #
  2817. 0    leshort        0x0550        Hitachi SH little-endian COFF
  2818. >18    leshort&0x0002    =0x0000        object
  2819. >18    leshort&0x0002    =0x0002        executable
  2820. >18    leshort&0x0008    =0x0008        \b, stripped
  2821. >18    leshort&0x0008    =0x0000        \b, not stripped
  2822.  
  2823.  
  2824. #------------------------------------------------------------------------------
  2825. # hp:  file(1) magic for Hewlett Packard machines (see also "printer")
  2826. #
  2827. # XXX - somebody should figure out whether any byte order needs to be
  2828. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  2829. # big-endian as it was mostly 68K-based.
  2830. #
  2831. # I think the 500 series was the old stack-based machines, running a
  2832. # UNIX environment atop the "SUN kernel"; dunno whether it was
  2833. # big-endian or little-endian.
  2834. #
  2835. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  2836. # hp300 are 68020+68881 based; hp400 are also 68k.  The following basic
  2837. # HP magic is useful for reference, but using "long" magic is a better
  2838. # practice in order to avoid collisions.
  2839. #
  2840. # Guy Harris (guy@netapp.com): some additions to this list came from
  2841. # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
  2842. # 1.2, and 2.0).  The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
  2843. # "/etc/magic", though, except for the "archive file relocatable library"
  2844. # stuff, and the 68030 and 68040 stuff isn't there at all - are they not
  2845. # used in executables, or have they just not yet updated "/etc/magic"
  2846. # completely?
  2847. #
  2848. # 0    beshort        200        hp200 (68010) BSD binary
  2849. # 0    beshort        300        hp300 (68020+68881) BSD binary
  2850. # 0    beshort        0x20c        hp200/300 HP-UX binary
  2851. # 0    beshort        0x20d        hp400 (68030) HP-UX binary
  2852. # 0    beshort        0x20e        hp400 (68040?) HP-UX binary
  2853. # 0    beshort        0x20b        PA-RISC1.0 HP-UX binary
  2854. # 0    beshort        0x210        PA-RISC1.1 HP-UX binary
  2855. # 0    beshort        0x211        PA-RISC1.2 HP-UX binary
  2856. # 0    beshort        0x214        PA-RISC2.0 HP-UX binary
  2857.  
  2858. #
  2859. # The "misc" stuff needs a byte order; the archives look suspiciously
  2860. # like the old 177545 archives (0xff65 = 0177545).
  2861. #
  2862. #### Old Apollo stuff
  2863. 0    beshort        0627        Apollo m68k COFF executable
  2864. >18    beshort        ^040000        not stripped
  2865. >22    beshort        >0        - version %ld
  2866. 0    beshort        0624        apollo a88k COFF executable
  2867. >18    beshort        ^040000        not stripped
  2868. >22    beshort        >0        - version %ld
  2869. 0       long            01203604016     TML 0123 byte-order format
  2870. 0       long            01702407010     TML 1032 byte-order format
  2871. 0       long            01003405017     TML 2301 byte-order format
  2872. 0       long            01602007412     TML 3210 byte-order format
  2873. #### PA-RISC 1.1
  2874. 0    belong         0x02100106    PA-RISC1.1 relocatable object
  2875. 0    belong         0x02100107    PA-RISC1.1 executable
  2876. >168    belong        &0x00000004    dynamically linked
  2877. >(144)    belong        0x054ef630    dynamically linked
  2878. >96    belong        >0        - not stripped
  2879.  
  2880. 0    belong         0x02100108    PA-RISC1.1 shared executable
  2881. >168    belong&0x4    0x4        dynamically linked
  2882. >(144)    belong        0x054ef630    dynamically linked
  2883. >96    belong        >0        - not stripped
  2884.  
  2885. 0    belong         0x0210010b    PA-RISC1.1 demand-load executable
  2886. >168    belong&0x4    0x4        dynamically linked
  2887. >(144)    belong        0x054ef630    dynamically linked
  2888. >96    belong        >0        - not stripped
  2889.  
  2890. 0    belong         0x0210010e    PA-RISC1.1 shared library
  2891. >96    belong        >0        - not stripped
  2892.  
  2893. 0    belong         0x0210010d    PA-RISC1.1 dynamic load library
  2894. >96    belong        >0        - not stripped
  2895.  
  2896. #### PA-RISC 2.0
  2897. 0    belong        0x02140106    PA-RISC2.0 relocatable object
  2898.  
  2899. 0       belong        0x02140107    PA-RISC2.0 executable
  2900. >168    belong        &0x00000004    dynamically linked
  2901. >(144)    belong        0x054ef630    dynamically linked
  2902. >96    belong        >0        - not stripped
  2903.  
  2904. 0       belong        0x02140108    PA-RISC2.0 shared executable
  2905. >168    belong        &0x00000004    dynamically linked
  2906. >(144)    belong        0x054ef630    dynamically linked
  2907. >96    belong        >0        - not stripped
  2908.  
  2909. 0       belong        0x0214010b    PA-RISC2.0 demand-load executable
  2910. >168    belong        &0x00000004    dynamically linked
  2911. >(144)    belong        0x054ef630    dynamically linked
  2912. >96    belong        >0        - not stripped
  2913.  
  2914. 0       belong        0x0214010e    PA-RISC2.0 shared library
  2915. >96    belong        >0        - not stripped
  2916.  
  2917. 0       belong        0x0214010d    PA-RISC2.0 dynamic load library
  2918. >96    belong        >0        - not stripped
  2919.  
  2920. #### 800
  2921. 0    belong         0x020b0106    PA-RISC1.0 relocatable object
  2922.  
  2923. 0    belong         0x020b0107    PA-RISC1.0 executable
  2924. >168    belong&0x4    0x4        dynamically linked
  2925. >(144)    belong        0x054ef630    dynamically linked
  2926. >96    belong        >0        - not stripped
  2927.  
  2928. 0    belong         0x020b0108    PA-RISC1.0 shared executable
  2929. >168    belong&0x4    0x4        dynamically linked
  2930. >(144)    belong        0x054ef630    dynamically linked
  2931. >96    belong        >0        - not stripped
  2932.  
  2933. 0    belong         0x020b010b    PA-RISC1.0 demand-load executable
  2934. >168    belong&0x4    0x4        dynamically linked
  2935. >(144)    belong        0x054ef630    dynamically linked
  2936. >96    belong        >0        - not stripped
  2937.  
  2938. 0    belong         0x020b010e    PA-RISC1.0 shared library
  2939. >96    belong        >0        - not stripped
  2940.  
  2941. 0    belong         0x020b010d    PA-RISC1.0 dynamic load library
  2942. >96    belong        >0        - not stripped
  2943.  
  2944. 0    belong        0x213c6172    archive file
  2945. >68    belong         0x020b0619    - PA-RISC1.0 relocatable library
  2946. >68    belong         0x02100619    - PA-RISC1.1 relocatable library
  2947. >68    belong         0x02110619    - PA-RISC1.2 relocatable library
  2948. >68    belong         0x02140619    - PA-RISC2.0 relocatable library
  2949.  
  2950. #### 500
  2951. 0    long        0x02080106    HP s500 relocatable executable
  2952. >16    long        >0        - version %ld
  2953.  
  2954. 0    long        0x02080107    HP s500 executable
  2955. >16    long        >0        - version %ld
  2956.  
  2957. 0    long        0x02080108    HP s500 pure executable
  2958. >16    long        >0        - version %ld
  2959.  
  2960. #### 200
  2961. 0    belong         0x020c0108    HP s200 pure executable
  2962. >4    beshort        >0        - version %ld
  2963. >8    belong        &0x80000000    save fp regs
  2964. >8    belong        &0x40000000    dynamically linked
  2965. >8    belong        &0x20000000    debuggable
  2966. >36    belong        >0        not stripped
  2967.  
  2968. 0    belong        0x020c0107    HP s200 executable
  2969. >4    beshort        >0        - version %ld
  2970. >8    belong        &0x80000000    save fp regs
  2971. >8    belong        &0x40000000    dynamically linked
  2972. >8    belong        &0x20000000    debuggable
  2973. >36    belong        >0        not stripped
  2974.  
  2975. 0    belong        0x020c010b    HP s200 demand-load executable
  2976. >4    beshort        >0        - version %ld
  2977. >8    belong        &0x80000000    save fp regs
  2978. >8    belong        &0x40000000    dynamically linked
  2979. >8    belong        &0x20000000    debuggable
  2980. >36    belong        >0        not stripped
  2981.  
  2982. 0    belong        0x020c0106    HP s200 relocatable executable
  2983. >4    beshort        >0        - version %ld
  2984. >6    beshort        >0        - highwater %d
  2985. >8    belong        &0x80000000    save fp regs
  2986. >8    belong        &0x20000000    debuggable
  2987. >8    belong        &0x10000000    PIC
  2988.  
  2989. 0    belong         0x020a0108    HP s200 (2.x release) pure executable
  2990. >4    beshort        >0        - version %ld
  2991. >36    belong        >0        not stripped
  2992.  
  2993. 0    belong        0x020a0107    HP s200 (2.x release) executable
  2994. >4    beshort        >0        - version %ld
  2995. >36    belong        >0        not stripped
  2996.  
  2997. 0    belong        0x020c010e    HP s200 shared library
  2998. >4    beshort        >0        - version %ld
  2999. >6    beshort        >0        - highwater %d
  3000. >36    belong        >0        not stripped
  3001.  
  3002. 0    belong        0x020c010d    HP s200 dynamic load library
  3003. >4    beshort        >0        - version %ld
  3004. >6    beshort        >0        - highwater %d
  3005. >36    belong        >0        not stripped
  3006.  
  3007. #### MISC
  3008. 0    long        0x0000ff65    HP old archive
  3009. 0    long        0x020aff65    HP s200 old archive
  3010. 0    long        0x020cff65    HP s200 old archive
  3011. 0    long        0x0208ff65    HP s500 old archive
  3012.  
  3013. 0    long        0x015821a6    HP core file
  3014.  
  3015. 0    long        0x4da7eee8    HP-WINDOWS font
  3016. >8    byte        >0        - version %ld
  3017. 0    string        Bitmapfile    HP Bitmapfile
  3018.  
  3019. 0    string        IMGfile    CIS     compimg HP Bitmapfile
  3020. # XXX - see "lif"
  3021. #0    short        0x8000        lif file
  3022. 0    long        0x020c010c    compiled Lisp
  3023.  
  3024. 0    string        msgcat01    HP NLS message catalog,
  3025. >8    long        >0        %d messages
  3026.  
  3027. # addendum to /etc/magic with HP-48sx file-types by phk@data.fls.dk 1jan92
  3028. 0    string        HPHP48-        HP48 binary
  3029. >7    byte        >0        - Rev %c
  3030. >8    beshort        0x1129        (ADR)
  3031. >8    beshort        0x3329        (REAL)
  3032. >8    beshort        0x5529        (LREAL)
  3033. >8    beshort        0x7729        (COMPLX)
  3034. >8    beshort        0x9d29        (LCOMPLX)
  3035. >8    beshort        0xbf29        (CHAR)
  3036. >8    beshort        0xe829        (ARRAY)
  3037. >8    beshort        0x0a2a        (LNKARRAY)
  3038. >8    beshort        0x2c2a        (STRING)
  3039. >8    beshort        0x4e2a        (HXS)
  3040. >8    beshort        0x742a        (LIST)
  3041. >8    beshort        0x962a        (DIR)
  3042. >8    beshort        0xb82a        (ALG)
  3043. >8    beshort        0xda2a        (UNIT)
  3044. >8    beshort        0xfc2a        (TAGGED)
  3045. >8    beshort        0x1e2b        (GROB)
  3046. >8    beshort        0x402b        (LIB)
  3047. >8    beshort        0x622b        (BACKUP)
  3048. >8    beshort        0x882b        (LIBDATA)
  3049. >8    beshort        0x9d2d        (PROG)
  3050. >8    beshort        0xcc2d        (CODE)
  3051. >8    beshort        0x482e        (GNAME)
  3052. >8    beshort        0x6d2e        (LNAME)
  3053. >8    beshort        0x922e        (XLIB)
  3054. 0    string        %%HP:        HP48 text
  3055. >6    string        T(0)        - T(0)
  3056. >6    string        T(1)        - T(1)
  3057. >6    string        T(2)        - T(2)
  3058. >6    string        T(3)        - T(3)
  3059. >10    string        A(D)        A(D)
  3060. >10    string        A(R)        A(R)
  3061. >10    string        A(G)        A(G)
  3062. >14    string        F(.)        F(.);
  3063. >14    string        F(,)        F(,);
  3064.  
  3065. # hpBSD magic numbers
  3066. 0    beshort        200        hp200 (68010) BSD
  3067. >2    beshort        0407        impure binary
  3068. >2    beshort        0410        read-only binary
  3069. >2    beshort        0413        demand paged binary
  3070. 0    beshort        300        hp300 (68020+68881) BSD
  3071. >2    beshort        0407        impure binary
  3072. >2    beshort        0410        read-only binary
  3073. >2    beshort        0413        demand paged binary
  3074. #
  3075. # From David Gero <dgero@nortelnetworks.com>
  3076. # HP-UX 10.20 core file format from /usr/include/sys/core.h
  3077. # Unfortunately, HP-UX uses corehead blocks without specifying the order
  3078. # There are four we care about:
  3079. #     CORE_KERNEL, which starts with the string "HP-UX"
  3080. #     CORE_EXEC, which contains the name of the command
  3081. #     CORE_PROC, which contains the signal number that caused the core dump
  3082. #     CORE_FORMAT, which contains the version of the core file format (== 1)
  3083. # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
  3084. # but we include all 6 variations of the order of the first 3, and
  3085. # assume that PROC will always be last
  3086. # Order 1: KERNEL, EXEC, FORMAT, PROC
  3087. 0x10        string    HP-UX
  3088. >0        belong    2
  3089. >>0xC        belong    0x3C
  3090. >>>0x4C        belong    0x100
  3091. >>>>0x58    belong    0x44
  3092. >>>>>0xA0    belong    1
  3093. >>>>>>0xAC    belong    4
  3094. >>>>>>>0xB0    belong    1
  3095. >>>>>>>>0xB4    belong    4        core file
  3096. >>>>>>>>>0x90    string    >\0        from '%s'
  3097. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3098. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3099. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3100. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3101. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3102. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3103. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3104. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3105. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3106. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3107. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3108. # Order 2: KERNEL, FORMAT, EXEC, PROC
  3109. >>>0x4C        belong    1
  3110. >>>>0x58    belong    4
  3111. >>>>>0x5C    belong    1
  3112. >>>>>>0x60    belong    0x100
  3113. >>>>>>>0x6C    belong    0x44
  3114. >>>>>>>>0xB4    belong    4        core file
  3115. >>>>>>>>>0xA4    string    >\0        from '%s'
  3116. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3117. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3118. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3119. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3120. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3121. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3122. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3123. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3124. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3125. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3126. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3127. # Order 3: FORMAT, KERNEL, EXEC, PROC
  3128. 0x24        string    HP-UX
  3129. >0        belong    1
  3130. >>0xC        belong    4
  3131. >>>0x10        belong    1
  3132. >>>>0x14    belong    2
  3133. >>>>>0x20    belong    0x3C
  3134. >>>>>>0x60    belong    0x100
  3135. >>>>>>>0x6C    belong    0x44
  3136. >>>>>>>>0xB4    belong    4        core file
  3137. >>>>>>>>>0xA4    string    >\0        from '%s'
  3138. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3139. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3140. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3141. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3142. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3143. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3144. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3145. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3146. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3147. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3148. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3149. # Order 4: EXEC, KERNEL, FORMAT, PROC
  3150. 0x64        string    HP-UX
  3151. >0        belong    0x100
  3152. >>0xC        belong    0x44
  3153. >>>0x54        belong    2
  3154. >>>>0x60    belong    0x3C
  3155. >>>>>0xA0    belong    1
  3156. >>>>>>0xAC    belong    4
  3157. >>>>>>>0xB0    belong    1
  3158. >>>>>>>>0xB4    belong    4        core file
  3159. >>>>>>>>>0x44    string    >\0        from '%s'
  3160. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3161. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3162. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3163. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3164. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3165. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3166. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3167. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3168. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3169. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3170. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3171. # Order 5: FORMAT, EXEC, KERNEL, PROC
  3172. 0x78        string    HP-UX
  3173. >0        belong    1
  3174. >>0xC        belong    4
  3175. >>>0x10        belong    1
  3176. >>>>0x14    belong    0x100
  3177. >>>>>0x20    belong    0x44
  3178. >>>>>>0x68    belong    2
  3179. >>>>>>>0x74    belong    0x3C
  3180. >>>>>>>>0xB4    belong    4        core file
  3181. >>>>>>>>>0x58    string    >\0        from '%s'
  3182. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3183. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3184. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3185. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3186. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3187. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3188. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3189. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3190. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3191. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3192. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3193. # Order 6: EXEC, FORMAT, KERNEL, PROC
  3194. >0        belong    0x100
  3195. >>0xC        belong    0x44
  3196. >>>0x54        belong    1
  3197. >>>>0x60    belong    4
  3198. >>>>>0x64    belong    1
  3199. >>>>>>0x68    belong    2
  3200. >>>>>>>0x74    belong    0x2C
  3201. >>>>>>>>0xB4    belong    4        core file
  3202. >>>>>>>>>0x44    string    >\0        from '%s'
  3203. >>>>>>>>>0xC4    belong    3        - received SIGQUIT
  3204. >>>>>>>>>0xC4    belong    4        - received SIGILL
  3205. >>>>>>>>>0xC4    belong    5        - received SIGTRAP
  3206. >>>>>>>>>0xC4    belong    6        - received SIGABRT
  3207. >>>>>>>>>0xC4    belong    7        - received SIGEMT
  3208. >>>>>>>>>0xC4    belong    8        - received SIGFPE
  3209. >>>>>>>>>0xC4    belong    10        - received SIGBUS
  3210. >>>>>>>>>0xC4    belong    11        - received SIGSEGV
  3211. >>>>>>>>>0xC4    belong    12        - received SIGSYS
  3212. >>>>>>>>>0xC4    belong    33        - received SIGXCPU
  3213. >>>>>>>>>0xC4    belong    34        - received SIGXFSZ
  3214.  
  3215. #------------------------------------------------------------------------------
  3216. # ibm370:  file(1) magic for IBM 370 and compatibles.
  3217. #
  3218. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  3219. # What the heck *is* "USS/370"?
  3220. # AIX 4.1's "/etc/magic" has
  3221. #
  3222. #    0    short        0535        370 sysV executable 
  3223. #    >12    long        >0        not stripped
  3224. #    >22    short        >0        - version %d
  3225. #    >30    long        >0        - 5.2 format
  3226. #    0    short        0530        370 sysV pure executable 
  3227. #    >12    long        >0        not stripped
  3228. #    >22    short        >0        - version %d
  3229. #    >30    long        >0        - 5.2 format
  3230. #
  3231. # instead of the "USS/370" versions of the same magic numbers.
  3232. #
  3233. 0    beshort        0537        370 XA sysV executable 
  3234. >12    belong        >0        not stripped
  3235. >22    beshort        >0        - version %d
  3236. >30    belong        >0        - 5.2 format
  3237. 0    beshort        0532        370 XA sysV pure executable 
  3238. >12    belong        >0        not stripped
  3239. >22    beshort        >0        - version %d
  3240. >30    belong        >0        - 5.2 format
  3241. 0    beshort        054001        370 sysV pure executable
  3242. >12    belong        >0        not stripped
  3243. 0    beshort        055001        370 XA sysV pure executable
  3244. >12    belong        >0        not stripped
  3245. 0    beshort        056401        370 sysV executable
  3246. >12    belong        >0        not stripped
  3247. 0    beshort        057401        370 XA sysV executable
  3248. >12    belong        >0        not stripped
  3249. 0       beshort        0531        SVR2 executable (Amdahl-UTS)
  3250. >12    belong        >0        not stripped
  3251. >24     belong        >0        - version %ld
  3252. 0    beshort        0534        SVR2 pure executable (Amdahl-UTS)
  3253. >12    belong        >0        not stripped
  3254. >24    belong        >0        - version %ld
  3255. 0    beshort        0530        SVR2 pure executable (USS/370)
  3256. >12    belong        >0        not stripped
  3257. >24    belong        >0        - version %ld
  3258. 0    beshort        0535        SVR2 executable (USS/370)
  3259. >12    belong        >0        not stripped
  3260. >24    belong        >0        - version %ld
  3261.  
  3262. #------------------------------------------------------------------------------
  3263. # ibm6000:  file(1) magic for RS/6000 and the RT PC.
  3264. #
  3265. 0    beshort        0x01df        executable (RISC System/6000 V3.1) or obj module
  3266. >12    belong        >0        not stripped
  3267. # Breaks sun4 statically linked execs.
  3268. #0      beshort        0x0103        executable (RT Version 2) or obj module
  3269. #>2    byte        0x50        pure
  3270. #>28    belong        >0        not stripped
  3271. #>6    beshort        >0        - version %ld
  3272. 0    beshort        0x0104        shared library
  3273. 0    beshort        0x0105        ctab data
  3274. 0    beshort        0xfe04        structured file
  3275. 0    string        0xabcdef    AIX message catalog
  3276. 0    belong        0x000001f9    AIX compiled message catalog
  3277. 0    string        \<aiaff>    archive
  3278.  
  3279. #------------------------------------------------------------------------------
  3280. # iff:    file(1) magic for Interchange File Format (see also "audio" & "images")
  3281. #
  3282. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  3283. # Arts for file interchange.  It has also been used by Apple, SGI, and
  3284. # especially Commodore-Amiga.
  3285. #
  3286. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  3287. # FORM type, which is followed by the first chunk in the FORM.
  3288.  
  3289. 0    string        FORM        IFF data
  3290. #>4    belong        x        \b, FORM is %d bytes long
  3291. # audio formats
  3292. >8    string        AIFF        \b, AIFF audio
  3293. >8    string        AIFC        \b, AIFF-C compressed audio
  3294. >8    string        8SVX        \b, 8SVX 8-bit sampled sound voice
  3295. >8    string        SAMP        \b, SAMP sampled audio
  3296. # image formats
  3297. >8    string        ILBMBMHD    \b, ILBM interleaved image
  3298. >>20    beshort        x        \b, %d x
  3299. >>22    beshort        x        %d
  3300. >8    string        RGBN        \b, RGBN 12-bit RGB image
  3301. >8    string        RGB8        \b, RGB8 24-bit RGB image
  3302. >8    string        DR2D        \b, DR2D 2-D object
  3303. >8    string        TDDD        \b, TDDD 3-D rendering
  3304. # other formats
  3305. >8    string        FTXT        \b, FTXT formatted text
  3306.  
  3307. #------------------------------------------------------------------------------
  3308. # images:  file(1) magic for image formats (see also "iff")
  3309. #
  3310. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  3311. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  3312. # merging several one- and two-line files into here.
  3313. #
  3314. # little magic: PCX (first byte is 0x0a)
  3315.  
  3316. # Targa - matches `povray', `ppmtotga' and `xv' outputs
  3317. # by Philippe De Muyter <phdm@macqel.be>
  3318. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  3319. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  3320. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  3321. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  3322. # `tgatoppm' recognizes a superset (Index may be anything)
  3323. 1    belong&0xfff7ffff    0x01010000    Targa image data - Map
  3324. >2    byte&8            8        - RLE
  3325. 1    belong&0xfff7ffff    0x00020000    Targa image data - RGB
  3326. >2    byte&8            8        - RLE
  3327. 1    belong&0xfff7ffff    0x00030000    Targa image data - Mono
  3328. >2    byte&8            8        - RLE
  3329.  
  3330. # PBMPLUS images
  3331. # The next byte following the magic is always whitespace.
  3332. 0    string        P1        Netpbm PBM image text
  3333. 0    string        P2        Netpbm PGM image text
  3334. 0    string        P3        Netpbm PPM image text
  3335. 0    string        P4        Netpbm PBM "rawbits" image data
  3336. 0    string        P5        Netpbm PGM "rawbits" image data
  3337. 0    string        P6        Netpbm PPM "rawbits" image data
  3338. 0    string        P7        Netpbm PAM image file
  3339.  
  3340. # From: bryanh@giraffe-data.com (Bryan Henderson)
  3341. 0    string        \117\072    Solitaire Image Recorder format
  3342. >4    string        \013        MGI Type 11
  3343. >4    string        \021        MGI Type 17
  3344. 0    string        .MDA        MicroDesign data
  3345. >21    byte        48        version 2
  3346. >21    byte        51        version 3
  3347. 0    string        .MDP        MicroDesign page data
  3348. >21    byte        48        version 2
  3349. >21    byte        51        version 3
  3350.  
  3351. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  3352. 0    string        IIN1        NIFF image data
  3353.  
  3354. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  3355. # The second word of TIFF files is the TIFF version number, 42, which has
  3356. # never changed.  The TIFF specification recommends testing for it.
  3357. 0    string        MM\x00\x2a    TIFF image data, big-endian
  3358. 0    string        II\x2a\x00    TIFF image data, little-endian
  3359.  
  3360. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  3361. # (Greg Roelofs, newt@uchicago.edu)
  3362. # (Albert Cahalan, acahalan@cs.uml.edu)
  3363. #
  3364. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  3365. #
  3366. 0    string        \x89PNG        PNG image data,
  3367. >4    belong        !0x0d0a1a0a    CORRUPTED,
  3368. >4    belong        0x0d0a1a0a
  3369. >>16    belong        x        %ld x
  3370. >>20    belong        x        %ld,
  3371. >>24    byte        x        %d-bit
  3372. >>25    byte        0        grayscale,
  3373. >>25    byte        2        \b/color RGB,
  3374. >>25    byte        3        colormap,
  3375. >>25    byte        4        gray+alpha,
  3376. >>25    byte        6        \b/color RGBA,
  3377. #>>26    byte        0        deflate/32K,
  3378. >>28    byte        0        non-interlaced
  3379. >>28    byte        1        interlaced
  3380. 1    string        PNG        PNG image data, CORRUPTED
  3381.  
  3382. # GIF
  3383. 0    string        GIF8        GIF image data
  3384. >4    string        7a        \b, version 8%s,
  3385. >4    string        9a        \b, version 8%s,
  3386. >6    leshort        >0        %hd x
  3387. >8    leshort        >0        %hd
  3388. #>10    byte        &0x80        color mapped,
  3389. #>10    byte&0x07    =0x00        2 colors
  3390. #>10    byte&0x07    =0x01        4 colors
  3391. #>10    byte&0x07    =0x02        8 colors
  3392. #>10    byte&0x07    =0x03        16 colors
  3393. #>10    byte&0x07    =0x04        32 colors
  3394. #>10    byte&0x07    =0x05        64 colors
  3395. #>10    byte&0x07    =0x06        128 colors
  3396. #>10    byte&0x07    =0x07        256 colors
  3397.  
  3398. # ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
  3399. # 1 plane, no encoding.
  3400. 0    string        \361\0\100\273    CMU window manager raster image data
  3401. >4    lelong        >0        %d x
  3402. >8    lelong        >0        %d,
  3403. >12    lelong        >0        %d-bit
  3404.  
  3405. # Magick Image File Format
  3406. 0    string        id=ImageMagick    MIFF image data
  3407.  
  3408. # Artisan
  3409. 0    long        1123028772    Artisan image data
  3410. >4    long        1        \b, rectangular 24-bit
  3411. >4    long        2        \b, rectangular 8-bit with colormap
  3412. >4    long        3        \b, rectangular 32-bit (24-bit with matte)
  3413.  
  3414. # FIG (Facility for Interactive Generation of figures), an object-based format
  3415. 0    string        #FIG        FIG image text
  3416. >5    string        x        \b, version %.3s
  3417.  
  3418. # PHIGS
  3419. 0    string        ARF_BEGARF        PHIGS clear text archive
  3420. 0    string        @(#)SunPHIGS        SunPHIGS
  3421. # version number follows, in the form m.n
  3422. >40    string        SunBin            binary
  3423. >32    string        archive            archive
  3424.  
  3425. # GKS (Graphics Kernel System)
  3426. 0    string        GKSM        GKS Metafile
  3427. >24    string        SunGKS        \b, SunGKS
  3428.  
  3429. # CGM image files
  3430. 0    string        BEGMF        clear text Computer Graphics Metafile
  3431. # XXX - questionable magic
  3432. 0    beshort&0xffe0    0x0020        binary Computer Graphics Metafile
  3433. 0    beshort        0x3020        character Computer Graphics Metafile
  3434.  
  3435. # MGR bitmaps  (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  3436. 0    string    yz    MGR bitmap, modern format, 8-bit aligned
  3437. 0    string    zz    MGR bitmap, old format, 1-bit deep, 16-bit aligned
  3438. 0    string    xz    MGR bitmap, old format, 1-bit deep, 32-bit aligned
  3439. 0    string    yx    MGR bitmap, modern format, squeezed
  3440.  
  3441. # Fuzzy Bitmap (FBM) images
  3442. 0    string        %bitmap\0    FBM image data
  3443. >30    long        0x31        \b, mono
  3444. >30    long        0x33        \b, color
  3445.  
  3446. # facsimile data
  3447. 1    string        PC\ Research,\ Inc    group 3 fax data
  3448. >29    byte        0        \b, normal resolution (204x98 DPI)
  3449. >29    byte        1        \b, fine resolution (204x196 DPI)
  3450.  
  3451. # PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt@uchicago.edu)
  3452. 0    string        BM        PC bitmap data
  3453. >14    leshort        12        \b, OS/2 1.x format
  3454. >>18    leshort        x        \b, %d x
  3455. >>20    leshort        x        %d
  3456. >14    leshort        64        \b, OS/2 2.x format
  3457. >>18    leshort        x        \b, %d x
  3458. >>20    leshort        x        %d
  3459. >14    leshort        40        \b, Windows 3.x format
  3460. >>18    lelong        x        \b, %d x
  3461. >>22    lelong        x        %d x
  3462. >>28    leshort        x        %d
  3463. 0    string        IC        PC icon data
  3464. 0    string        PI        PC pointer image data
  3465. 0    string        CI        PC color icon data
  3466. 0    string        CP        PC color pointer image data
  3467. # Conflicts with other entries [BABYL]
  3468. #0    string        BA        PC bitmap array data
  3469.  
  3470. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  3471. # note possible collision with C/REXX entry in c-lang; currently commented out
  3472. 0    string        /*\ XPM\ */    X pixmap image text
  3473.  
  3474. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  3475. 0    leshort        0xcc52        RLE image data,
  3476. >6    leshort        x        %d x
  3477. >8    leshort        x        %d
  3478. >2    leshort        >0        \b, lower left corner: %d
  3479. >4    leshort        >0        \b, lower right corner: %d
  3480. >10    byte&0x1    =0x1        \b, clear first
  3481. >10    byte&0x2    =0x2        \b, no background
  3482. >10    byte&0x4    =0x4        \b, alpha channel
  3483. >10    byte&0x8    =0x8        \b, comment
  3484. >11    byte        >0        \b, %d color channels
  3485. >12    byte        >0        \b, %d bits per pixel
  3486. >13    byte        >0        \b, %d color map channels
  3487.  
  3488. # image file format (Robert Potter, potter@cs.rochester.edu)
  3489. 0    string        Imagefile\ version-    iff image data
  3490. # this adds the whole header (inc. version number), informative but longish
  3491. >10    string        >\0        %s
  3492.  
  3493. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  3494. 0    belong        0x59a66a95    Sun raster image data
  3495. >4    belong        >0        \b, %d x
  3496. >8    belong        >0        %d,
  3497. >12    belong        >0        %d-bit,
  3498. #>16    belong        >0        %d bytes long,
  3499. >20    belong        0        old format,
  3500. #>20    belong        1        standard,
  3501. >20    belong        2        compressed,
  3502. >20    belong        3        RGB,
  3503. >20    belong        4        TIFF,
  3504. >20    belong        5        IFF,
  3505. >20    belong        0xffff        reserved for testing,
  3506. >24    belong        0        no colormap
  3507. >24    belong        1        RGB colormap
  3508. >24    belong        2        raw colormap
  3509. #>28    belong        >0        colormap is %d bytes long
  3510.  
  3511. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  3512. #
  3513. # See
  3514. #    http://reality.sgi.com/grafica/sgiimage.html
  3515. #
  3516. 0    beshort        474        SGI image data
  3517. #>2    byte        0        \b, verbatim
  3518. >2    byte        1        \b, RLE
  3519. #>3    byte        1        \b, normal precision
  3520. >3    byte        2        \b, high precision
  3521. >4    beshort        x        \b, %d-D
  3522. >6    beshort        x        \b, %d x
  3523. >8    beshort        x        %d
  3524. >10    beshort        x        \b, %d channel
  3525. >10    beshort        !1        \bs
  3526. >80    string        >0        \b, "%s"
  3527.  
  3528. 0    string        IT01        FIT image data
  3529. >4    belong        x        \b, %d x
  3530. >8    belong        x        %d x
  3531. >12    belong        x        %d
  3532. #
  3533. 0    string        IT02        FIT image data
  3534. >4    belong        x        \b, %d x
  3535. >8    belong        x        %d x
  3536. >12    belong        x        %d
  3537. #
  3538. 2048    string        PCD_IPI        Kodak Photo CD image pack file
  3539. >0xe02    byte&0x03    0x00        , landscape mode
  3540. >0xe02    byte&0x03    0x01        , portrait mode
  3541. >0xe02    byte&0x03    0x02        , landscape mode
  3542. >0xe02    byte&0x03    0x03        , portrait mode
  3543. 0    string        PCD_OPA        Kodak Photo CD overview pack file
  3544.  
  3545. # FITS format.  Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  3546. # FITS is the Flexible Image Transport System, the de facto standard for
  3547. # data and image transfer, storage, etc., for the astronomical community.
  3548. # (FITS floating point formats are big-endian.)
  3549. 0    string    SIMPLE\ \ =    FITS image data
  3550. >109    string    8        \b, 8-bit, character or unsigned binary integer
  3551. >108    string    16        \b, 16-bit, two's complement binary integer
  3552. >107    string    \ 32        \b, 32-bit, two's complement binary integer
  3553. >107    string    -32        \b, 32-bit, floating point, single precision
  3554. >107    string    -64        \b, 64-bit, floating point, double precision
  3555.  
  3556. # other images
  3557. 0    string    This\ is\ a\ BitMap\ file    Lisp Machine bit-array-file
  3558. 0    string        !!        Bennet Yee's "face" format
  3559.  
  3560. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  3561. # stuff.
  3562. #
  3563. 0    beshort        0x1010        PEX Binary Archive
  3564.  
  3565. # Visio drawings
  3566. 03000    string    Visio\ (TM)\ Drawing    %s
  3567.  
  3568. # Tgif files
  3569. 0    string    \%TGIF\ x         Tgif file version %s
  3570.  
  3571. # DICOM medical imaging data
  3572. 128    string    DICM            DICOM medical imaging data
  3573.  
  3574. # XWD - X-Windows Dump file.
  3575. #   As described in /usr/X11R6/include/X11/XWDFile.h
  3576. #   used by the xwd program.
  3577. #   Bradford Castalia, idaeim, 1/01
  3578. 4    belong    7            XWD X-Windows Dump image data
  3579. >100    string    >\0            \b, "%s"
  3580. >16    belong    x            \b, %dx
  3581. >20    belong    x            \b%dx
  3582. >12    belong    x            \b%d
  3583.  
  3584. # PDS - Planetary Data System
  3585. #   These files use Parameter Value Language in the header section.
  3586. #   Unfortunately, there is no certain magic, but the following
  3587. #   strings have been found to be most likely.
  3588. 0    string    NJPL1I00        PDS (JPL) image data
  3589. 2    string    NJPL1I            PDS (JPL) image data
  3590. 0    string    CCSD3ZF            PDS (CCSD) image data
  3591. 2    string    CCSD3Z            PDS (CCSD) image data
  3592. 0    string    PDS_            PDS image data
  3593. 0    string    LBLSIZE=        PDS (VICAR) image data
  3594.  
  3595. # pM8x: ATARI STAD compressed bitmap format
  3596. #
  3597. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  3598. # p M 8 5/6 xx yy zz data...
  3599. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  3600. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  3601. # most frequent byte, xx and zz are runlength escape codes, where xx is
  3602. # used for runs of yy.
  3603. #
  3604. 0    string    pM85        Atari ST STAD bitmap image data (hor)
  3605. >5    byte    0x00        (white background)
  3606. >5    byte    0xFF        (black background)
  3607. 0    string    pM86        Atari ST STAD bitmap image data (vert)
  3608. >5    byte    0x00        (white background)
  3609. >5    byte    0xFF        (black background)
  3610.  
  3611. # XXX:
  3612. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  3613. # magic.
  3614. # SGI RICE image file <mpruett@sgi.com>
  3615. #0    beshort    0x5249        RICE image
  3616. #>2    beshort    x        v%d
  3617. #>4    beshort    x        (%d x
  3618. #>6    beshort    x        %d)
  3619. #>8    beshort    0        8 bit
  3620. #>8    beshort    1        10 bit
  3621. #>8    beshort    2        12 bit
  3622. #>8    beshort    3        13 bit
  3623. #>10    beshort    0        4:2:2
  3624. #>10    beshort    1        4:2:2:4
  3625. #>10    beshort    2        4:4:4
  3626. #>10    beshort    3        4:4:4:4
  3627. #>12    beshort    1        RGB
  3628. #>12    beshort    2        CCIR601
  3629. #>12    beshort    3        RP175
  3630. #>12    beshort    4        YUV
  3631.  
  3632. #------------------------------------------------------------------------------
  3633. #
  3634. # Marco Schmidt (marcoschmidt@users.sourceforge.net) -- an image  file format
  3635. # for the EPOC operating system, which is used with PDAs like those from Psion
  3636. #
  3637. # see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description
  3638. # of various EPOC file formats
  3639.  
  3640. 0    string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file
  3641. #------------------------------------------------------------------------------
  3642. # impulse tracker:  file(1) magic for Impulse Tracker data files
  3643. #
  3644. # From <collver1@attbi.com>
  3645. # These are the /etc/magic entries to decode modules, instruments, and
  3646. # samples in Impulse Tracker's native format.
  3647.  
  3648. 0    string        IMPS        Impulse Tracker Sample
  3649. >18    byte        &2        16 bit
  3650. >18    byte        ^2        8 bit
  3651. >18    byte        &4        stereo
  3652. >18    byte        ^4        mono
  3653. 0    string        IMPI        Impulse Tracker Instrument
  3654. >28    leshort        !0        ITv%x
  3655. >30    byte        !0        %d samples
  3656. 0    string        IMPM        Impulse Tracker Module
  3657. >40    leshort        !0        compatible w/ITv%x
  3658. >42    leshort        !0        created w/ITv%x
  3659.  
  3660. #------------------------------------------------------------------------------
  3661. # intel:  file(1) magic for x86 Unix
  3662. #
  3663. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  3664. # is in "microsoft").  DOS is in "msdos"; the ambitious soul can do
  3665. # Windows as well.
  3666. #
  3667. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  3668. # whatever comes next (HP-PA Hummingbird?).  OS/2 may also go elsewhere
  3669. # as well, if, as, and when IBM makes it portable.
  3670. #
  3671. # The `versions' should be un-commented if they work for you.
  3672. # (Was the problem just one of endianness?)
  3673. #
  3674. 0    leshort        0502        basic-16 executable
  3675. >12    lelong        >0        not stripped
  3676. #>22    leshort        >0        - version %ld
  3677. 0    leshort        0503        basic-16 executable (TV)
  3678. >12    lelong        >0        not stripped
  3679. #>22    leshort        >0        - version %ld
  3680. 0    leshort        0510        x86 executable
  3681. >12    lelong        >0        not stripped
  3682. 0    leshort        0511        x86 executable (TV)
  3683. >12    lelong        >0        not stripped
  3684. 0    leshort        =0512        iAPX 286 executable small model (COFF)
  3685. >12    lelong        >0        not stripped
  3686. #>22    leshort        >0        - version %ld
  3687. 0    leshort        =0522        iAPX 286 executable large model (COFF)
  3688. >12    lelong        >0        not stripped
  3689. #>22    leshort        >0        - version %ld
  3690. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  3691. 0    leshort        =0514        80386 COFF executable
  3692. >12    lelong        >0        not stripped
  3693. >22    leshort        >0        - version %ld
  3694.  
  3695. #------------------------------------------------------------------------------
  3696. # interleaf:  file(1) magic for InterLeaf TPS:
  3697. #
  3698. 0    string        =\210OPS    Interleaf saved data
  3699. 0    string        =<!OPS        Interleaf document text
  3700. >5    string        ,\ Version\ =    \b, version
  3701. >>17    string        >\0        %.3s
  3702.  
  3703. #------------------------------------------------------------------------------
  3704. # island:  file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
  3705. # "/etc/magic":
  3706. # From: guy@netapp.com (Guy Harris)
  3707. #
  3708. 4    string        pgscriptver    IslandWrite document
  3709. 13    string        DrawFile    IslandDraw document
  3710.  
  3711.  
  3712. #------------------------------------------------------------------------------
  3713. # ispell:  file(1) magic for ispell
  3714. #
  3715. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602.  This magic
  3716. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  3717. # (No other current magic entries collide.)
  3718. #
  3719. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  3720. #
  3721. 0    leshort&0xFFFC    0x9600        little endian ispell
  3722. >0    byte        0        hash file (?),
  3723. >0    byte        1        3.0 hash file,
  3724. >0    byte        2        3.1 hash file,
  3725. >0    byte        3        hash file (?),
  3726. >2    leshort        0x00        8-bit, no capitalization, 26 flags
  3727. >2    leshort        0x01        7-bit, no capitalization, 26 flags
  3728. >2    leshort        0x02        8-bit, capitalization, 26 flags
  3729. >2    leshort        0x03        7-bit, capitalization, 26 flags
  3730. >2    leshort        0x04        8-bit, no capitalization, 52 flags
  3731. >2    leshort        0x05        7-bit, no capitalization, 52 flags
  3732. >2    leshort        0x06        8-bit, capitalization, 52 flags
  3733. >2    leshort        0x07        7-bit, capitalization, 52 flags
  3734. >2    leshort        0x08        8-bit, no capitalization, 128 flags
  3735. >2    leshort        0x09        7-bit, no capitalization, 128 flags
  3736. >2    leshort        0x0A        8-bit, capitalization, 128 flags
  3737. >2    leshort        0x0B        7-bit, capitalization, 128 flags
  3738. >2    leshort        0x0C        8-bit, no capitalization, 256 flags
  3739. >2    leshort        0x0D        7-bit, no capitalization, 256 flags
  3740. >2    leshort        0x0E        8-bit, capitalization, 256 flags
  3741. >2    leshort        0x0F        7-bit, capitalization, 256 flags
  3742. >4    leshort        >0        and %d string characters
  3743. 0    beshort&0xFFFC    0x9600        big endian ispell
  3744. >1    byte        0        hash file (?),
  3745. >1    byte        1        3.0 hash file,
  3746. >1    byte        2        3.1 hash file,
  3747. >1    byte        3        hash file (?),
  3748. >2    beshort        0x00        8-bit, no capitalization, 26 flags
  3749. >2    beshort        0x01        7-bit, no capitalization, 26 flags
  3750. >2    beshort        0x02        8-bit, capitalization, 26 flags
  3751. >2    beshort        0x03        7-bit, capitalization, 26 flags
  3752. >2    beshort        0x04        8-bit, no capitalization, 52 flags
  3753. >2    beshort        0x05        7-bit, no capitalization, 52 flags
  3754. >2    beshort        0x06        8-bit, capitalization, 52 flags
  3755. >2    beshort        0x07        7-bit, capitalization, 52 flags
  3756. >2    beshort        0x08        8-bit, no capitalization, 128 flags
  3757. >2    beshort        0x09        7-bit, no capitalization, 128 flags
  3758. >2    beshort        0x0A        8-bit, capitalization, 128 flags
  3759. >2    beshort        0x0B        7-bit, capitalization, 128 flags
  3760. >2    beshort        0x0C        8-bit, no capitalization, 256 flags
  3761. >2    beshort        0x0D        7-bit, no capitalization, 256 flags
  3762. >2    beshort        0x0E        8-bit, capitalization, 256 flags
  3763. >2    beshort        0x0F        7-bit, capitalization, 256 flags
  3764. >4    beshort        >0        and %d string characters
  3765. # ispell 4.0 hash files  kromJx <kromJx@crosswinds.net>
  3766. # Ispell 4.0
  3767. 0       string          ISPL            ispell
  3768. >4      long            x               hash file version %d,
  3769. >8      long            x               lexletters %d,
  3770. >12     long            x               lexsize %d,
  3771. >16     long            x               hashsize %d,
  3772. >20     long            x               stblsize %d
  3773. #------------------------------------------------------------
  3774. # Java ByteCode
  3775. # From Larry Schwimmer (schwim@cs.stanford.edu)
  3776. 0    belong        0xcafebabe    compiled Java class data,
  3777. >6    beshort x    version %d.
  3778. >4    beshort x    \b%d
  3779. #------------------------------------------------------------
  3780. # Java serialization
  3781. # From Martin Pool (m.pool@pharos.com.au)
  3782. 0    beshort        0xaced        Java serialization data
  3783. >2    beshort        >0x0004        \b, version %d
  3784.  
  3785. #------------------------------------------------------------------------------
  3786. # JPEG images
  3787. # SunOS 5.5.1 had
  3788. #
  3789. #    0    string        \377\330\377\340    JPEG file
  3790. #    0    string        \377\330\377\356    JPG file
  3791. #
  3792. # both of which turn into "JPEG image data" here.
  3793. #
  3794. 0    beshort        0xffd8        JPEG image data
  3795. >6    string        JFIF        \b, JFIF standard
  3796. >6    string        Exif        \b, EXIF standard
  3797. # The following added by Erik Rossen <rossen@freesurf.ch> 1999-09-06
  3798. # in a vain attempt to add image size reporting for JFIF.  Note that these
  3799. # tests are not fool-proof since some perfectly valid JPEGs are currently
  3800. # impossible to specify in magic(4) format.
  3801. # First, a little JFIF version info:
  3802. >11    byte        x        \b %d.
  3803. >12    byte        x        \b%02d
  3804. # Next, the resolution or aspect ratio of the image:
  3805. >13    byte        0        \b, aspect ratio
  3806. >13    byte        1        \b, resolution (DPI)
  3807. >13    byte        2        \b, resolution (DPCM)
  3808. #>4    beshort        x        \b, segment length %d
  3809. # Next, show thumbnail info, if it exists:
  3810. >18    byte        !0        \b, thumbnail %dx
  3811. >>19    byte        x        \b%d
  3812. # Here things get sticky.  We can do ONE MORE marker segment with
  3813. # indirect addressing, and that's all.  It would be great if we could
  3814. # do pointer arithemetic like in an assembler language.  Christos?
  3815. # And if there was some sort of looping construct to do searches, plus a few
  3816. # named accumulators, it would be even more effective...
  3817. # At least we can show a comment if no other segments got inserted before:
  3818. >(4.S+5)    byte        0xFE
  3819. >>(4.S+8)    string        >\0        \b, "%s"
  3820. #>(4.S+5)    byte        0xFE        \b, comment
  3821. #>>(4.S+6)    beshort        x        \b length=%d
  3822. #>>(4.S+8)    string        >\0        \b, "%s"
  3823. # Or, we can show the encoding type (I've included only the three most common)
  3824. # and image dimensions if we are lucky and the SOFn (image segment) is here:
  3825. >(4.S+5)    byte        0xC0        \b, baseline
  3826. >>(4.S+6)    byte        x        \b, precision %d
  3827. >>(4.S+7)    beshort        x        \b, %dx
  3828. >>(4.S+9)    beshort        x        \b%d
  3829. >(4.S+5)    byte        0xC1        \b, extended sequential
  3830. >>(4.S+6)    byte        x        \b, precision %d
  3831. >>(4.S+7)    beshort        x        \b, %dx
  3832. >>(4.S+9)    beshort        x        \b%d
  3833. >(4.S+5)    byte        0xC2        \b, progressive
  3834. >>(4.S+6)    byte        x        \b, precision %d
  3835. >>(4.S+7)    beshort        x        \b, %dx
  3836. >>(4.S+9)    beshort        x        \b%d
  3837. # I've commented-out quantisation table reporting.  I doubt anyone cares yet.
  3838. #>(4.S+5)    byte        0xDB        \b, quantisation table
  3839. #>>(4.S+6)    beshort        x        \b length=%d
  3840. >14    beshort        x        \b, %d x
  3841. >16    beshort        x        \b %d
  3842.  
  3843. # HSI is Handmade Software's proprietary JPEG encoding scheme
  3844. 0    string        hsi1        JPEG image data, HSI proprietary
  3845.  
  3846. #------------------------------------------------------------------------------
  3847. # karma:  file(1) magic for Karma data files
  3848. #
  3849. # From <rgooch@atnf.csiro.au>
  3850.  
  3851. 0    string        KarmaRHD Version    Karma Data Structure Version
  3852. >16    belong        x        %lu
  3853. #------------------------------------------------------------------------------
  3854. # DEC SRC Virtual Paper: Lectern files
  3855. # Karl M. Hegbloom <karlheg@inetarena.com>
  3856. 0    string    lect    DEC SRC Virtual Paper Lectern file
  3857.  
  3858. #------------------------------------------------------------------------------
  3859. # lex:  file(1) magic for lex
  3860. #
  3861. #    derived empirically, your offsets may vary!
  3862. 53    string        yyprevious    C program text (from lex)
  3863. >3    string        >\0         for %s
  3864. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  3865. 21    string        generated\ by\ flex    C program text (from flex)
  3866. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  3867. 0    string        %{        lex description text
  3868.  
  3869. #------------------------------------------------------------------------------
  3870. # lif:  file(1) magic for lif
  3871. #
  3872. # (Daniel Quinlan <quinlan@yggdrasil.com>)
  3873. #
  3874. 0    beshort        0x8000        lif file
  3875.  
  3876. #------------------------------------------------------------------------------
  3877. # linux:  file(1) magic for Linux files
  3878. #
  3879. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  3880. # The following basic Linux magic is useful for reference, but using
  3881. # "long" magic is a better practice in order to avoid collisions.
  3882. #
  3883. # 2    leshort        100        Linux/i386
  3884. # >0    leshort        0407        impure executable (OMAGIC)
  3885. # >0    leshort        0410        pure executable (NMAGIC)
  3886. # >0    leshort        0413        demand-paged executable (ZMAGIC)
  3887. # >0    leshort        0314        demand-paged executable (QMAGIC)
  3888. #
  3889. 0    lelong        0x00640107    Linux/i386 impure executable (OMAGIC)
  3890. >16    lelong        0        \b, stripped
  3891. 0    lelong        0x00640108    Linux/i386 pure executable (NMAGIC)
  3892. >16    lelong        0        \b, stripped
  3893. 0    lelong        0x0064010b    Linux/i386 demand-paged executable (ZMAGIC)
  3894. >16    lelong        0        \b, stripped
  3895. 0    lelong        0x006400cc    Linux/i386 demand-paged executable (QMAGIC)
  3896. >16    lelong        0        \b, stripped
  3897. #
  3898. 0    string        \007\001\000    Linux/i386 object file
  3899. >20    lelong        >0x1020        \b, DLL library
  3900. # Linux-8086 stuff:
  3901. 0    string        \01\03\020\04    Linux-8086 impure executable
  3902. >28    long        !0        not stripped
  3903. 0    string        \01\03\040\04    Linux-8086 executable
  3904. >28    long        !0        not stripped
  3905. #
  3906. 0    string        \243\206\001\0    Linux-8086 object file
  3907. #
  3908. 0    string        \01\03\020\20    Minix-386 impure executable
  3909. >28    long        !0        not stripped
  3910. 0    string        \01\03\040\20    Minix-386 executable
  3911. >28    long        !0        not stripped
  3912. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  3913. 216    lelong        0421        Linux/i386 core file
  3914. >220    string        >\0        of '%s'
  3915. >200    lelong        >0        (signal %d)
  3916. #
  3917. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  3918. # this can be overridden by the DOS executable (COM) entry
  3919. 2    string        LILO        Linux/i386 LILO boot/chain loader
  3920. #
  3921. # Debian Packages, from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  3922. 0    string        0.9
  3923. >8    byte        0x0a        old Debian Binary Package
  3924. >>3    byte        >0        \b, created by dpkg 0.9%c
  3925. >>4    byte        >0        pl%c
  3926. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  3927. 0    leshort        0x0436        Linux/i386 PC Screen Font data,
  3928. >2    byte        0        256 characters, no directory,
  3929. >2    byte        1        512 characters, no directory,
  3930. >2    byte        2        256 characters, Unicode directory,
  3931. >2    byte        3        512 characters, Unicode directory,
  3932. >3    byte        >0        8x%d
  3933. # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
  3934. 4086    string        SWAP-SPACE    Linux/i386 swap file
  3935. # according to man page of mkswap (8) March 1999
  3936. 4086    string        SWAPSPACE2    Linux/i386 swap file (new style)
  3937. # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  3938. #
  3939. #    from Erik Troan (ewt@redhat.com) examining od dumps, so this
  3940. #        could be wrong
  3941. #      updated by David Mosberger (davidm@azstarnet.com) based on
  3942. #      GNU BFD and MIPS info found below.
  3943. #
  3944. 0    leshort        0x0183        ECOFF alpha
  3945. >24    leshort        0407        executable
  3946. >24    leshort        0410        pure
  3947. >24    leshort        0413        demand paged
  3948. >8    long        >0        not stripped
  3949. >8    long        0        stripped
  3950. >23    leshort        >0        - version %ld.
  3951. #
  3952. # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
  3953. # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  3954. # and Nicolßs Lichtmaier <nick@debian.org>
  3955. # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  3956. 514        string    HdrS        Linux kernel
  3957. >518        leshort    >0
  3958. >>529        byte    0        zImage data,
  3959. >>529        byte    1        bzImage data,
  3960. >0x048c        byte    0x31
  3961. >>0x048c    string    x        version %s
  3962. >0x0493        byte    0x31
  3963. >>0x0493    string    x        version %s
  3964. >0x048c        byte    0x32
  3965. >>0x048c    string    x        version %s
  3966. >0x0493        byte    0x32
  3967. >>0x0493    string    x        version %s
  3968. >0x04df        byte    0x32
  3969. >>0x04df    string    x        version %s
  3970. >0x04fb        byte    0x32
  3971. >>0x04fb    string    x        version %s
  3972. # This also matches new kernels, which were caught above by "HdrS".
  3973. 0        belong    0xb8c0078e    Linux kernel
  3974. >0x1e3        string    Loading        version 1.3.79 or older
  3975. >0x1e9        string    Loading        from prehistoric times
  3976. # LSM entries - Nicolßs Lichtmaier <nick@feedback.net.ar>
  3977. 0    string    Begin3    Linux Software Map entry text
  3978.  
  3979. ############################################################################
  3980. # Linux kernel versions
  3981.  
  3982. 0        string        \xb8\xc0\x07\x8e\xd8\xb8\x00\x90    Linux
  3983. >497        leshort        0        x86 boot sector
  3984. >>514        belong        0x8e    of a kernel from the dawn of time!
  3985. >>514        belong        0x908ed8b4    version 0.99-1.1.42
  3986. >>514        belong        0x908ed8b8    for memtest86
  3987.  
  3988. >497        leshort        !0        x86 kernel
  3989. >>504        leshort        >0        RAMdisksize=%u KB
  3990. >>502        leshort        >0        swap=0x%X
  3991. >>508        leshort        >0        root=0x%X
  3992. >>>498        leshort        1        \b-ro
  3993. >>>498        leshort        0        \b-rw
  3994. >>506        leshort        0xFFFF        vga=normal
  3995. >>506        leshort        0xFFFE        vga=extended
  3996. >>506        leshort        0xFFFD        vga=ask
  3997. >>506        leshort        >0        vga=%d
  3998. >>514        belong        0x908ed881    version 1.1.43-1.1.45
  3999. >>514        belong        0x15b281cd
  4000. >>>0xa8e    belong        0x55AA5a5a    version 1.1.46-1.2.13,1.3.0
  4001. >>>0xa99    belong        0x55AA5a5a    version 1.3.1,2
  4002. >>>0xaa3    belong        0x55AA5a5a    version 1.3.3-1.3.30
  4003. >>>0xaa6    belong        0x55AA5a5a    version 1.3.31-1.3.41
  4004. >>>0xb2b    belong        0x55AA5a5a    version 1.3.42-1.3.45
  4005. >>>0xaf7    belong        0x55AA5a5a    version 1.3.46-1.3.72
  4006. >>514        string        HdrS
  4007. >>>518        leshort        >0x1FF
  4008. >>>>529        byte        0        \b, zImage
  4009. >>>>529        byte        1        \b, bzImage
  4010. >>>>(526.s+0x200) string     >\0        \b, version %s
  4011.  
  4012. # Linux boot sector thefts.
  4013. 0        belong        0xb8c0078e    Linux
  4014. >0x1e6        belong        0x454c4b53    ELKS Kernel
  4015. >0x1e6        belong        !0x454c4b53    style boot sector
  4016.  
  4017. ############################################################################
  4018. # Linux 8086 executable
  4019. 0    lelong&0xFF0000FF 0xC30000E9    Linux-Dev86 executable, headerless
  4020. >5    string        .        
  4021. >>4    string        >\0        \b, libc version %s
  4022.  
  4023. 0    lelong&0xFF00FFFF 0x4000301    Linux-8086 executable
  4024. >2    byte&0x01    !0        \b, unmapped zero page
  4025. >2    byte&0x20    0        \b, impure
  4026. >2    byte&0x20    !0
  4027. >>2    byte&0x10    !0        \b, A_EXEC
  4028. >2    byte&0x02    !0        \b, A_PAL
  4029. >2    byte&0x04    !0        \b, A_NSYM
  4030. >2    byte&0x08    !0        \b, A_STAND
  4031. >2    byte&0x40    !0        \b, A_PURE
  4032. >2    byte&0x80    !0        \b, A_TOVLY
  4033. >28     long            !0              \b, not stripped
  4034. >37    string        .        
  4035. >>36    string        >\0        \b, libc version %s
  4036.  
  4037. # 0    lelong&0xFF00FFFF 0x10000301    ld86 I80386 executable
  4038. # 0    lelong&0xFF00FFFF 0xB000301    ld86 M68K executable
  4039. # 0    lelong&0xFF00FFFF 0xC000301    ld86 NS16K executable
  4040. # 0    lelong&0xFF00FFFF 0x17000301    ld86 SPARC executable
  4041.  
  4042.  
  4043. #------------------------------------------------------------------------------
  4044. # lisp:  file(1) magic for lisp programs
  4045. #
  4046. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  4047.  
  4048. # This is a guess, but a good one.
  4049. 0    string    ;;            Lisp/Scheme program text
  4050.  
  4051. # Emacs 18 - this is always correct, but not very magical.
  4052. 0    string    \012(            Emacs v18 byte-compiled Lisp data
  4053. # Emacs 19+ - ver. recognition added by Ian Springer
  4054. # Also applies to XEmacs 19+ .elc files; could tell them apart if we had regexp
  4055. # support or similar - Chris Chittleborough <cchittleborough@yahoo.com.au>
  4056. 0    string    ;ELC            
  4057. >4    byte    >19            
  4058. >4    byte    <32            Emacs/XEmacs v%d byte-compiled Lisp data
  4059.  
  4060. # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
  4061. 0    string    (SYSTEM::VERSION\040'    CLISP byte-compiled Lisp program text
  4062. 0    long    0x70768BD2        CLISP memory image data
  4063. 0    long    0xD28B7670        CLISP memory image data, other endian
  4064.  
  4065. # Files produced by GNU gettext
  4066. 0    long    0xDE120495        GNU-format message catalog data
  4067. 0    long    0x950412DE        GNU-format message catalog data
  4068.  
  4069. #.com and .bin for MIT scheme 
  4070. 0    string    \372\372\372\372    MIT scheme (library?)
  4071. #------------------------------------------------------------------------------
  4072. # mach file description
  4073. #
  4074. 0    belong        0xcafebabe    Mach-O fat file
  4075. >4    belong        1        with 1 architecture
  4076. >4    belong        >1
  4077. >>4    belong        x        with %ld architectures        
  4078. #
  4079. 0    belong        0xfeedface    Mach-O
  4080. >12    belong        1        object
  4081. >12    belong        2        executable
  4082. >12    belong        3        shared library
  4083. >12    belong        4        core
  4084. >12    belong        5        preload executable
  4085. >12    belong        >5
  4086. >>12    belong        x        filetype=%ld
  4087. >4    belong        <0
  4088. >>4    belong        x        architecture=%ld
  4089. >4    belong        1        vax
  4090. >4    belong        2        romp
  4091. >4    belong        3        architecture=3
  4092. >4    belong        4        ns32032
  4093. >4    belong        5        ns32332
  4094. >4    belong        6        for m68k architecture
  4095. # from NeXTstep 3.0 <mach/machine.h>
  4096. # i.e. mc680x0_all, ignore
  4097. # >>8    belong        1        (mc68030)
  4098. >>8    belong        2        (mc68040)
  4099. >>8    belong        3        (mc68030 only)
  4100. >4    belong        7        i386
  4101. >4    belong        8        mips
  4102. >4    belong        9        ns32532
  4103. >4    belong        10        architecture=10
  4104. >4    belong        11        hp pa-risc
  4105. >4    belong        12        acorn
  4106. >4    belong        13        m88k
  4107. >4    belong        14        sparc
  4108. >4    belong        15        i860-big
  4109. >4    belong        16        i860
  4110. >4    belong        17        rs6000
  4111. >4    belong        18        powerPC
  4112. >4    belong        >18
  4113. >>4    belong        x        architecture=%ld
  4114.  
  4115. #------------------------------------------------------------------------------
  4116. # macintosh description
  4117. #
  4118. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  4119. # Daniel Quinlan, quinlan@yggdrasil.com
  4120. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  4121. >41    string    x                    \b, version %.3s
  4122.  
  4123. # Stuffit archives are the de facto standard of compression for Macintosh
  4124. # files obtained from most archives. (franklsm@tuns.ca)
  4125. 0    string        SIT!            StuffIt Archive (data)
  4126. >2    string        x            : %s
  4127. 0    string        SITD            StuffIt Deluxe (data)
  4128. >2    string        x            : %s
  4129. 0    string        Seg            StuffIt Deluxe Segment (data)
  4130. >2    string        x            : %s
  4131.  
  4132. # Macintosh Applications and Installation binaries (franklsm@tuns.ca)
  4133. 0    string        APPL            Macintosh Application (data)
  4134. >2    string        x            \b: %s
  4135.  
  4136. # Macintosh System files (franklsm@tuns.ca)
  4137. 0    string        zsys            Macintosh System File (data)
  4138. 0    string        FNDR            Macintosh Finder (data)
  4139. 0    string        libr            Macintosh Library (data)
  4140. >2    string        x            : %s
  4141. 0    string        shlb            Macintosh Shared Library (data)
  4142. >2    string        x            : %s
  4143. 0    string        cdev            Macintosh Control Panel (data)
  4144. >2    string        x            : %s
  4145. 0    string        INIT            Macintosh Extension (data)
  4146. >2    string        x            : %s
  4147. 0    string        FFIL            Macintosh Truetype Font (data)
  4148. >2    string        x            : %s
  4149. 0    string        LWFN            Macintosh Postscript Font (data)
  4150. >2    string        x            : %s
  4151.  
  4152. # Additional Macintosh Files (franklsm@tuns.ca)
  4153. 0    string        PACT            Macintosh Compact Pro Archive (data)
  4154. >2    string        x            : %s
  4155. 0    string        ttro            Macintosh TeachText File (data)
  4156. >2    string        x            : %s
  4157. 0    string        TEXT            Macintosh TeachText File (data)
  4158. >2    string        x            : %s
  4159. 0    string        PDF            Macintosh PDF File (data)
  4160. >2    string        x            : %s
  4161.  
  4162. # MacBinary format (Eric Fischer, enf@pobox.com)
  4163. #
  4164. # Unfortunately MacBinary doesn't really have a magic number prior
  4165. # to the MacBinary III format.  The checksum is really the way to
  4166. # do it, but the magic file format isn't up to the challenge.
  4167. #
  4168. # 0    byte        0
  4169. # 1    byte                # filename length
  4170. # 2    string                # filename
  4171. # 65    string                # file type
  4172. # 69    string                # file creator
  4173. # 73    byte                # Finder flags
  4174. # 74    byte        0
  4175. # 75    beshort                # vertical posn in window
  4176. # 77    beshort                # horiz posn in window
  4177. # 79    beshort                # window or folder ID
  4178. # 81    byte                # protected?
  4179. # 82    byte        0
  4180. # 83    belong                # length of data segment
  4181. # 87    belong                # length of resource segment
  4182. # 91    belong                # file creation date
  4183. # 95    belong                # file modification date
  4184. # 99    beshort                # length of comment after resource
  4185. # 101    byte                # new Finder flags
  4186. # 102    string        mBIN        # (only in MacBinary III)
  4187. # 106    byte                # char. code of file name
  4188. # 107    byte                # still more Finder flags
  4189. # 116    belong                # total file length
  4190. # 120    beshort                # length of add'l header
  4191. # 122    byte        129        # for MacBinary II
  4192. # 122    byte        130        # for MacBinary III
  4193. # 123    byte        129        # minimum version that can read fmt
  4194. # 124    beshort                # checksum
  4195. #
  4196. # This attempts to use the version numbers as a magic number, requiring
  4197. # that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
  4198. # be 0x81.  This works for the files I have, but maybe not for everyone's.
  4199.  
  4200. 122    beshort&0xFCFF    0x8081        Macintosh MacBinary data
  4201.  
  4202. # MacBinary I doesn't have the version number field at all, but MacBinary II
  4203. # has been in use since 1987 so I hope there aren't many really old files
  4204. # floating around that this will miss.  The original spec calls for using
  4205. # the nulls in 0, 74, and 82 as the magic number.
  4206. #
  4207. # Another possibility, that would also work for MacBinary I, is to use
  4208. # the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
  4209. # have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
  4210. # and that 74 will be 0.  So something like
  4211. # 71     belong&0x80804EFF 0x00000000     Macintosh MacBinary data
  4212. # >73    byte&0x01    0x01        \b, inited
  4213. # >73    byte&0x02    0x02        \b, changed
  4214. # >73    byte&0x04    0x04        \b, busy
  4215. # >73    byte&0x08    0x08        \b, bozo
  4216. # >73    byte&0x10    0x10        \b, system
  4217. # >73    byte&0x10    0x20        \b, bundle
  4218. # >73    byte&0x10    0x40        \b, invisible
  4219. # >73    byte&0x10    0x80        \b, locked
  4220.  
  4221. >65    string        x        \b, type "%4.4s"
  4222.  
  4223. >65    string        8BIM        (PhotoShop)
  4224. >65    string        ALB3        (PageMaker 3)
  4225. >65    string        ALB4        (PageMaker 4)
  4226. >65    string        ALT3        (PageMaker 3)
  4227. >65    string        APPL        (application)
  4228. >65    string        AWWP        (AppleWorks word processor)
  4229. >65    string        CIRC        (simulated circuit)
  4230. >65    string        DRWG        (MacDraw)
  4231. >65    string        EPSF        (Encapsulated PostScript)
  4232. >65    string        FFIL        (font suitcase)
  4233. >65    string        FKEY        (function key)
  4234. >65    string        FNDR        (Macintosh Finder)
  4235. >65    string        GIFf        (GIF image)
  4236. >65    string        Gzip        (GNU gzip)
  4237. >65    string        INIT        (system extension)
  4238. >65    string        LIB\         (library)
  4239. >65    string        LWFN        (PostScript font)
  4240. >65    string        MSBC        (Microsoft BASIC)
  4241. >65    string        PACT        (Compact Pro archive)
  4242. >65    string        PDF\         (Portable Document Format)
  4243. >65    string        PICT        (picture)
  4244. >65    string        PNTG        (MacPaint picture)
  4245. >65    string        PREF        (preferences)
  4246. >65    string        PROJ        (Think C project)
  4247. >65    string        QPRJ        (Think Pascal project)
  4248. >65    string        SCFL        (Defender scores)
  4249. >65    string        SCRN        (startup screen)
  4250. >65    string        SITD        (StuffIt Deluxe)
  4251. >65    string        SPn3        (SuperPaint)
  4252. >65    string        STAK        (HyperCard stack)
  4253. >65    string        Seg\         (StuffIt segment)
  4254. >65    string        TARF        (Unix tar archive)
  4255. >65    string        TEXT        (ASCII)
  4256. >65    string        TIFF        (TIFF image)
  4257. >65    string        TOVF        (Eudora table of contents)
  4258. >65    string        WDBN        (Microsoft Word word processor)
  4259. >65    string        WORD        (MacWrite word processor)
  4260. >65    string        XLS\         (Microsoft Excel)
  4261. >65    string        ZIVM        (compress (.Z))
  4262. >65    string        ZSYS        (Pre-System 7 system file)
  4263. >65    string        acf3        (Aldus FreeHand)
  4264. >65    string        cdev        (control panel)
  4265. >65    string        dfil        (Desk Acessory suitcase)
  4266. >65    string        libr        (library)
  4267. >65    string        nX^d        (WriteNow word processor)
  4268. >65    string        nX^w        (WriteNow dictionary)
  4269. >65    string        rsrc        (resource)
  4270. >65    string        scbk        (Scrapbook)
  4271. >65    string        shlb        (shared library)
  4272. >65    string        ttro        (SimpleText read-only)
  4273. >65    string        zsys        (system file)
  4274.  
  4275. >69    string        x        \b, creator "%4.4s"
  4276.  
  4277. # Somewhere, Apple has a repository of registered Creator IDs.  These are
  4278. # just the ones that I happened to have files from and was able to identify.
  4279.  
  4280. >69    string        8BIM        (Adobe Photoshop)
  4281. >69    string        ALD3        (PageMaker 3)
  4282. >69    string        ALD4        (PageMaker 4)
  4283. >69    string        ALFA        (Alpha editor)
  4284. >69    string        APLS        (Apple Scanner)
  4285. >69    string        APSC        (Apple Scanner)
  4286. >69    string        BRKL        (Brickles)
  4287. >69    string        BTFT        (BitFont)
  4288. >69    string        CCL2         (Common Lisp 2)
  4289. >69    string        CCL\         (Common Lisp)
  4290. >69    string        CDmo        (The Talking Moose)
  4291. >69    string        CPCT        (Compact Pro)
  4292. >69    string        CSOm        (Eudora)
  4293. >69    string        DMOV        (Font/DA Mover)
  4294. >69    string        DSIM        (DigSim)
  4295. >69    string        EDIT        (Macintosh Edit)
  4296. >69    string        ERIK        (Macintosh Finder)
  4297. >69    string        EXTR        (self-extracting archive)
  4298. >69    string        Gzip        (GNU gzip)
  4299. >69    string        KAHL        (Think C)
  4300. >69    string        LWFU        (LaserWriter Utility)
  4301. >69    string        LZIV        (compress)
  4302. >69    string        MACA        (MacWrite)
  4303. >69    string        MACS        (Macintosh operating system)
  4304. >69    string        MAcK        (MacKnowledge terminal emulator)
  4305. >69    string        MLND        (Defender)
  4306. >69    string        MPNT        (MacPaint)
  4307. >69    string        MSBB        (Microsoft BASIC (binary))
  4308. >69    string        MSWD        (Microsoft Word)
  4309. >69    string        NCSA        (NCSA Telnet)
  4310. >69    string        PJMM        (Think Pascal)
  4311. >69    string        PSAL        (Hunt the Wumpus)
  4312. >69    string        PSI2        (Apple File Exchange)
  4313. >69    string        R*ch        (BBEdit)
  4314. >69    string        RMKR        (Resource Maker)
  4315. >69    string        RSED        (Resource Editor)
  4316. >69    string        Rich        (BBEdit)
  4317. >69    string        SIT!        (StuffIt)
  4318. >69    string        SPNT        (SuperPaint)
  4319. >69    string        Unix        (NeXT Mac filesystem)
  4320. >69    string        VIM!        (Vim editor)
  4321. >69    string        WILD        (HyperCard)
  4322. >69    string        XCEL        (Microsoft Excel)
  4323. >69    string        aCa2        (Fontographer)
  4324. >69    string        aca3        (Aldus FreeHand)
  4325. >69    string        dosa        (Macintosh MS-DOS file system)
  4326. >69    string        movr        (Font/DA Mover)
  4327. >69    string        nX^n        (WriteNow)
  4328. >69    string        pdos        (Apple ProDOS file system)
  4329. >69    string        scbk        (Scrapbook)
  4330. >69    string        ttxt        (SimpleText)
  4331. >69    string        ufox        (Foreign File Access)
  4332.  
  4333. # Just in case...
  4334.  
  4335. 102    string        mBIN        MacBinary III data with surprising version number
  4336.  
  4337. # sas magic from Bruce Foster (bef@nwu.edu)
  4338. #
  4339. #0    string        SAS        SAS
  4340. #>8    string        x        %s
  4341. 0    string        SAS        SAS
  4342. >24    string        DATA        data file
  4343. >24    string        CATALOG        catalog
  4344. >24    string        INDEX        data file index
  4345. >24    string        VIEW        data view
  4346. # spss magic for SPSS system and portable files, 
  4347. #     from Bruce Foster (bef@nwu.edu).
  4348.  
  4349. 0    long        0xc1e2c3c9    SPSS Portable File
  4350. >40    string         x        %s
  4351.  
  4352. 0    string        $FL2        SPSS System File
  4353. >24    string        x        %s
  4354.  
  4355. # Macintosh filesystem data
  4356. # From "Tom N Harris" <telliamed@mac.com>
  4357. # The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
  4358. # entries depend on the data arithmetic added after v.35
  4359. # There's also some Pascal strings in here, ditto...
  4360.  
  4361. # The boot block signature, according to IM:Files, is 
  4362. # "for HFS volumes, this field always contains the value 0x4C4B."
  4363. # But if this is true for MFS or HFS+ volumes, I don't know.
  4364. # Alternatively, the boot block is supposed to be zeroed if it's
  4365. # unused, so a simply >0 should suffice.
  4366.  
  4367. 0x400    beshort            0xD2D7        Macintosh MFS data
  4368. >0    beshort            0x4C4B        (bootable)
  4369. >0x40a    beshort            &0x8000        (locked)
  4370. >0x402    beldate-0x7C25B080    x        created: %s,
  4371. >0x406    beldate-0x7C25B080    >0        last backup: %s,
  4372. >0x414    belong            x        block size: %d,
  4373. >0x412    beshort            x        number of blocks: %d,
  4374. >0x424    pstring            x        volume name: %s
  4375.  
  4376. 0x400    beshort            0x4244        Macintosh HFS data
  4377. >0    beshort            0x4C4B        (bootable)
  4378. >0x40a    beshort            &0x8000        (locked)
  4379. >0x40a    beshort            ^0x0100        (mounted)
  4380. >0x40a    beshort            &0x0800        (unclean)
  4381. >0x402    beldate-0x7C25B080    x        created: %s,
  4382. >0x406    beldate-0x7C25B080    x        last modified: %s,
  4383. >0x440    beldate-0x7C25B080    >0        last backup: %s,
  4384. >0x414    belong            x        block size: %d,
  4385. >0x412    beshort            x        number of blocks: %d,
  4386. >0x424    pstring            x        volume name: %s
  4387. #>0x480    beshort            =0x482B        Embedded HFS+ Volume:
  4388. #>>((0x482*(0x414))+(0x41c*512))    x    \b
  4389. # Well, this is (theoretically) how we could do this. But it occurs to
  4390. # me that we likely don't read in a large enough chunk. I don't have any
  4391. # HFS+ volumes to see what a typical offset would be.
  4392.  
  4393. 0x400    beshort            0x482B        Macintosh HFS Extended
  4394. >&2    beshort            x        version %d data
  4395. >0    beshort            0x4C4B        (bootable)
  4396. >&4    belong            ^0x00000100    (mounted)
  4397. >&4    belong            &0x00000800    (unclean)
  4398. >&4    belong            &0x00008000    (locked)
  4399. >&8    string            x        last mounted by: '%.4s',
  4400. # really, that should be treated as a belong and we print a string
  4401. # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
  4402. >&16    beldate-0x7C25B080    x        created: %s,
  4403. >&20    beldate-0x7C25B080    x        last modified: %s,
  4404. >&24    beldate-0x7C25B080    >0        last backup: %s,
  4405. >&28    beldate-0x7C25B080    >0        last checked: %s,
  4406. >&40    belong            x        block size: %d,
  4407. >&44    belong            x        number of blocks: %d,
  4408. >&48    belong            x        free blocks: %d
  4409.  
  4410. # I don't think this is really necessary since it doesn't do much and 
  4411. # anything with a valid driver descriptor will also have a valid
  4412. # partition map
  4413. #0        beshort        0x4552        Apple Device Driver data
  4414. #>&24        beshort        =1        \b, MacOS
  4415.  
  4416. # Is that the partition type a cstring or a pstring? Well, IM says "strings 
  4417. # shorter than 32 bytes must be terminated with NULL" so I'll treat it as a 
  4418. # cstring. Of course, partitions can contain more than four entries, but 
  4419. # what're you gonna do?
  4420. 0x200        beshort        0x504D        Apple Partition data
  4421. >&2        beshort        x        block size: %d
  4422. >&48        string        x        first type: %s,
  4423. >&12        belong        x        number of blocks: %d,
  4424. >(&0x2.S)    beshort        0x504D        
  4425. >>&48        string        x        second type: %s
  4426. >>&12        belong        x        number of blocks: %d,
  4427. >>(&0x2.S)    beshort        0x504D        
  4428. >>>&48        string        x        third type: %s
  4429. >>>&12        belong        x        number of blocks: %d,
  4430. >>>(&0x2.S)    beshort        0x504D        
  4431. >>>>&48        string        x        fourth type: %s
  4432. >>>>&12        belong        x        number of blocks: %d,
  4433. # AFAIK, only the signature is different
  4434. 0x200        beshort        0x5453        Apple Old Partition data
  4435. >&2        beshort        x        block size: %d
  4436. >&48        string        x        first type: %s,
  4437. >&12        belong        x        number of blocks: %d,
  4438. >(&0x2.S)    beshort        0x504D        
  4439. >>&48        string        x        second type: %s
  4440. >>&12        belong        x        number of blocks: %d,
  4441. >>(&0x2.S)    beshort        0x504D        
  4442. >>>&48        string        x        third type: %s
  4443. >>>&12        belong        x        number of blocks: %d,
  4444. >>>(&0x2.S)    beshort        0x504D        
  4445. >>>>&48        string        x        fourth type: %s
  4446. >>>>&12        belong        x        number of blocks: %d,
  4447.  
  4448. #------------------------------------------------------------------------------
  4449. # magic:  file(1) magic for magic files
  4450. #
  4451. 0    string        #\ Magic    magic text file for file(1) cmd
  4452. 0    lelong        0xF11E041C    magic binary file for file(1) cmd
  4453. >4    lelong        x        (version %d) (little endian)
  4454. 0    belong        0xF11E041C    magic binary file for file(1) cmd
  4455. >4    belong        x        (version %d) (big endian)
  4456.  
  4457. #------------------------------------------------------------------------------
  4458. # mail.news:  file(1) magic for mail and news
  4459. #
  4460. # Unfortunately, saved netnews also has From line added in some news software.
  4461. #0    string        From         mail text
  4462. # There are tests to ascmagic.c to cope with mail and news.
  4463. 0    string        Relay-Version:     old news text
  4464. 0    string        #!\ rnews    batched news text
  4465. 0    string        N#!\ rnews    mailed, batched news text
  4466. 0    string        Forward\ to     mail forwarding text
  4467. 0    string        Pipe\ to     mail piping text
  4468. 0    string        Return-Path:    smtp mail text
  4469. 0    string        Path:        news text
  4470. 0    string        Xref:        news text
  4471. 0    string        From:        news or mail text
  4472. 0    string        Article     saved news text
  4473. 0    string        BABYL        Emacs RMAIL text
  4474. 0    string        Received:    RFC 822 mail text
  4475. 0    string        MIME-Version:    MIME entity text
  4476. #0    string        Content-    MIME entity text
  4477.  
  4478. # TNEF files...
  4479. 0    lelong        0x223E9F78    Transport Neutral Encapsulation Format
  4480.  
  4481. # From: Kevin Sullivan <ksulliva@psc.edu>
  4482. 0    string        *mbx*        MBX mail folder
  4483.  
  4484.  
  4485. #------------------------------------------------------------------------------
  4486. # maple:  file(1) magic for maple files
  4487. # "H. Nanosecond" <aldomel@ix.netcom.com>
  4488. # Maple V release 4, a multi-purpose math program
  4489. #
  4490.  
  4491. # maple library .lib
  4492. 0    string    \000MVR4\nI    MapleVr4 library
  4493.  
  4494. # .ind
  4495. # no magic for these :-(
  4496. # they are compiled indexes for maple files
  4497.  
  4498. # .hdb 
  4499. 0    string    \000\004\000\000    Maple help database
  4500.  
  4501. # .mhp
  4502. # this has the form <PACKAGE=name>
  4503. 0    string    \<PACKAGE=    Maple help file
  4504. 0    string    \<HELP\ NAME=    Maple help file
  4505. 0    string    \n\<HELP\ NAME=    Maple help file with extra carriage return at start (yuck)
  4506. 0    string    #\ Newton    Maple help file, old style
  4507. 0    string    #\ daub    Maple help file, old style
  4508. 0    string    #===========    Maple help file, old style
  4509.  
  4510. # .mws
  4511. 0    string    \000\000\001\044\000\221    Maple worksheet
  4512. #this is anomalous
  4513. 0    string    WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000    Maple worksheet, but weird
  4514. # this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
  4515. # that is {VERSION major_version miunor_version computer_type version_string}
  4516. 0    string    {VERSION\     Maple worksheet
  4517. >9    string    >\0    version %.1s.
  4518. >>10    string
  4519. >>>11    string    >\0    %.1s
  4520.  
  4521. # .mps
  4522. 0    string    \0\0\001$    Maple something
  4523. # from byte 4 it is either 'nul E' or 'soh R'
  4524. # I think 'nul E' means a file that was saved as  a different name
  4525. # a sort of revision marking
  4526. # 'soh R' means new 
  4527. >4    string    \000\105    An old revision
  4528. >4    string    \001\122    The latest save
  4529.  
  4530. # .mpl
  4531. # some of these are the same as .mps above
  4532. #0000000 000 000 001 044 000 105 same as .mps
  4533. #0000000 000 000 001 044 001 122 same as .mps
  4534.  
  4535. 0    string    #\n##\ <SHAREFILE=    Maple something
  4536. 0    string    \n#\n##\ <SHAREFILE=    Maple something
  4537. 0    string    ##\ <SHAREFILE=    Maple something
  4538. 0    string    #\r##\ <SHAREFILE=    Maple something
  4539. 0    string    \r#\r##\ <SHAREFILE=    Maple something
  4540. 0    string    #\ \r##\ <DESCRIBE>    Maple something anomalous.
  4541.  
  4542. #------------------------------------------------------------------------------
  4543. # mathematica:  file(1) magic for mathematica files
  4544. # "H. Nanosecond" <aldomel@ix.netcom.com>
  4545. # Mathematica a multi-purpose math program
  4546. # versions 2.2 and 3.0
  4547.  
  4548. #mathematica .mb
  4549. 0    string    \064\024\012\000\035\000\000\000    Mathematica version 2 notebook
  4550. 0    string    \064\024\011\000\035\000\000\000    Mathematica version 2 notebook
  4551.  
  4552. # .ma
  4553. # multiple possibilites:
  4554.  
  4555. 0    string    (*^\n\n::[\011frontEndVersion\ =\     Mathematica notebook
  4556. #>41    string    >\0    %s
  4557.  
  4558. #0    string    (*^\n\n::[\011palette    Mathematica notebook version 2.x
  4559.  
  4560. #0    string    (*^\n\n::[\011Information    Mathematica notebook version 2.x
  4561. #>675    string    >\0    %s #doesn't work well
  4562.  
  4563. # there may be 'cr' instread of 'nl' in some does this matter?
  4564.  
  4565. # generic:
  4566. 0    string    (*^\r\r::[\011    Mathematica notebook version 2.x
  4567. 0    string    \(\*\^\r\n\r\n\:\:\[\011    Mathematica notebook version 2.x
  4568. 0    string    (*^\015            Mathematica notebook version 2.x
  4569. 0    string    (*^\n\r\n\r::[\011    Mathematica notebook version 2.x
  4570. 0    string    (*^\r::[\011    Mathematica notebook version 2.x
  4571. 0    string    (*^\r\n::[\011    Mathematica notebook version 2.x
  4572. 0    string    (*^\n\n::[\011    Mathematica notebook version 2.x
  4573. 0    string    (*^\n::[\011    Mathematica notebook version 2.x
  4574.  
  4575.  
  4576. # Mathematica .mx files
  4577.  
  4578. #0    string    (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*)    Mathematica binary file
  4579. 0    string    (*This\ is\ a\ Mathematica\ binary\     Mathematica binary file
  4580. #>71    string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000    
  4581. # >71... is optional
  4582. >88    string    >\0    from %s
  4583.  
  4584.  
  4585. # Mathematica files PBF:
  4586. # 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
  4587. 0    string    MMAPBF\000\001\000\000\000\203\000\001\000    Mathematica PBF (fonts I think)
  4588.  
  4589. # .ml files  These are menu resources I think
  4590. # these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\ 
  4591. # how to put that into a magic rule?
  4592. 4    string    \ A~    MAthematica .ml file
  4593.  
  4594. # .nb files
  4595. #too long 0    string    (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook    Mathematica 3.0 notebook
  4596. 0    string    (***********************    Mathematica 3.0 notebook
  4597.  
  4598. # other (* matches it is a comment start in these langs
  4599. 0    string    (*    Mathematica, or Pascal,  Modula-2 or 3 code
  4600. #------------------------------------------------------------------------------
  4601. # Mavroyanopoulos Nikos <nmav@hellug.gr>
  4602. # mcrypt:   file(1) magic for mcrypt 2.2.x;
  4603. 0    string        \0m\3        mcrypt 2.5 encrypted data,
  4604. >4    string        >\0        algorithm: %s,
  4605. >>&1    leshort        >0        keysize: %d bytes,
  4606. >>>&0    string        >\0        mode: %s,
  4607.  
  4608. 0    string        \0m\2        mcrypt 2.2 encrypted data,
  4609. >3    byte        0        algorithm: blowfish-448,
  4610. >3    byte        1        algorithm: DES,
  4611. >3    byte        2        algorithm: 3DES,
  4612. >3    byte        3        algorithm: 3-WAY,
  4613. >3    byte        4        algorithm: GOST,
  4614. >3    byte        6        algorithm: SAFER-SK64,
  4615. >3    byte        7        algorithm: SAFER-SK128,
  4616. >3    byte        8        algorithm: CAST-128,
  4617. >3    byte        9        algorithm: xTEA,
  4618. >3    byte        10        algorithm: TWOFISH-128,
  4619. >3    byte        11        algorithm: RC2,
  4620. >3    byte        12        algorithm: TWOFISH-192,
  4621. >3    byte        13        algorithm: TWOFISH-256,
  4622. >3    byte        14        algorithm: blowfish-128,
  4623. >3    byte        15        algorithm: blowfish-192,
  4624. >3    byte        16        algorithm: blowfish-256,
  4625. >3    byte        100        algorithm: RC6,
  4626. >3    byte        101        algorithm: IDEA,
  4627. >4    byte        0        mode: CBC,
  4628. >4    byte        1        mode: ECB,
  4629. >4    byte        2        mode: CFB,
  4630. >4    byte        3        mode: OFB,
  4631. >4    byte        4        mode: nOFB,
  4632. >5    byte        0        keymode: 8bit
  4633. >5    byte        1        keymode: 4bit
  4634. >5    byte        2        keymode: SHA-1 hash
  4635. >5    byte        3        keymode: MD5 hash
  4636. #------------------------------------------------------------------------------
  4637. # mime:  file(1) magic for MIME encoded files
  4638. #
  4639. 0    string        Content-Type:\
  4640. >14    string        >\0        %s
  4641. 0    string        Content-Type:
  4642. >13    string        >\0        %s
  4643.  
  4644. #------------------------------------------------------------------------------
  4645. # mips:  file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.)
  4646. #                         Dec Ultrix (MIPS)
  4647. # all of SGI's *current* machines and OSes run in big-endian mode on the
  4648. # MIPS machines, as far as I know.
  4649. #
  4650. # XXX - what is the blank "-" line?
  4651. #
  4652. # kbd file definitions
  4653. 0    string    kbd!map        kbd map file
  4654. >8    byte    >0        Ver %d:
  4655. >10    short    >0        with %d table(s)
  4656. 0    belong    0407        old SGI 68020 executable
  4657. 0    belong    0410        old SGI 68020 pure executable
  4658. 0    beshort    0x8765        disk quotas file
  4659. 0    beshort    0x0506        IRIS Showcase file
  4660. >2    byte    0x49        -
  4661. >3    byte    x        - version %ld
  4662. 0    beshort    0x0226        IRIS Showcase template
  4663. >2    byte    0x63        -
  4664. >3    byte    x        - version %ld
  4665. 0    belong    0x5343464d    IRIS Showcase file
  4666. >4    byte    x        - version %ld
  4667. 0    belong    0x5443464d    IRIS Showcase template
  4668. >4    byte    x        - version %ld
  4669. 0    belong    0xdeadbabe    IRIX Parallel Arena
  4670. >8    belong    >0        - version %ld
  4671. #
  4672. 0    beshort    0x0160        MIPSEB ECOFF executable
  4673. >20    beshort    0407        (impure)
  4674. >20    beshort    0410        (swapped)
  4675. >20    beshort    0413        (paged)
  4676. >8    belong    >0        not stripped
  4677. >8    belong    0        stripped
  4678. >22    byte    x        - version %ld
  4679. >23    byte    x        .%ld
  4680. #
  4681. 0    beshort    0x0162        MIPSEL-BE ECOFF executable
  4682. >20    beshort    0407        (impure)
  4683. >20    beshort    0410        (swapped)
  4684. >20    beshort    0413        (paged)
  4685. >8    belong    >0        not stripped
  4686. >8    belong    0        stripped
  4687. >23    byte    x        - version %d
  4688. >22    byte    x        .%ld
  4689. #
  4690. 0    beshort    0x6001        MIPSEB-LE ECOFF executable
  4691. >20    beshort    03401        (impure)
  4692. >20    beshort    04001        (swapped)
  4693. >20    beshort    05401        (paged)
  4694. >8    belong    >0        not stripped
  4695. >8    belong    0        stripped
  4696. >23    byte    x        - version %d
  4697. >22    byte    x        .%ld
  4698. #
  4699. 0    beshort    0x6201        MIPSEL ECOFF executable
  4700. >20    beshort    03401        (impure)
  4701. >20    beshort    04001        (swapped)
  4702. >20    beshort    05401        (paged)
  4703. >8    belong    >0        not stripped
  4704. >8    belong    0        stripped
  4705. >23    byte    x        - version %ld
  4706. >22    byte    x        .%ld
  4707. #
  4708. # MIPS 2 additions
  4709. #
  4710. 0    beshort    0x0163        MIPSEB MIPS-II ECOFF executable
  4711. >20    beshort    0407        (impure)
  4712. >20    beshort    0410        (swapped)
  4713. >20    beshort    0413        (paged)
  4714. >8    belong    >0        not stripped
  4715. >8    belong    0        stripped
  4716. >22    byte    x        - version %ld
  4717. >23    byte    x        .%ld
  4718. #
  4719. 0    beshort    0x0166        MIPSEL-BE MIPS-II ECOFF executable
  4720. >20    beshort    0407        (impure)
  4721. >20    beshort    0410        (swapped)
  4722. >20    beshort    0413        (paged)
  4723. >8    belong    >0        not stripped
  4724. >8    belong    0        stripped
  4725. >22    byte    x        - version %ld
  4726. >23    byte    x        .%ld
  4727. #
  4728. 0    beshort    0x6301        MIPSEB-LE MIPS-II ECOFF executable
  4729. >20    beshort    03401        (impure)
  4730. >20    beshort    04001        (swapped)
  4731. >20    beshort    05401        (paged)
  4732. >8    belong    >0        not stripped
  4733. >8    belong    0        stripped
  4734. >23    byte    x        - version %ld
  4735. >22    byte    x        .%ld
  4736. #
  4737. 0    beshort    0x6601        MIPSEL MIPS-II ECOFF executable
  4738. >20    beshort    03401        (impure)
  4739. >20    beshort    04001        (swapped)
  4740. >20    beshort    05401        (paged)
  4741. >8    belong    >0        not stripped
  4742. >8    belong    0        stripped
  4743. >23    byte    x        - version %ld
  4744. >22    byte    x        .%ld
  4745. #
  4746. # MIPS 3 additions
  4747. #
  4748. 0    beshort    0x0140        MIPSEB MIPS-III ECOFF executable
  4749. >20    beshort    0407        (impure)
  4750. >20    beshort    0410        (swapped)
  4751. >20    beshort    0413        (paged)
  4752. >8    belong    >0        not stripped
  4753. >8    belong    0        stripped
  4754. >22    byte    x        - version %ld
  4755. >23    byte    x        .%ld
  4756. #
  4757. 0    beshort    0x0142        MIPSEL-BE MIPS-III ECOFF executable
  4758. >20    beshort    0407        (impure)
  4759. >20    beshort    0410        (swapped)
  4760. >20    beshort    0413        (paged)
  4761. >8    belong    >0        not stripped
  4762. >8    belong    0        stripped
  4763. >22    byte    x        - version %ld
  4764. >23    byte    x        .%ld
  4765. #
  4766. 0    beshort    0x4001        MIPSEB-LE MIPS-III ECOFF executable
  4767. >20    beshort    03401        (impure)
  4768. >20    beshort    04001        (swapped)
  4769. >20    beshort    05401        (paged)
  4770. >8    belong    >0        not stripped
  4771. >8    belong    0        stripped
  4772. >23    byte    x        - version %ld
  4773. >22    byte    x        .%ld
  4774. #
  4775. 0    beshort    0x4201        MIPSEL MIPS-III ECOFF executable
  4776. >20    beshort    03401        (impure)
  4777. >20    beshort    04001        (swapped)
  4778. >20    beshort    05401        (paged)
  4779. >8    belong    >0        not stripped
  4780. >8    belong    0        stripped
  4781. >23    byte    x        - version %ld
  4782. >22    byte    x        .%ld
  4783. #
  4784. 0    beshort    0x180        MIPSEB Ucode
  4785. 0    beshort    0x182        MIPSEL-BE Ucode
  4786. # 32bit core file
  4787. 0    belong    0xdeadadb0    IRIX core dump
  4788. >4    belong    1        of
  4789. >16    string    >\0        '%s'
  4790. # 64bit core file
  4791. 0    belong    0xdeadad40    IRIX 64-bit core dump
  4792. >4    belong    1        of
  4793. >16    string    >\0        '%s'
  4794. # N32bit core file
  4795. 0       belong    0xbabec0bb    IRIX N32 core dump
  4796. >4      belong    1               of
  4797. >16     string    >\0             '%s'
  4798. # New style crash dump file
  4799. 0    string    \x43\x72\x73\x68\x44\x75\x6d\x70    IRIX vmcore dump of
  4800. >36    string    >\0                    '%s'
  4801. # Trusted IRIX info
  4802. 0    string    SGIAUDIT    SGI Audit file
  4803. >8    byte    x        - version %d
  4804. >9    byte    x        .%ld
  4805. #
  4806. 0    string    WNGZWZSC    Wingz compiled script
  4807. 0    string    WNGZWZSS    Wingz spreadsheet
  4808. 0    string    WNGZWZHP    Wingz help file
  4809. #
  4810. 0    string    \#Inventor V    IRIS Inventor 1.0 file
  4811. 0    string    \#Inventor V2    Open Inventor 2.0 file
  4812. # GLF is OpenGL stream encoding
  4813. 0    string    glfHeadMagic();        GLF_TEXT
  4814. 4    belong    0x7d000000        GLF_BINARY_LSB_FIRST
  4815. 4    belong    0x0000007d        GLF_BINARY_MSB_FIRST
  4816. # GLS is OpenGL stream encoding; GLS is the successor of GLF
  4817. 0    string    glsBeginGLS(        GLS_TEXT
  4818. 4    belong    0x10000000        GLS_BINARY_LSB_FIRST
  4819. 4    belong    0x00000010        GLS_BINARY_MSB_FIRST
  4820.  
  4821. #------------------------------------------------------------------------------
  4822. # mirage:  file(1) magic for Mirage executables
  4823. #
  4824. # XXX - byte order?
  4825. #
  4826. 0    long    31415        Mirage Assembler m.out executable
  4827.  
  4828. #------------------------------------------------------------------------------
  4829. # mkid:  file(1) magic for mkid(1) databases
  4830. #
  4831. # ID is the binary tags database produced by mkid(1).
  4832. #
  4833. # XXX - byte order?
  4834. #
  4835. 0    string        \311\304    ID tags data
  4836. >2    short        >0        version %d
  4837.  
  4838. #------------------------------------------------------------------------------
  4839. # mmdf:  file(1) magic for MMDF mail files
  4840. #
  4841. 0    string    \001\001\001\001    MMDF mailbox
  4842.  
  4843. #------------------------------------------------------------------------------
  4844. # mlssa: file(1) magic for MLSSA datafiles
  4845. #
  4846. 0        lelong        0xffffabcd    MLSSA datafile,
  4847. >4        leshort        x        algorithm %d,
  4848. >10        lelong        x        %d samples
  4849. #------------------------------------------------------------------------------
  4850. # modem:  file(1) magic for modem programs
  4851. #
  4852. # From: Florian La Roche <florian@knorke.saar.de>
  4853. 4    string        Research,    Digifax-G3-File
  4854. >29    byte        1        , fine resolution
  4855. >29    byte        0        , normal resolution
  4856.  
  4857. 0    short        0x0100        raw G3 data, byte-padded
  4858. 0    short        0x1400        raw G3 data
  4859. #
  4860. # Magic data for vgetty voice formats
  4861. # (Martin Seine & Marc Eberhard)
  4862.  
  4863. #
  4864. # raw modem data version 1
  4865. #
  4866. 0    string    RMD1      raw modem data
  4867. >4   string    >\0       (%s /
  4868. >20  short     >0        compression type 0x%04x)
  4869.  
  4870. #
  4871. # portable voice format 1
  4872. #
  4873. 0    string    PVF1\n         portable voice format
  4874. >5   string    >\0       (binary %s)
  4875.  
  4876. #
  4877. # portable voice format 2
  4878. #
  4879. 0    string    PVF2\n         portable voice format
  4880. >5   string >\0          (ascii %s)
  4881.  
  4882.  
  4883. #------------------------------------------------------------------------------
  4884. # motorola:  file(1) magic for Motorola 68K and 88K binaries
  4885. #
  4886. # 68K
  4887. #
  4888. 0    beshort        0520        mc68k COFF
  4889. >18    beshort        ^00000020    object
  4890. >18    beshort        &00000020    executable
  4891. >12    belong        >0        not stripped
  4892. >168    string        .lowmem        Apple toolbox
  4893. >20    beshort        0407        (impure)
  4894. >20    beshort        0410        (pure)
  4895. >20    beshort        0413        (demand paged)
  4896. >20    beshort        0421        (standalone)
  4897. 0    beshort        0521        mc68k executable (shared)
  4898. >12    belong        >0        not stripped
  4899. 0    beshort        0522        mc68k executable (shared demand paged)
  4900. >12    belong        >0        not stripped
  4901. #
  4902. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  4903. #
  4904. 0    beshort        0554        68K BCS executable
  4905. #
  4906. # 88K
  4907. #
  4908. # Motorola/88Open BCS
  4909. #
  4910. 0    beshort        0555        88K BCS executable
  4911. #
  4912. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  4913. 0   string      S0          Motorola S-Record; binary data in text format
  4914.  
  4915. # ATARI ST relocatable PRG
  4916. #
  4917. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001
  4918. # (according to Roland Waldi, Oct 21, 1987)
  4919. # besides the magic 0x601a, the text segment size is checked to be
  4920. # not larger than 1 MB (which is a lot on ST).
  4921. # The additional 0x601b distinction I took from Doug Lee's magic.
  4922. 0    belong&0xFFFFFFF0    0x601A0000    Atari ST M68K contiguous executable
  4923. >2    belong            x        (txt=%ld,
  4924. >6    belong            x        dat=%ld,
  4925. >10    belong            x        bss=%ld,
  4926. >14    belong            x        sym=%ld)
  4927. 0    belong&0xFFFFFFF0    0x601B0000    Atari ST M68K non-contig executable
  4928. >2    belong            x        (txt=%ld,
  4929. >6    belong            x        dat=%ld,
  4930. >10    belong            x        bss=%ld,
  4931. >14    belong            x        sym=%ld)
  4932.  
  4933. #------------------------------------------------------------------------------
  4934. # msdos:  file(1) magic for MS-DOS files
  4935. #
  4936.  
  4937. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  4938. 0    string    @echo\ off    MS-DOS batch file text
  4939.  
  4940. # XXX - according to Microsoft's spec, at an offset of 0x3c in a
  4941. # PE-format executable is the offset in the file of the PE header;
  4942. # unfortunately, that's a little-endian offset, and there's no way
  4943. # to specify an indirect offset with a specified byte order.
  4944. # So, for now, we assume the standard MS-DOS stub, which puts the
  4945. # PE header at 0x80 = 128.
  4946. #
  4947. # Required OS version and subsystem version were 4.0 on some NT 3.51
  4948. # executables built with Visual C++ 4.0, so it's not clear that
  4949. # they're interesting.  The user version was 0.0, but there's
  4950. # probably some linker directive to set it.  The linker version was
  4951. # 3.0, except for one ".exe" which had it as 4.20 (same damn linker!).
  4952. #
  4953. 128    string        PE\0\0    MS Windows PE
  4954. >150    leshort&0x0100    >0    32-bit
  4955. >132    leshort        0x0    unknown processor
  4956. >132    leshort        0x14c    Intel 80386
  4957. >132    leshort        0x166    MIPS R4000
  4958. >132    leshort        0x184    Alpha
  4959. >132    leshort        0x268    Motorola 68000
  4960. >132    leshort        0x1f0    PowerPC
  4961. >132    leshort        0x290    PA-RISC
  4962. >148    leshort        >27
  4963. >>220    leshort        0    unknown subsystem
  4964. >>220    leshort        1    native
  4965. >>220    leshort        2    GUI
  4966. >>220    leshort        3    console
  4967. >>220    leshort        7    POSIX
  4968. >150    leshort&0x2000    =0    executable
  4969. #>>136    ledate        x    stamp %s,
  4970. >>150    leshort&0x0001    >0    not relocatable
  4971. #>>150    leshort&0x0004    =0    with line numbers,
  4972. #>>150    leshort&0x0008    =0    with local symbols,
  4973. #>>150    leshort&0x0200    =0    with debug symbols,
  4974. >>150    leshort&0x1000    >0    system file
  4975. #>>148    leshort        >0
  4976. #>>>154    byte        x    linker %d
  4977. #>>>155    byte        x    \b.%d,
  4978. #>>148    leshort        >27
  4979. #>>>192    leshort        x    requires OS %d
  4980. #>>>194    leshort        x    \b.%d,
  4981. #>>>196    leshort        x    user version %d
  4982. #>>>198    leshort        x    \b.%d,
  4983. #>>>200    leshort        x    subsystem version %d
  4984. #>>>202    leshort        x    \b.%d,
  4985. >150    leshort&0x2000    >0    DLL
  4986. #>>136    ledate        x    stamp %s,
  4987. >>150    leshort&0x0001    >0    not relocatable
  4988. #>>150    leshort&0x0004    =0    with line numbers,
  4989. #>>150    leshort&0x0008    =0    with local symbols,
  4990. #>>150    leshort&0x0200    =0    with debug symbols,
  4991. >>150    leshort&0x1000    >0    system file
  4992. #>>148    leshort        >0
  4993. #>>>154    byte        x    linker %d
  4994. #>>>155    byte        x    \b.%d,
  4995. #>>148    leshort        >27
  4996. #>>>192    leshort        x    requires OS %d
  4997. #>>>194    leshort        x    \b.%d,
  4998. #>>>196    leshort        x    user version %d
  4999. #>>>198    leshort        x    \b.%d,
  5000. #>>>200    leshort        x    subsystem version %d
  5001. #>>>202    leshort        x    \b.%d,
  5002. 0    leshort        0x14c    MS Windows COFF Intel 80386 object file
  5003. #>4    ledate        x    stamp %s
  5004. 0    leshort        0x166    MS Windows COFF MIPS R4000 object file
  5005. #>4    ledate        x    stamp %s
  5006. 0    leshort        0x184    MS Windows COFF Alpha object file
  5007. #>4    ledate        x    stamp %s
  5008. 0    leshort        0x268    MS Windows COFF Motorola 68000 object file
  5009. #>4    ledate        x    stamp %s
  5010. 0    leshort        0x1f0    MS Windows COFF PowerPC object file
  5011. #>4    ledate        x    stamp %s
  5012. 0    leshort        0x290    MS Windows COFF PA-RISC object file
  5013. #>4    ledate        x    stamp %s
  5014.  
  5015. # .EXE formats (Greg Roelofs, newt@uchicago.edu)
  5016. #
  5017. 0    string    MZ        MS-DOS executable (EXE)
  5018. >24    string    @        \b, OS/2 or MS Windows
  5019. >>0xe7    string    LH/2\ Self-Extract    \b, %s
  5020. >>0xe9    string    PKSFX2        \b, %s
  5021. >>122    string    Windows\ self-extracting\ ZIP    \b, %s
  5022. >0x1c    string    RJSX\xff\xff    \b, ARJ SFX
  5023. >0x1c    string    diet\xf9\x9c    \b, diet compressed
  5024. >0x1e    string    Copyright\ 1989-1990\ PKWARE\ Inc.    \b, PKSFX
  5025. # JM: 0x1e "PKLITE Copr. 1990-92 PKWARE Inc. All Rights Reserved\7\0\0\0"
  5026. >0x1e    string    PKLITE\ Copr.    \b, %.6s compressed
  5027. >0x24    string    LHa's\ SFX    \b, %.15s
  5028. >0x24    string    LHA's\ SFX    \b, %.15s
  5029. >1638    string    -lh5-        \b, LHa SFX archive v2.13S
  5030. >7195    string    Rar!        \b, RAR self-extracting archive
  5031. #
  5032. # [GRR 950118:  file 3.15 has a buffer-size limitation; offsets bigger than
  5033. #   8161 bytes are ignored.  To make the following entries work, increase
  5034. #   HOWMANY in file.h to 32K at least, and maybe to 70K or more for OS/2,
  5035. #   NT/Win32 and VMS.]
  5036. # [GRR:  some company sells a self-extractor/displayer for image data(!)]
  5037. #
  5038. >11696    string    PK\003\004    \b, PKZIP SFX archive v1.1
  5039. >13297    string    PK\003\004    \b, PKZIP SFX archive v1.93a
  5040. >15588    string    PK\003\004    \b, PKZIP2 SFX archive v1.09
  5041. >15770    string    PK\003\004    \b, PKZIP SFX archive v2.04g
  5042. >28374    string    PK\003\004    \b, PKZIP2 SFX archive v1.02
  5043. #
  5044. # Info-ZIP self-extractors
  5045. #    these are the DOS versions:
  5046. >25115    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  5047. >26331    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  5048. #    these are the OS/2 versions (OS/2 is flagged above):
  5049. >47031    string    PK\003\004    \b, Info-ZIP SFX archive v5.12
  5050. >49845    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  5051. #    this is the NT/Win32 version:
  5052. >69120    string    PK\003\004    \b, Info-ZIP NT SFX archive v5.12 w/decryption
  5053. #
  5054. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  5055. >49801    string    \x79\xff\x80\xff\x76\xff    \b, CODEC archive v3.21
  5056. >>49824    leshort        =1            \b, 1 file
  5057. >>49824    leshort        >1            \b, %u files
  5058.  
  5059. # .COM formats (Daniel Quinlan, quinlan@yggdrasil.com)
  5060. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  5061. # but it isn't feasible to match all COM files since there must be at least
  5062. # two dozen different one-byte "magics".
  5063. #0    byte        0xe9        MS-DOS executable (COM)
  5064. #>6    string    SFX\ of\ LHarc    (%s)
  5065. #0    byte        0x8c        MS-DOS executable (COM)
  5066. # 0xeb conflicts with "sequent" magic
  5067. #0    byte        0xeb        MS-DOS executable (COM)
  5068. #0    byte        0xb8        MS-DOS executable (COM)
  5069.  
  5070. # miscellaneous formats
  5071. 0    string        LZ        MS-DOS executable (built-in)
  5072. #0    byte        0xf0        MS-DOS program library data
  5073. #
  5074.  
  5075. #
  5076. # Windows NT Registry files.
  5077. #
  5078. 0    string        regf        Windows NT Registry file
  5079.  
  5080. # Popular applications
  5081. 2080    string    Microsoft\ Word\ 6.0\ Document    %s
  5082. 2080    string    Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
  5083. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Word)
  5084. 2112    string    MSWordDoc            Microsoft Word document data
  5085. #
  5086. 0    belong    0x31be0000            Microsoft Word Document
  5087. #
  5088. 0       string  PO^Q`                Microsoft Word 6.0 Document
  5089. #
  5090. 0    string    \376\067\0\043            Microsoft Office Document
  5091. 0    string    \320\317\021\340\241\261    Microsoft Office Document
  5092. 0    string    \333\245-\0\0\0            Microsoft Office Document
  5093. #
  5094. 2080    string    Microsoft\ Excel\ 5.0\ Worksheet    %s
  5095. #
  5096. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
  5097. 2114    string    Biff5        Microsoft Excel 5.0 Worksheet
  5098. #
  5099. 0    belong    0x00001a00    Lotus 1-2-3
  5100. >4    belong    0x00100400    wk3 document data
  5101. >4    belong    0x02100400    wk4 document data
  5102. >4    belong    0x07800100    fm3 or fmb document data
  5103. >4    belong    0x07800000    fm3 or fmb document data
  5104. #
  5105. 0    belong    0x00000200     Lotus 1-2-3
  5106. >4    belong    0x06040600    wk1 document data
  5107. >4    belong    0x06800200    fmt document data
  5108.  
  5109. # Help files
  5110. 0    string    ?_\3\0        MS Windows Help Data
  5111.  
  5112. # Microsoft CAB distribution format  Dale Worley <root@dworley.ny.mediaone.net>
  5113. 0    string        MSCF\000\000\000\000    Microsoft CAB file
  5114.  
  5115. #  DeIsL1.isu what this is I don't know
  5116. 0    string    \161\250\000\000\001\002    DeIsL1.isu whatever that is
  5117.  
  5118. # Winamp .avs
  5119. #0    string    Nullsoft\ AVS\ Preset\ \060\056\061\032    A plug in for Winamp ms-windows Freeware media player
  5120. 0    string    Nullsoft\ AVS\ Preset\     Winamp plug in
  5121.  
  5122. # Hyper terminal:
  5123. 0    string    HyperTerminal\     hyperterm
  5124. >15    string    1.0\ --\ HyperTerminal\ data\ file    MS-windows Hyperterminal
  5125.  
  5126. # Windows Metafont .WMF
  5127. 0    string    \327\315\306\232\000\000\000\000\000\000    ms-windows metafont .wmf
  5128.  
  5129. #tz3 files whatever that is (MS Works files)
  5130. 0    string    \003\001\001\004\070\001\000\000    tz3 ms-works file
  5131. 0    string    \003\002\001\004\070\001\000\000    tz3 ms-works file
  5132. 0    string    \003\003\001\004\070\001\000\000    tz3 ms-works file
  5133.  
  5134. # PGP sig files .sig
  5135. #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
  5136. 0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
  5137. 0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
  5138. 0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
  5139. 0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
  5140. 0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
  5141. 0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
  5142.  
  5143. # windows zips files .dmf
  5144. 0    string    MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 Ms-windows special zipped file
  5145.  
  5146.  
  5147. # Windows help file FTG FTS
  5148. 0    string    \164\146\115\122\012\000\000\000\001\000\000\000    ms-windows help cache
  5149.  
  5150. # grp old windows 3.1 group files
  5151. 0 string  \120\115\103\103    Ms-windows 3.1 group files
  5152.  
  5153.  
  5154. # lnk files windows symlinks
  5155. 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
  5156.  
  5157. #ico files
  5158. 0    string    \102\101\050\000\000\000\056\000\000\000\000\000\000\000    Icon for ms-windows
  5159.  
  5160. # Windows icons (Ian Springer <ips@fpk.hp.com>)
  5161. 0    string    \000\000\001\000    ms-windows icon resource
  5162. >4    byte    1            - 1 icon
  5163. >4    byte    >1            - %d icons
  5164. >>6    byte    >0            \b, %dx
  5165. >>>7    byte    >0            \b%d
  5166. >>8    byte    0            \b, 256-colors
  5167. >>8    byte    >0            \b, %d-colors
  5168.  
  5169.  
  5170. # True Type fonts currently misidentified as raw G3 data
  5171.  
  5172. 0    string    \000\001\000\000\000 MS-Windows true type font .ttf
  5173.  
  5174.  
  5175. # .chr files
  5176. 0    string    PK\010\010BGI    Borland font 
  5177. >4    string    >\0    %s
  5178. # then there is a copyright notice
  5179.  
  5180.  
  5181. # .bgi files
  5182. 0    string    pk\010\010BGI    Borland device 
  5183. >4    string    >\0    %s
  5184. # then there is a copyright notice
  5185.  
  5186.  
  5187. # recycled/info the windows trash bin index
  5188. 9    string    \000\000\000\030\001\000\000\000 ms-windows recycled bin info
  5189.  
  5190.  
  5191. ##### put in Either Magic/font or Magic/news
  5192. # Acroread or something  files wrongly identified as G3  .pfm
  5193. # these have the form \000 \001 any? \002 \000 \000
  5194. # or \000 \001 any? \022 \000 \000
  5195. 0    string  \000\001 pfm?
  5196. >3    string  \022\000\000Copyright\  yes
  5197. >3    string  \002\000\000Copyright\  yes
  5198. #>3    string  >\0     oops, not a font file. Cancel that.
  5199. #it clashes with ttf files so put it lower down.
  5200.  
  5201. # From Doug Lee via a FreeBSD pr
  5202. 9    string        GERBILDOC    First Choice document
  5203. 9    string        GERBILDB    First Choice database
  5204. 9    string        GERBILCLIP    First Choice database
  5205. 0    string        GERBIL        First Choice device file
  5206. 9    string        RABBITGRAPH    RabbitGraph file
  5207. 0    string        DCU1        Borland Delphi .DCU file
  5208. 0    string        !<spell>    MKS Spell hash list (old format)
  5209. 0    string        !<spell2>    MKS Spell hash list
  5210. 0    string        AH        Halo(TM) bitmapped font file
  5211. 0    lelong        0x08086b70    TurboC BGI file
  5212. 0    lelong        0x08084b50    TurboC Font file
  5213.  
  5214. # WARNING: below line conflicts with Infocom game data Z-machine 3
  5215. 0    byte        0x03        DBase 3 data file
  5216. >0x04    lelong        0        (no records)
  5217. >0x04    lelong        >0        (%ld records)
  5218. 0    byte        0x83        DBase 3 data file with memo(s)
  5219. >0x04    lelong        0        (no records)
  5220. >0x04    lelong        >0        (%ld records)
  5221. 0    leshort        0x0006        DBase 3 index file
  5222. 0    string        PMCC        Windows 3.x .GRP file
  5223. 1    string        RDC-meg        MegaDots 
  5224. >8    byte        >0x2F        version %c
  5225. >9    byte        >0x2F        \b.%c file
  5226. 0    lelong        0x4C
  5227. >4    lelong        0x00021401    Windows shortcut file
  5228.  
  5229. # DOS EPS Binary File Header
  5230. # From: Ed Sznyter <ews@Black.Market.NET>
  5231. 0    belong        0xC5D0D3C6    DOS EPS Binary File
  5232. >4    long        >0        Postscript starts at byte %d
  5233. >>8    long        >0        length %d
  5234. >>>12    long        >0        Metafile starts at byte %d
  5235. >>>>16    long        >0        length %d
  5236. >>>20    long        >0        TIFF starts at byte %d
  5237. >>>>24    long        >0        length %d
  5238.  
  5239. # TNEF magic From "Joomy" <joomy@se-ed.net> 
  5240. 0    leshort        0x223e9f78    TNEF
  5241.  
  5242. #------------------------------------------------------------------------------
  5243. # msvc:  file(1) magic for msvc
  5244. # "H. Nanosecond" <aldomel@ix.netcom.com>
  5245. # Microsoft visual C
  5246. # I have version 1.0
  5247.  
  5248. # .aps
  5249. 0    string    HWB\000\377\001\000\000\000    Microsoft Visual C .APS file
  5250.  
  5251. # .ide
  5252. #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
  5253. 0    string    \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157    MSVC .ide
  5254.  
  5255. # .res
  5256. 0    string    \000\000\000\000\040\000\000\000\377    MSVC .res
  5257. 0    string    \377\003\000\377\001\000\020\020\350    MSVC .res
  5258. 0    string    \377\003\000\377\001\000\060\020\350    MSVC .res
  5259.  
  5260. #.lib
  5261. 0    string    \360\015\000\000    Microsoft Visual C library
  5262. 0    string    \360\075\000\000    Microsoft Visual C library
  5263. 0    string    \360\175\000\000    Microsoft Visual C library
  5264.  
  5265. #.pch
  5266. 0    string    DTJPCH0\000\022\103\006\200    Microsoft Visual C .pch
  5267.  
  5268. # .pdb
  5269. # too long 0    string    Microsoft\ C/C++\ program\ database\ 
  5270. 0    string    Microsoft\ C/C++\     MSVC program database
  5271. >18    string    program\ database\     
  5272. >33    string    >\0    ver %s
  5273.  
  5274. #.sbr
  5275. 0    string    \000\002\000\007\000    MSVC .sbr
  5276. >5    string     >\0    %s
  5277.  
  5278. #.bsc
  5279. 0    string    \002\000\002\001    MSVC .bsc
  5280.  
  5281. #.wsp
  5282. 0    string    1.00\ .0000.0000\000\003    MSVC .wsp version 1.0000.0000
  5283. # these seem to start with the version and contain menus
  5284.  
  5285. #-----------------------------------------------------------------------------
  5286. # natinst:  file(1) magic for National Instruments Code Files
  5287.  
  5288. #
  5289. # From <egamez@fcfm.buap.mx> Enrique Gßmez-Flores
  5290. # version 1
  5291. # Many formats still missing, we use, for the moment LabVIEW
  5292. # We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
  5293. #
  5294. 0       string          RSRC            National Instruments,
  5295. # Check if it's a LabVIEW File
  5296. >8      string          LV              LabVIEW File,
  5297. # Check wich kind of file is
  5298. >>10    string          SB              Code Resource File, data
  5299. >>10    string          IN              Virtual Instrument Program, data
  5300. >>10    string          AR              VI Library, data
  5301. # This is for Menu Libraries
  5302. >8      string          LMNULBVW        Portable File Names, data
  5303. # This is for General Resources
  5304. >8      string          rsc             Resources File, data
  5305. # This is for VXI Package
  5306. 0       string          VMAP            National Instruments, VXI File, data
  5307.  
  5308. #------------------------------------------------------------------------------
  5309. # ncr:  file(1) magic for NCR Tower objects
  5310. #
  5311. # contributed by
  5312. # Michael R. Wayne  ***  TMC & Associates  ***  INTERNET: wayne@ford-vax.arpa
  5313. # uucp: {philabs | pyramid} !fmsrl7!wayne   OR   wayne@fmsrl7.UUCP
  5314. #
  5315. 0    beshort        000610    Tower/XP rel 2 object
  5316. >12       belong        >0    not stripped
  5317. >20       beshort        0407    executable
  5318. >20       beshort        0410    pure executable
  5319. >22       beshort        >0    - version %ld
  5320. 0    beshort        000615    Tower/XP rel 2 object
  5321. >12       belong        >0    not stripped
  5322. >20       beshort        0407    executable
  5323. >20       beshort        0410    pure executable
  5324. >22       beshort        >0    - version %ld
  5325. 0    beshort        000620    Tower/XP rel 3 object
  5326. >12       belong        >0    not stripped
  5327. >20       beshort        0407    executable
  5328. >20       beshort        0410    pure executable
  5329. >22       beshort        >0    - version %ld
  5330. 0    beshort        000625    Tower/XP rel 3 object
  5331. >12       belong        >0    not stripped
  5332. >20       beshort        0407    executable
  5333. >20       beshort        0410    pure executable
  5334. >22       beshort        >0    - version %ld
  5335. 0    beshort        000630    Tower32/600/400 68020 object
  5336. >12       belong        >0    not stripped
  5337. >20       beshort        0407    executable
  5338. >20       beshort        0410    pure executable
  5339. >22       beshort        >0    - version %ld
  5340. 0    beshort        000640    Tower32/800 68020
  5341. >18       beshort        &020000    w/68881 object
  5342. >18       beshort        &040000    compatible object
  5343. >18       beshort        &~060000    object
  5344. >20       beshort        0407    executable
  5345. >20       beshort        0413    pure executable
  5346. >12       belong        >0    not stripped
  5347. >22       beshort        >0    - version %ld
  5348. 0    beshort        000645    Tower32/800 68010
  5349. >18       beshort        &040000    compatible object
  5350. >18       beshort        &~060000 object
  5351. >20       beshort        0407    executable
  5352. >20       beshort        0413    pure executable
  5353. >12       belong        >0    not stripped
  5354. >22       beshort        >0    - version %ld
  5355.  
  5356. #------------------------------------------------------------------------------
  5357. # netbsd:  file(1) magic for NetBSD objects
  5358. #
  5359. # All new-style magic numbers are in network byte order.
  5360. #
  5361.  
  5362. 0    lelong            000000407    NetBSD little-endian object file
  5363. >16    lelong            >0        not stripped
  5364. 0    belong            000000407    NetBSD big-endian object file
  5365. >16    belong            >0        not stripped
  5366.  
  5367. 0    belong&0377777777    041400413    NetBSD/i386 demand paged
  5368. >0    byte            &0x80        
  5369. >>20    lelong            <4096        shared library
  5370. >>20    lelong            =4096        dynamically linked executable
  5371. >>20    lelong            >4096        dynamically linked executable
  5372. >0    byte            ^0x80        executable
  5373. >16    lelong            >0        not stripped
  5374. 0    belong&0377777777    041400410    NetBSD/i386 pure
  5375. >0    byte            &0x80        dynamically linked executable
  5376. >0    byte            ^0x80        executable
  5377. >16    lelong            >0        not stripped
  5378. 0    belong&0377777777    041400407    NetBSD/i386
  5379. >0    byte            &0x80        dynamically linked executable
  5380. >0    byte            ^0x80
  5381. >>0    byte            &0x40        position independent
  5382. >>20    lelong            !0        executable
  5383. >>20    lelong            =0        object file
  5384. >16    lelong            >0        not stripped
  5385. 0    belong&0377777777    041400507    NetBSD/i386 core
  5386. >12    string            >\0        from '%s'
  5387. >32    lelong            !0        (signal %d)
  5388.  
  5389. 0    belong&0377777777    041600413    NetBSD/m68k demand paged
  5390. >0    byte            &0x80        
  5391. >>20    belong            <8192        shared library
  5392. >>20    belong            =8192        dynamically linked executable
  5393. >>20    belong            >8192        dynamically linked executable
  5394. >0    byte            ^0x80        executable
  5395. >16    belong            >0        not stripped
  5396. 0    belong&0377777777    041600410    NetBSD/m68k pure
  5397. >0    byte            &0x80        dynamically linked executable
  5398. >0    byte            ^0x80        executable
  5399. >16    belong            >0        not stripped
  5400. 0    belong&0377777777    041600407    NetBSD/m68k
  5401. >0    byte            &0x80        dynamically linked executable
  5402. >0    byte            ^0x80
  5403. >>0    byte            &0x40        position independent
  5404. >>20    belong            !0        executable
  5405. >>20    belong            =0        object file
  5406. >16    belong            >0        not stripped
  5407. 0    belong&0377777777    041600507    NetBSD/m68k core
  5408. >12    string            >\0        from '%s'
  5409. >32    belong            !0        (signal %d)
  5410.  
  5411. 0    belong&0377777777    042000413    NetBSD/m68k4k demand paged
  5412. >0    byte            &0x80        
  5413. >>20    belong            <4096        shared library
  5414. >>20    belong            =4096        dynamically linked executable
  5415. >>20    belong            >4096        dynamically linked executable
  5416. >0    byte            ^0x80        executable
  5417. >16    belong            >0        not stripped
  5418. 0    belong&0377777777    042000410    NetBSD/m68k4k pure
  5419. >0    byte            &0x80        dynamically linked executable
  5420. >0    byte            ^0x80        executable
  5421. >16    belong            >0        not stripped
  5422. 0    belong&0377777777    042000407    NetBSD/m68k4k
  5423. >0    byte            &0x80        dynamically linked executable
  5424. >0    byte            ^0x80
  5425. >>0    byte            &0x40        position independent
  5426. >>20    belong            !0        executable
  5427. >>20    belong            =0        object file
  5428. >16    belong            >0        not stripped
  5429. 0    belong&0377777777    042000507    NetBSD/m68k4k core
  5430. >12    string            >\0        from '%s'
  5431. >32    belong            !0        (signal %d)
  5432.  
  5433. 0    belong&0377777777    042200413    NetBSD/ns32532 demand paged
  5434. >0    byte            &0x80        
  5435. >>20    lelong            <4096        shared library
  5436. >>20    lelong            =4096        dynamically linked executable
  5437. >>20    lelong            >4096        dynamically linked executable
  5438. >0    byte            ^0x80        executable
  5439. >16    lelong            >0        not stripped
  5440. 0    belong&0377777777    042200410    NetBSD/ns32532 pure
  5441. >0    byte            &0x80        dynamically linked executable
  5442. >0    byte            ^0x80        executable
  5443. >16    lelong            >0        not stripped
  5444. 0    belong&0377777777    042200407    NetBSD/ns32532
  5445. >0    byte            &0x80        dynamically linked executable
  5446. >0    byte            ^0x80
  5447. >>0    byte            &0x40        position independent
  5448. >>20    lelong            !0        executable
  5449. >>20    lelong            =0        object file
  5450. >16    lelong            >0        not stripped
  5451. 0    belong&0377777777    042200507    NetBSD/ns32532 core
  5452. >12    string            >\0        from '%s'
  5453. >32    lelong            !0        (signal %d)
  5454.  
  5455. 0    belong&0377777777    045200507    NetBSD/powerpc core
  5456. >12    string            >\0        from '%s'
  5457.  
  5458. 0    belong&0377777777    042400413    NetBSD/sparc demand paged
  5459. >0    byte            &0x80        
  5460. >>20    belong            <8192        shared library
  5461. >>20    belong            =8192        dynamically linked executable
  5462. >>20    belong            >8192        dynamically linked executable
  5463. >0    byte            ^0x80        executable
  5464. >16    belong            >0        not stripped
  5465. 0    belong&0377777777    042400410    NetBSD/sparc pure
  5466. >0    byte            &0x80        dynamically linked executable
  5467. >0    byte            ^0x80        executable
  5468. >16    belong            >0        not stripped
  5469. 0    belong&0377777777    042400407    NetBSD/sparc
  5470. >0    byte            &0x80        dynamically linked executable
  5471. >0    byte            ^0x80
  5472. >>0    byte            &0x40        position independent
  5473. >>20    belong            !0        executable
  5474. >>20    belong            =0        object file
  5475. >16    belong            >0        not stripped
  5476. 0    belong&0377777777    042400507    NetBSD/sparc core
  5477. >12    string            >\0        from '%s'
  5478. >32    belong            !0        (signal %d)
  5479.  
  5480. 0    belong&0377777777    042600413    NetBSD/pmax demand paged
  5481. >0    byte            &0x80        
  5482. >>20    lelong            <4096        shared library
  5483. >>20    lelong            =4096        dynamically linked executable
  5484. >>20    lelong            >4096        dynamically linked executable
  5485. >0    byte            ^0x80        executable
  5486. >16    lelong            >0        not stripped
  5487. 0    belong&0377777777    042600410    NetBSD/pmax pure
  5488. >0    byte            &0x80        dynamically linked executable
  5489. >0    byte            ^0x80        executable
  5490. >16    lelong            >0        not stripped
  5491. 0    belong&0377777777    042600407    NetBSD/pmax
  5492. >0    byte            &0x80        dynamically linked executable
  5493. >0    byte            ^0x80
  5494. >>0    byte            &0x40        position independent
  5495. >>20    lelong            !0        executable
  5496. >>20    lelong            =0        object file
  5497. >16    lelong            >0        not stripped
  5498. 0    belong&0377777777    042600507    NetBSD/pmax core
  5499. >12    string            >\0        from '%s'
  5500. >32    lelong            !0        (signal %d)
  5501.  
  5502. 0    belong&0377777777    043000413    NetBSD/vax 1k demand paged
  5503. >0    byte            &0x80        
  5504. >>20    lelong            <4096        shared library
  5505. >>20    lelong            =4096        dynamically linked executable
  5506. >>20    lelong            >4096        dynamically linked executable
  5507. >0    byte            ^0x80        executable
  5508. >16    lelong            >0        not stripped
  5509. 0    belong&0377777777    043000410    NetBSD/vax 1k pure
  5510. >0    byte            &0x80        dynamically linked executable
  5511. >0    byte            ^0x80        executable
  5512. >16    lelong            >0        not stripped
  5513. 0    belong&0377777777    043000407    NetBSD/vax 1k
  5514. >0    byte            &0x80        dynamically linked executable
  5515. >0    byte            ^0x80
  5516. >>0    byte            &0x40        position independent
  5517. >>20    lelong            !0        executable
  5518. >>20    lelong            =0        object file
  5519. >16    lelong            >0        not stripped
  5520. 0    belong&0377777777    043000507    NetBSD/vax 1k core
  5521. >12    string            >\0        from '%s'
  5522. >32    lelong            !0        (signal %d)
  5523.  
  5524. 0    belong&0377777777    045400413    NetBSD/vax 4k demand paged
  5525. >0    byte            &0x80        
  5526. >>20    lelong            <4096        shared library
  5527. >>20    lelong            =4096        dynamically linked executable
  5528. >>20    lelong            >4096        dynamically linked executable
  5529. >0    byte            ^0x80        executable
  5530. >16    lelong            >0        not stripped
  5531. 0    belong&0377777777    045400410    NetBSD/vax 4k pure
  5532. >0    byte            &0x80        dynamically linked executable
  5533. >0    byte            ^0x80        executable
  5534. >16    lelong            >0        not stripped
  5535. 0    belong&0377777777    045400407    NetBSD/vax 4k
  5536. >0    byte            &0x80        dynamically linked executable
  5537. >0    byte            ^0x80
  5538. >>0    byte            &0x40        position independent
  5539. >>20    lelong            !0        executable
  5540. >>20    lelong            =0        object file
  5541. >16    lelong            >0        not stripped
  5542. 0    belong&0377777777    045400507    NetBSD/vax 4k core
  5543. >12    string            >\0        from '%s'
  5544. >32    lelong            !0        (signal %d)
  5545.  
  5546. # NetBSD/alpha does not support (and has never supported) a.out objects,
  5547. # so no rules are provided for them.  NetBSD/alpha ELF objects are 
  5548. # dealt with in "elf".
  5549. 0    lelong        0x00070185        ECOFF NetBSD/alpha binary
  5550. >10    leshort        0x0001            not stripped
  5551. >10    leshort        0x0000            stripped
  5552. 0    belong&0377777777    043200507    NetBSD/alpha core
  5553. >12    string            >\0        from '%s'
  5554. >32    lelong            !0        (signal %d)
  5555.  
  5556. 0    belong&0377777777    043400413    NetBSD/mips demand paged
  5557. >0    byte            &0x80        
  5558. >>20    belong            <8192        shared library
  5559. >>20    belong            =8192        dynamically linked executable
  5560. >>20    belong            >8192        dynamically linked executable
  5561. >0    byte            ^0x80        executable
  5562. >16    belong            >0        not stripped
  5563. 0    belong&0377777777    043400410    NetBSD/mips pure
  5564. >0    byte            &0x80        dynamically linked executable
  5565. >0    byte            ^0x80        executable
  5566. >16    belong            >0        not stripped
  5567. 0    belong&0377777777    043400407    NetBSD/mips
  5568. >0    byte            &0x80        dynamically linked executable
  5569. >0    byte            ^0x80
  5570. >>0    byte            &0x40        position independent
  5571. >>20    belong            !0        executable
  5572. >>20    belong            =0        object file
  5573. >16    belong            >0        not stripped
  5574. 0    belong&0377777777    043400507    NetBSD/mips core
  5575. >12    string            >\0        from '%s'
  5576. >32    belong            !0        (signal %d)
  5577.  
  5578. 0    belong&0377777777    043600413    NetBSD/arm32 demand paged
  5579. >0    byte            &0x80
  5580. >>20    lelong            <4096        shared library
  5581. >>20    lelong            =4096        dynamically linked executable
  5582. >>20    lelong            >4096        dynamically linked executable
  5583. >0    byte            ^0x80        executable
  5584. >16    lelong            >0        not stripped
  5585. 0    belong&0377777777    043600410    NetBSD/arm32 pure
  5586. >0    byte            &0x80        dynamically linked executable
  5587. >0    byte            ^0x80        executable
  5588. >16    lelong            >0        not stripped
  5589. 0    belong&0377777777    043600407    NetBSD/arm32
  5590. >0    byte            &0x80        dynamically linked executable
  5591. >0    byte            ^0x80
  5592. >>0    byte            &0x40        position independent
  5593. >>20    lelong            !0        executable
  5594. >>20    lelong            =0        object file
  5595. >16    lelong            >0        not stripped
  5596. # NetBSD/arm26 has always used ELF objects, but it shares a core file
  5597. # format with NetBSD/arm32.
  5598. 0    belong&0377777777    043600507    NetBSD/arm core
  5599. >12    string            >\0        from '%s'
  5600. >32    lelong            !0        (signal %d)
  5601.  
  5602. #------------------------------------------------------------------------------
  5603. # netscape:  file(1) magic for Netscape files
  5604. # "H. Nanosecond" <aldomel@ix.netcom.com>
  5605. # version 3 and 4 I think
  5606. #
  5607.  
  5608. # Netscape Address book  .nab
  5609. 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
  5610.  
  5611. # .snm Caches
  5612. 0    string        #\ Netscape\ folder\ cache    Netscape folder cache
  5613. 0    string    \000\036\204\220\000    Netscape folder cache
  5614. # .n2p 
  5615. # Net 2 Phone 
  5616. #0    string    123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
  5617. 0    string    SX961999    Net2phone
  5618.  
  5619. #
  5620. #This is files ending in .art, FIXME add more rules
  5621. 0       string          JG\004\016\0\0\0\0      ART
  5622.  
  5623. #------------------------------------------------------------------------------
  5624. # news:  file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  5625. #
  5626. 0    string        StartFontMetrics    ASCII font metrics
  5627. 0    string        StartFont    ASCII font bits
  5628. 0    belong        0x137A2944    NeWS bitmap font
  5629. 0    belong        0x137A2947    NeWS font family
  5630. 0    belong        0x137A2950    scalable OpenFont binary
  5631. 0    belong        0x137A2951    encrypted scalable OpenFont binary
  5632. 8    belong        0x137A2B45    X11/NeWS bitmap font
  5633. 8    belong        0x137A2B48    X11/NeWS font family
  5634. #------------------------------------------------------------------------------
  5635. # nitpicker:  file(1) magic for Flowfiles.
  5636. # From: Christian Jachmann <C.Jachmann@gmx.net> http://www.nitpicker.de
  5637. 0    string    NPFF    NItpicker Flow File 
  5638. >4    byte    x    V%d.
  5639. >5    byte    x    %d
  5640. >6    bedate    x    started: %s
  5641. >10    bedate    x    stopped: %s
  5642. >14    belong    x    Bytes: %u
  5643. >18    belong    x    Bytes1: %u
  5644. >22    belong    x    Flows: %u
  5645. >26    belong    x    Pkts: %u
  5646. #------------------------------------------------------------------------------
  5647. # octave binary data file(1) magic, from Dirk Eddelbuettel <edd@debian.org>
  5648. 0    string        Octave-1-L    Octave binary data (little endian)
  5649. 0    string        Octave-1-B    Octave binary data (big endian)
  5650.  
  5651. #------------------------------------------------------------------------------
  5652. # olf:  file(1) magic for OLF executables
  5653. #
  5654. # We have to check the byte order flag to see what byte order all the
  5655. # other stuff in the header is in.
  5656. #
  5657. # MIPS R3000 may also be for MIPS R2000.
  5658. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  5659. #
  5660. # Created by Erik Theisen <etheisen@openbsd.org>
  5661. # Based on elf from Daniel Quinlan <quinlan@yggdrasil.com>
  5662. 0    string        \177OLF        OLF
  5663. >4    byte        0        invalid class
  5664. >4    byte        1        32-bit
  5665. >4    byte        2        64-bit
  5666. >7    byte        0        invalid os
  5667. >7    byte        1        OpenBSD
  5668. >7    byte        2        NetBSD
  5669. >7    byte        3        FreeBSD
  5670. >7    byte        4        4.4BSD
  5671. >7    byte        5        Linux
  5672. >7    byte        6        SVR4
  5673. >7    byte        7        esix
  5674. >7    byte        8        Solaris
  5675. >7    byte        9        Irix
  5676. >7    byte        10        SCO
  5677. >7    byte        11        Dell
  5678. >7    byte        12        NCR
  5679. >5    byte        0        invalid byte order
  5680. >5    byte        1        LSB
  5681. >>16    leshort        0        no file type,
  5682. >>16    leshort        1        relocatable,
  5683. >>16    leshort        2        executable,
  5684. >>16    leshort        3        shared object,
  5685. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  5686. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  5687. >>16    leshort        4        core file
  5688. >>>(0x38+0xcc) string    >\0        of '%s'
  5689. >>>(0x38+0x10) lelong    >0        (signal %d),
  5690. >>16    leshort        &0xff00        processor-specific,
  5691. >>18    leshort        0        no machine,
  5692. >>18    leshort        1        AT&T WE32100 - invalid byte order,
  5693. >>18    leshort        2        SPARC - invalid byte order,
  5694. >>18    leshort        3        Intel 80386,
  5695. >>18    leshort        4        Motorola 68000 - invalid byte order,
  5696. >>18    leshort        5        Motorola 88000 - invalid byte order,
  5697. >>18    leshort        6        Intel 80486,
  5698. >>18    leshort        7        Intel 80860,
  5699. >>18    leshort        8        MIPS R3000_BE - invalid byte order,
  5700. >>18    leshort        9        Amdahl - invalid byte order,
  5701. >>18    leshort        10        MIPS R3000_LE,
  5702. >>18    leshort        11        RS6000 - invalid byte order,
  5703. >>18    leshort        15        PA-RISC - invalid byte order,
  5704. >>18    leshort        16        nCUBE,
  5705. >>18    leshort        17        VPP500,
  5706. >>18    leshort        18        SPARC32PLUS,
  5707. >>18    leshort        20        PowerPC,
  5708. >>18    leshort        0x9026        Alpha,
  5709. >>20    lelong        0        invalid version
  5710. >>20    lelong        1        version 1
  5711. >>36    lelong        1        MathCoPro/FPU/MAU Required
  5712. >8    string        >\0        (%s)
  5713. >5    byte        2        MSB
  5714. >>16    beshort        0        no file type,
  5715. >>16    beshort        1        relocatable,
  5716. >>16    beshort        2        executable,
  5717. >>16    beshort        3        shared object,
  5718. >>16    beshort        4        core file,
  5719. >>>(0x38+0xcc) string    >\0        of '%s'
  5720. >>>(0x38+0x10) belong    >0        (signal %d),
  5721. >>16    beshort        &0xff00        processor-specific,
  5722. >>18    beshort        0        no machine,
  5723. >>18    beshort        1        AT&T WE32100,
  5724. >>18    beshort        2        SPARC,
  5725. >>18    beshort        3        Intel 80386 - invalid byte order,
  5726. >>18    beshort        4        Motorola 68000,
  5727. >>18    beshort        5        Motorola 88000,
  5728. >>18    beshort        6        Intel 80486 - invalid byte order,
  5729. >>18    beshort        7        Intel 80860,
  5730. >>18    beshort        8        MIPS R3000_BE,
  5731. >>18    beshort        9        Amdahl,
  5732. >>18    beshort        10        MIPS R3000_LE - invalid byte order,
  5733. >>18    beshort        11        RS6000,
  5734. >>18    beshort        15        PA-RISC,
  5735. >>18    beshort        16        nCUBE,
  5736. >>18    beshort        17        VPP500,
  5737. >>18    beshort        18        SPARC32PLUS,
  5738. >>18    beshort        20        PowerPC or cisco 4500,
  5739. >>18    beshort        21        cisco 7500,
  5740. >>18    beshort        24        cisco SVIP,
  5741. >>18    beshort        25        cisco 7200,
  5742. >>18    beshort        36        cisco 12000,
  5743. >>18    beshort        0x9026        Alpha,
  5744. >>20    belong        0        invalid version
  5745. >>20    belong        1        version 1
  5746. >>36    belong        1        MathCoPro/FPU/MAU Required
  5747.  
  5748. #------------------------------------------------------------------------------
  5749. # os2:  file(1) magic for OS/2 files
  5750. #
  5751.  
  5752. # Provided 1998/08/22 by
  5753. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  5754. 1    string    InternetShortcut    MS Windows 95 Internet shortcut text
  5755. >24    string    >\            (URL=<%s>)
  5756.  
  5757. # OS/2 URL objects
  5758. # Provided 1998/08/22 by
  5759. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  5760. 0    string    http:            OS/2 URL object text
  5761. >5    string    >\            (WWW) <http:%s>
  5762. 0    string    mailto:            OS/2 URL object text
  5763. >7    string    >\            (email) <%s>
  5764. 0    string    news:            OS/2 URL object text
  5765. >5    string    >\            (Usenet) <%s>
  5766. 0    string    ftp:            OS/2 URL object text
  5767. >4    string    >\            (FTP) <ftp:%s>
  5768. 0    string    file:            OS/2 URL object text
  5769. >5    string    >\            (Local file) <%s>
  5770.  
  5771. # >>>>> OS/2 INF/HLP <<<<<  (source: Daniel Dissett ddissett@netcom.com)
  5772. # Carl Hauser (chauser.parc@xerox.com) and 
  5773. # Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  5774. # list the following header format in inf02a.doc:
  5775. #
  5776. #  int16 ID;           // ID magic word (5348h = "HS")
  5777. #  int8  unknown1;     // unknown purpose, could be third letter of ID
  5778. #  int8  flags;        // probably a flag word...
  5779. #                      //  bit 0: set if INF style file
  5780. #                      //  bit 4: set if HLP style file
  5781. #                      // patching this byte allows reading HLP files
  5782. #                      // using the VIEW command, while help files 
  5783. #                      // seem to work with INF settings here as well.
  5784. #  int16 hdrsize;      // total size of header
  5785. #  int16 unknown2;     // unknown purpose
  5786. 0   string  HSP\x01\x9b\x00 OS/2 INF
  5787. >107 string >0                      (%s)
  5788. 0   string  HSP\x10\x9b\x00     OS/2 HLP
  5789. >107 string >0                      (%s)
  5790.  
  5791. # OS/2 INI (this is a guess)
  5792. 0  string   \xff\xff\xff\xff\x14\0\0\0  OS/2 INI
  5793. #
  5794. # Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
  5795. #
  5796. # Redistribution and use in source and binary forms, with or without
  5797. # modification, are permitted provided that the following conditions
  5798. # are met:
  5799. # 1. Redistributions of source code must retain the above copyright
  5800. #    notice, this list of conditions and the following disclaimer.
  5801. # 2. Redistributions in binary form must reproduce the above copyright
  5802. #    notice, this list of conditions and the following disclaimer in the
  5803. #    documentation and/or other materials provided with the distribution.
  5804. # 3. All advertising materials mentioning features or use of this software
  5805. #    must display the following acknowledgement:
  5806. #      This product includes software developed by Ignatios Souvatzis for
  5807. #      the NetBSD project.
  5808. # 4. The name of the author may not be used to endorse or promote products
  5809. #    derived from this software without specific prior written permission.
  5810. #
  5811. #
  5812. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  5813. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  5814. # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
  5815. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  5816. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  5817. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  5818. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  5819. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  5820. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  5821. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  5822. #
  5823. #
  5824. #
  5825. # OS9/6809 module descriptions:
  5826. #
  5827. 0    beshort        0x87CD    OS9/6809 module:
  5828. #
  5829. >6    byte&0x0f    0x00    non-executable
  5830. >6    byte&0x0f    0x01    machine language
  5831. >6    byte&0x0f    0x02    BASIC I-code
  5832. >6    byte&0x0f    0x03    P-code
  5833. >6    byte&0x0f    0x04    C I-code
  5834. >6    byte&0x0f    0x05    COBOL I-code
  5835. >6    byte&0x0f    0x06    FORTRAN I-code
  5836. #
  5837. >6    byte&0xf0    0x10    program executable
  5838. >6    byte&0xf0    0x20    subroutine
  5839. >6    byte&0xf0    0x30    multi-module
  5840. >6    byte&0xf0    0x40    data module
  5841. #
  5842. >6    byte&0xf0    0xC0    system module
  5843. >6    byte&0xf0    0xD0    file manager
  5844. >6    byte&0xf0    0xE0    device driver
  5845. >6    byte&0xf0    0xF0    device descriptor
  5846. #
  5847. # OS9/m68k stuff (to be continued)
  5848. #
  5849. 0    beshort        0x4AFC    OS9/68K module:
  5850. #
  5851. # attr
  5852. >14    byte&0x80    0x80    re-entrant
  5853. >14    byte&0x40    0x40    ghost
  5854. >14    byte&0x20    0x20    system-state
  5855. #
  5856. # lang:
  5857. #
  5858. >13    byte        1    machine language
  5859. >13    byte        2    BASIC I-code
  5860. >13    byte        3    P-code
  5861. >13    byte        4    C I-code
  5862. >13    byte        5    COBOL I-code
  5863. >13    byte        6    Fortran I-code
  5864. #
  5865. #
  5866. # type:
  5867. #
  5868. >12    byte        1    program executable
  5869. >12    byte        2    subroutine
  5870. >12    byte        3    multi-module
  5871. >12    byte        4    data module
  5872. >12    byte        11    trap library
  5873. >12    byte        12    system module
  5874. >12    byte        13    file manager
  5875. >12    byte        14    device driver
  5876. >12    byte        15    device descriptor
  5877. #
  5878. # Mach magic number info
  5879. #
  5880. 0    long        0xefbe    OSF/Rose object
  5881. # I386 magic number info
  5882. #
  5883. 0    short        0565    i386 COFF object
  5884.  
  5885. #------------------------------------------------------------------------------
  5886. # palm:  file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
  5887. #
  5888. # Brian Lalor <blalor@hcirisc.cs.binghamton.edu>
  5889.  
  5890. # appl
  5891. 60      belong                  0x6170706c      PalmOS application
  5892. >0      string                  >\0             "%s"
  5893. # TEXt
  5894. 60      belong                  0x54455874      AportisDoc file
  5895. >0      string                  >\0             "%s"
  5896. # HACK
  5897. 60      belong                  0x4841434b      HackMaster hack
  5898. >0      string                  >\0             "%s"
  5899.  
  5900. #------------------------------------------------------------------------------
  5901. #
  5902. # Parix COFF executables
  5903. # From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
  5904. #
  5905. 0    beshort&0xfff    0xACE    PARIX
  5906. >0    byte&0xf0    0x80    T800
  5907. >0    byte&0xf0    0x90    T9000
  5908. >19    byte&0x02    0x02    executable
  5909. >19    byte&0x02    0x00    object
  5910. >19    byte&0x0c    0x00    not stripped
  5911.  
  5912. #------------------------------------------------------------------------------
  5913. # pbm:  file(1) magic for Portable Bitmap files
  5914. #
  5915. # XXX - byte order?
  5916. #
  5917. 0    short    0x2a17    "compact bitmap" format (Poskanzer)
  5918. #------------------------------------------------------------------------------
  5919. # pdf:  file(1) magic for Portable Document Format
  5920. #
  5921.  
  5922. 0    string        %PDF-        PDF document
  5923. >5    byte        x        \b, version %c
  5924. >7    byte        x        \b.%c
  5925.  
  5926. #------------------------------------------------------------------------------
  5927. # pdp:  file(1) magic for PDP-11 executable/object and APL workspace
  5928. #
  5929. 0    lelong        0101555        PDP-11 single precision APL workspace
  5930. 0    lelong        0101554        PDP-11 double precision APL workspace
  5931. #
  5932. # PDP-11 a.out
  5933. #
  5934. 0    leshort        0407        PDP-11 executable
  5935. >8    leshort        >0        not stripped
  5936. >15    byte        >0        - version %ld
  5937.  
  5938. 0    leshort        0401        PDP-11 UNIX/RT ldp
  5939. 0    leshort        0405        PDP-11 old overlay
  5940.  
  5941. 0    leshort        0410        PDP-11 pure executable
  5942. >8    leshort        >0        not stripped
  5943. >15    byte        >0        - version %ld
  5944.  
  5945. 0    leshort        0411        PDP-11 separate I&D executable
  5946. >8    leshort        >0        not stripped
  5947. >15    byte        >0        - version %ld
  5948.  
  5949. 0    leshort        0437        PDP-11 kernel overlay
  5950.  
  5951. # These last three are derived from 2.11BSD file(1)
  5952. 0    leshort        0413        PDP-11 demand-paged pure executable
  5953. >8    leshort        >0        not stripped
  5954.  
  5955. 0    leshort        0430        PDP-11 overlaid pure executable
  5956. >8    leshort        >0        not stripped
  5957.  
  5958. 0    leshort        0431        PDP-11 overlaid separate executable
  5959. >8    leshort        >0        not stripped
  5960.  
  5961. #------------------------------------------------------------------------------
  5962. # perl:  file(1) magic for Larry Wall's perl language.
  5963. #
  5964. # The ``eval'' line recognizes an outrageously clever hack for USG systems.
  5965. # Keith Waclena <keith@cerberus.uchicago.edu>
  5966. # Send additions to <perl5-porters@perl.org>
  5967. 0    string/b    #!\ /bin/perl            perl script text executable
  5968. 0    string        eval\ "exec\ /bin/perl        perl script text
  5969. 0    string/b    #!\ /usr/bin/perl        perl script text executable
  5970. 0    string        eval\ "exec\ /usr/bin/perl    perl script text
  5971. 0    string/b    #!\ /usr/local/bin/perl        perl script text
  5972. 0    string        eval\ "exec\ /usr/local/bin/perl    perl script text executable
  5973.  
  5974. # a couple more, by me
  5975. # XXX: christos matches
  5976. #0    regex        package        Perl5 module source text (via regex)
  5977. #0    string        package        Perl5 module source text
  5978.  
  5979. #------------------------------------------------------------------------------
  5980. # pgp:  file(1) magic for Pretty Good Privacy
  5981. #
  5982. 0       beshort         0x9900                  PGP key public ring
  5983. 0       beshort         0x9501                  PGP key security ring
  5984. 0       beshort         0x9500                  PGP key security ring
  5985. 0    beshort        0xa600            PGP encrypted data
  5986. 0       string          -----BEGIN\040PGP       PGP armored data
  5987. >15     string          PUBLIC\040KEY\040BLOCK- public key block
  5988. >15     string          MESSAGE-                message
  5989. >15     string          SIGNED\040MESSAGE-      signed message
  5990. >15     string          PGP\040SIGNATURE-       signature
  5991.  
  5992. #------------------------------------------------------------------------------
  5993. # pkgadd:  file(1) magic for SysV R4 PKG Datastreams
  5994. #
  5995. 0       string          #\ PaCkAgE\ DaTaStReAm  pkg Datastream (SVR4)
  5996.  
  5997. #------------------------------------------------------------------------------
  5998. # plus5:  file(1) magic for Plus Five's UNIX MUMPS
  5999. #
  6000. # XXX - byte order?  Paging Hokey....
  6001. #
  6002. 0    short        0x259        mumps avl global
  6003. >2    byte        >0        (V%d)
  6004. >6    byte        >0        with %d byte name
  6005. >7    byte        >0        and %d byte data cells
  6006. 0    short        0x25a        mumps blt global
  6007. >2    byte        >0        (V%d)
  6008. >8    short        >0        - %d byte blocks
  6009. >15    byte        0x00        - P/D format
  6010. >15    byte        0x01        - P/K/D format
  6011. >15    byte        0x02        - K/D format
  6012. >15    byte        >0x02        - Bad Flags
  6013.  
  6014. #------------------------------------------------------------------------------
  6015. # printer:  file(1) magic for printer-formatted files
  6016. #
  6017.  
  6018. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  6019. 0    string        %!        PostScript document text
  6020. >2    string        PS-Adobe-    conforming
  6021. >>11    string        >\0        at level %.3s
  6022. >>>15    string        EPS        - type %s
  6023. >>>15    string        Query        - type %s
  6024. >>>15    string        ExitServer    - type %s
  6025. # Some PCs have the annoying habit of adding a ^D as a document separator
  6026. 0    string        \004%!        PostScript document text
  6027. >3    string        PS-Adobe-    conforming
  6028. >>12    string        >\0        at level %.3s
  6029. >>>16    string        EPS        - type %s
  6030. >>>16    string        Query        - type %s
  6031. >>>16    string        ExitServer    - type %s
  6032. 0    string        \033%-12345X%!PS    PostScript document
  6033.  
  6034.  
  6035. # DOS EPS Binary File Header
  6036. # From: Ed Sznyter <ews@Black.Market.NET>
  6037. 0       belong          0xC5D0D3C6      DOS EPS Binary File
  6038. >4      long            >0              Postscript starts at byte %d
  6039. >>8     long            >0              length %d
  6040. >>>12   long            >0              Metafile starts at byte %d
  6041. >>>>16  long            >0              length %d
  6042. >>>20   long            >0              TIFF starts at byte %d
  6043. >>>>24  long            >0              length %d
  6044.  
  6045. # Adobe's PostScript Printer Description (PPD) files
  6046. #       Yves Arrouye <arrouye@marin.fdn.fr>
  6047. #
  6048. 0      string          *PPD-Adobe:    PPD file
  6049. >13    string          x              \b, ve
  6050.  
  6051. # HP Printer Job Language
  6052. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  6053. # HP Printer Job Language
  6054. # The header found on Win95 HP plot files is the "Silliest Thing possible" 
  6055. # (TM)
  6056. # Every driver puts the language at some random position, with random case
  6057. # (LANGUAGE and Language)
  6058. # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
  6059. # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
  6060. 0    string        \033%-12345X@PJL    HP Printer Job Language data
  6061. >&0    string        >\0            %s            
  6062. >>&0    string        >\0            %s            
  6063. >>>&0    string        >\0            %s        
  6064. >>>>&0    string        >\0            %s        
  6065. #>15    string        \ ENTER\ LANGUAGE\ =
  6066. #>31    string        PostScript        PostScript
  6067.  
  6068. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  6069. 0    string        \033E\033    HP PCL printer data
  6070. >3    string        \&l0A        - default page size
  6071. >3    string        \&l1A        - US executive page size
  6072. >3    string        \&l2A        - US letter page size
  6073. >3    string        \&l3A        - US legal page size
  6074. >3    string        \&l26A        - A4 page size
  6075. >3    string        \&l80A        - Monarch envelope size
  6076. >3    string        \&l81A        - No. 10 envelope size
  6077. >3    string        \&l90A        - Intl. DL envelope size
  6078. >3    string        \&l91A        - Intl. C5 envelope size
  6079. >3    string        \&l100A        - Intl. B5 envelope size
  6080. >3    string        \&l-81A        - No. 10 envelope size (landscape)
  6081. >3    string        \&l-90A        - Intl. DL envelope size (landscape)
  6082.  
  6083. # IMAGEN printer-ready files:
  6084. 0    string    @document(        Imagen printer
  6085. # this only works if "language xxx" is first item in Imagen header.
  6086. >10    string    language\ impress    (imPRESS data)
  6087. >10    string    language\ daisy        (daisywheel text)
  6088. >10    string    language\ diablo    (daisywheel text)
  6089. >10    string    language\ printer    (line printer emulation)
  6090. >10    string    language\ tektronix    (Tektronix 4014 emulation)
  6091. # Add any other languages that your Imagen uses - remember
  6092. # to keep the word `text' if the file is human-readable.
  6093. # [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
  6094. #
  6095. # Now magic for IMAGEN font files...
  6096. 0    string        Rast        RST-format raster font data
  6097. >45    string        >0        face %
  6098. # From Jukka Ukkonen
  6099. 0    string        \033[K\002\0\0\017\033(a\001\0\001\033(g    Canon Bubble Jet BJC formatted data
  6100.  
  6101. # From <mike@flyn.org>
  6102. # These are the /etc/magic entries to decode data sent to an Epson printer.
  6103. 0       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
  6104.  
  6105. #------------------------------------------------------------------------------
  6106. # project:  file(1) magic for Project management
  6107. # Magic strings for ftnchek project files. Alexander Mai
  6108. 0    string    FTNCHEK_\ P    project file for ftnchek
  6109. >10    string    1        version 2.7
  6110. >10    string    2        version 2.8 to 2.10
  6111. >10    string    3        version 2.11 or later
  6112.  
  6113. #------------------------------------------------------------------------------
  6114. # psdbms:  file(1) magic for psdatabase
  6115. #
  6116. 0    belong&0xff00ffff    0x56000000    ps database
  6117. >1    string    >\0    version %s
  6118. >4    string    >\0    from kernel %s
  6119.  
  6120. #------------------------------------------------------------------------------
  6121. # pulsar:  file(1) magic for Pulsar POP3 daemon binary files
  6122. #
  6123. # http://pulsar.sourceforge.net
  6124. # mailto:rok.papez@lugos.si
  6125. #
  6126.  
  6127. 0    belong    0x1ee7f11e    Pulsar POP3 daemon mailbox cache file.
  6128. >4    ubelong    x        Version: %d.
  6129. >8    ubelong    x        \b%d
  6130.  
  6131.  
  6132. #------------------------------------------------------------------------------
  6133. # pyramid:  file(1) magic for Pyramids
  6134. #
  6135. # XXX - byte order?
  6136. #
  6137. 0    long        0x50900107    Pyramid 90x family executable
  6138. 0    long        0x50900108    Pyramid 90x family pure executable
  6139. >16    long        >0        not stripped
  6140. 0    long        0x5090010b    Pyramid 90x family demand paged pure executable
  6141. >16    long        >0        not stripped
  6142. # often the module starts with a multiline string
  6143. 0    string        """    a python script text executable
  6144. # MAGIC as specified in Python/import.c (1.5.2/1.6)
  6145. # 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
  6146. 0    belong        0x994e0d0a    python compiled
  6147.  
  6148. #------------------------------------------------------------------------------
  6149. # riff:  file(1) magic for RIFF format
  6150. # See
  6151. #
  6152. #    http://www.seanet.com/users/matts/riffmci/riffmci.htm
  6153. #
  6154. # and
  6155. #
  6156. #    http://www.ora.com/centers/gff/formats/micriff/index.htm
  6157. #
  6158. # and
  6159. #
  6160. #    http://www.jtauber.com/music/encoding/niff/spec/
  6161. #
  6162. 0    string        RIFF        RIFF (little-endian) data
  6163. # RIFF Palette format
  6164. >8    string        PAL        \b, palette
  6165. >>16    leshort        x        \b, version %d
  6166. >>18    leshort        x        \b, %d entries
  6167. # RIFF Device Independent Bitmap format
  6168. >8    string        RDIB        \b, device-independent bitmap
  6169. >>16    string        BM        
  6170. >>>30    leshort        12        \b, OS/2 1.x format
  6171. >>>>34    leshort        x        \b, %d x
  6172. >>>>36    leshort        x        %d
  6173. >>>30    leshort        64        \b, OS/2 2.x format
  6174. >>>>34    leshort        x        \b, %d x
  6175. >>>>36    leshort        x        %d
  6176. >>>30    leshort        40        \b, Windows 3.x format
  6177. >>>>34    lelong        x        \b, %d x
  6178. >>>>38    lelong        x        %d x
  6179. >>>>44    leshort        x        %d
  6180. # RIFF MIDI format
  6181. >8    string        RMID        \b, MIDI
  6182. # RIFF Multimedia Movie File format
  6183. >8    string        RMMP        \b, multimedia movie
  6184. # Microsoft WAVE format (*.wav)
  6185. >8    string        WAVE        \b, WAVE audio
  6186. >>20    leshort        1        \b, Microsoft PCM
  6187. >>>34    leshort        >0        \b, %d bit
  6188. >>20    leshort        2        \b, Microsoft ADPCM
  6189. >>20    leshort        6        \b, ITU G.711 a-law
  6190. >>20    leshort        7        \b, ITU G.711 u-law
  6191. >>20    leshort        17        \b, IMA ADPCM
  6192. >>20    leshort        20        \b, ITU G.723 ADPCM (Yamaha)
  6193. >>20    leshort        49        \b, GSM 6.10
  6194. >>20    leshort        64        \b, ITU G.721 ADPCM
  6195. >>20    leshort        80        \b, MPEG
  6196. >>20    leshort        85        \b, MPEG Layer 3
  6197. >>22    leshort        =1        \b, mono
  6198. >>22    leshort        =2        \b, stereo
  6199. >>22    leshort        >2        \b, %d channels
  6200. >>24    lelong        >0        %d Hz
  6201. # AVI == Audio Video Interleave
  6202. >8      string          AVI\            \b, AVI
  6203. # Animated Cursor format
  6204. >8    string        ACON        \b, animated cursor
  6205.  
  6206. #
  6207. # XXX - some of the below may only appear in little-endian form.
  6208. #
  6209. # Also "MV93" appears to be for one form of Macromedia Director
  6210. # files, and "GDMF" appears to be another multimedia format.
  6211. #
  6212. 0    string        RIFX        RIFF (big-endian) data
  6213. # RIFF Palette format
  6214. >8    string        PAL        \b, palette
  6215. >>16    beshort        x        \b, version %d
  6216. >>18    beshort        x        \b, %d entries
  6217. # RIFF Device Independent Bitmap format
  6218. >8    string        RDIB        \b, device-independent bitmap
  6219. >>16    string        BM        
  6220. >>>30    beshort        12        \b, OS/2 1.x format
  6221. >>>>34    beshort        x        \b, %d x
  6222. >>>>36    beshort        x        %d
  6223. >>>30    beshort        64        \b, OS/2 2.x format
  6224. >>>>34    beshort        x        \b, %d x
  6225. >>>>36    beshort        x        %d
  6226. >>>30    beshort        40        \b, Windows 3.x format
  6227. >>>>34    belong        x        \b, %d x
  6228. >>>>38    belong        x        %d x
  6229. >>>>44    beshort        x        %d
  6230. # RIFF MIDI format
  6231. >8    string        RMID        \b, MIDI
  6232. # RIFF Multimedia Movie File format
  6233. >8    string        RMMP        \b, multimedia movie
  6234. # Microsoft WAVE format (*.wav)
  6235. >8    string        WAVE        \b, WAVE audio
  6236. >>20    leshort        1        \b, Microsoft PCM
  6237. >>>34    leshort        >0        \b, %d bit
  6238. >>22    beshort        =1        \b, mono
  6239. >>22    beshort        =2        \b, stereo
  6240. >>22    beshort        >2        \b, %d channels
  6241. >>24    belong        >0        %d Hz
  6242. # AVI == Audio Video Interleave
  6243. >8      string          AVI\            \b, AVI
  6244. # Animated Cursor format
  6245. >8    string        ACON        \b, animated cursor
  6246. # Notation Interchange File Format (big-endian only)
  6247. >8    string        NIFF        \b, Notation Interchange File Format
  6248.  
  6249. # SoundFont 2 <mpruett@sgi.com>
  6250. >8    string        sfbk        SoundFont 2
  6251. #------------------------------------------------------------------------------
  6252. #
  6253. # RPM: file(1) magic for Red Hat Packages   Erik Troan (ewt@redhat.com)
  6254. #
  6255. 0    beshort        0xedab        
  6256. >2    beshort        0xeedb        RPM
  6257. >>4    byte        x        v%d
  6258. >>6    beshort        0        bin
  6259. >>6    beshort        1        src
  6260. >>8    beshort        1        i386
  6261. >>8    beshort        2        Alpha
  6262. >>8    beshort        3        Sparc
  6263. >>8    beshort        4        MIPS
  6264. >>8    beshort        5        PowerPC
  6265. >>8    beshort        6        68000
  6266. >>8     beshort         7               SGI
  6267. >>10    string        x        %s
  6268.  
  6269. #------------------------------------------------------------------------------
  6270. # rtf:    file(1) magic for Rich Text Format (RTF)
  6271. #
  6272. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  6273. #
  6274. 0    string        {\\rtf        Rich Text Format data,
  6275. >5    byte        x        version %c,
  6276. >6    string        \\ansi        ANSI
  6277. >6    string        \\mac        Apple Macintosh
  6278. >6    string        \\pc        IBM PC, code page 437
  6279. >6    string        \\pca        IBM PS/2, code page 850
  6280.  
  6281. #------------------------------------------------------------------------------
  6282. # sc:  file(1) magic for "sc" spreadsheet
  6283. #
  6284. 38    string        Spreadsheet    sc spreadsheet file
  6285.  
  6286. #------------------------------------------------------------------------------
  6287. # sccs:  file(1) magic for SCCS archives
  6288. #
  6289. # SCCS archive structure:
  6290. # \001h01207
  6291. # \001s 00276/00000/00000
  6292. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  6293. # \001c date and time created 87/09/23 08:09:20 by ian
  6294. # \001e
  6295. # \001u
  6296. # \001U
  6297. # ... etc.
  6298. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  6299. # *Sigh*. And these both came from various parts of the USG.
  6300. # Maybe we should just switch everybody from SCCS to RCS!
  6301. # Further, you can't just say '\001h0', because the five-digit number
  6302. # is a checksum that could (presumably) have any leading digit,
  6303. # and we don't have regular expression matching yet. 
  6304. # Hence the following official kludge:
  6305. 8    string        \001s\             SCCS archive data
  6306.  
  6307. #------------------------------------------------------------------------------
  6308. # sendmail:  file(1) magic for sendmail config files
  6309. #
  6310. # XXX - byte order?
  6311. #
  6312. 0    byte    046      Sendmail frozen configuration 
  6313. >16    string    >\0      - version %s
  6314. 0    short    0x271c      Sendmail frozen configuration
  6315. >16    string    >\0      - version %s
  6316.  
  6317. #------------------------------------------------------------------------------
  6318. # sendmail:  file(1) magic for sendmail m4(1) files
  6319. #
  6320. # From Hendrik Scholz <hendrik@scholz.net>
  6321. # i.e. files in /usr/share/sendmail/cf/
  6322. #
  6323. 0   string  divert(-1)\n    sendmail m4 text file
  6324.  
  6325.  
  6326. #------------------------------------------------------------------------------
  6327. # sequent:  file(1) magic for Sequent machines
  6328. #
  6329. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  6330. # For Sequent's multiprocessor systems (incomplete).
  6331. 0    lelong    0x00ea            BALANCE NS32000 .o
  6332. >16    lelong    >0        not stripped
  6333. >124    lelong    >0        version %ld
  6334. 0    lelong    0x10ea            BALANCE NS32000 executable (0 @ 0)
  6335. >16    lelong  >0                not stripped
  6336. >124    lelong    >0        version %ld
  6337. 0    lelong    0x20ea            BALANCE NS32000 executable (invalid @ 0)
  6338. >16    lelong  >0                not stripped
  6339. >124    lelong    >0        version %ld
  6340. 0    lelong    0x30ea            BALANCE NS32000 standalone executable
  6341. >16    lelong  >0              not stripped
  6342. >124    lelong    >0        version %ld
  6343. #
  6344. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  6345. # Symmetry magic nums will not be reached if DOS COM comes before them;
  6346. # byte 0xeb is matched before these get a chance.
  6347. 0    leshort    0x12eb        SYMMETRY i386 .o
  6348. >16    lelong    >0        not stripped
  6349. >124    lelong    >0        version %ld
  6350. 0    leshort    0x22eb        SYMMETRY i386 executable (0 @ 0)
  6351. >16    lelong    >0        not stripped
  6352. >124    lelong    >0        version %ld
  6353. 0    leshort    0x32eb        SYMMETRY i386 executable (invalid @ 0)
  6354. >16    lelong    >0        not stripped
  6355. >124    lelong    >0        version %ld
  6356. 0    leshort    0x42eb        SYMMETRY i386 standalone executable
  6357. >16    lelong    >0        not stripped
  6358. >124    lelong    >0        version %ld
  6359.  
  6360. #------------------------------------------------------------------------------
  6361. # sgml:  file(1) magic for Standard Generalized Markup Language
  6362. # HyperText Markup Language (HTML) is an SGML document type,
  6363. # from Daniel Quinlan (quinlan@yggdrasil.com)
  6364. # adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
  6365. 0   string/cB    \<!doctype\ html    HTML document text
  6366. 0   string/c    \<head            HTML document text
  6367. 0   string/c    \<title            HTML document text
  6368. 0   string/c    \<html            HTML document text
  6369.  
  6370. # Extensible markup language (XML), a subset of SGML
  6371. # from Marc Prud'hommeaux (marc@apocalypse.org)
  6372. 0   string/c    \<?xml            XML document text
  6373.  
  6374.  
  6375. # SGML, mostly from rph@sq
  6376. 0   string/c    \<!doctype        exported SGML document text
  6377. 0   string/c    \<!subdoc        exported SGML subdocument text
  6378. 0   string    \<!--            exported SGML document text
  6379.  
  6380. #------------------------------------------------------------------------
  6381. # file(1) magic for sharc files
  6382. #
  6383. # SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by 
  6384. # FutureGroove Music (dsp@futuregroove.de)
  6385.  
  6386. #------------------------------------------------------------------------
  6387. 0    string            Draw        RiscOS Drawfile
  6388. 0    string            PACK        RiscOS PackdDir archive
  6389.  
  6390. #------------------------------------------------------------------------
  6391. # SHARC DSP stuff (based on the FGM SHARC DSP SDK)
  6392.  
  6393. 0    string            !        Assembler source
  6394. 0    string            Analog        ADi asm listing file
  6395. 0    string            .SYSTEM        SHARC architecture file
  6396. 0    string            .system        SHARC architecture file
  6397.  
  6398. 0    leshort            0x521C        SHARC COFF binary
  6399. >2    leshort            >1        , %hd sections
  6400. >>12    lelong            >0        , not stripped
  6401.  
  6402. #------------------------------------------------------------------------------
  6403. # Sketch Drawings: http://sketch.sourceforge.net/ 
  6404. # From: Edwin Mons <e@ik.nu>
  6405. 0    string    ##Sketch    Sketch document text
  6406.  
  6407. #-----------------------------------------------
  6408. # GNU Smalltalk image, starting at version 1.6.2
  6409. # From: catull_us@yahoo.com
  6410. #
  6411. 0    string    GSTIm\0\0    GNU SmallTalk
  6412. # little-endian
  6413. >7    byte&1    =0        LE image version
  6414. >>10    byte    x        %d.
  6415. >>9    byte    x        \b%d.
  6416. >>8    byte    x        \b%d
  6417. #>>12    lelong    x        , data: %ld
  6418. #>>16    lelong    x        , table: %ld
  6419. #>>20    lelong    x        , memory: %ld
  6420. # big-endian
  6421. >7    byte&1    =1        BE image version
  6422. >>8    byte    x        %d.
  6423. >>9    byte    x        \b%d.
  6424. >>10    byte    x        \b%d
  6425. #>>12    belong    x        , data: %ld
  6426. #>>16    belong    x        , table: %ld
  6427. #>>20    belong    x        , memory: %ld
  6428.  
  6429.  
  6430.  
  6431. #------------------------------------------------------------------------------
  6432. # sniffer:  file(1) magic for packet capture files
  6433. #
  6434. # From: guy@alum.mit.edu (Guy Harris)
  6435. #
  6436.  
  6437. #
  6438. # Microsoft Network Monitor 1.x capture files.
  6439. #
  6440. 0    string        RTSS        NetMon capture file
  6441. >4    byte        x        - version %d
  6442. >5    byte        x        \b.%d
  6443. >6    leshort        0        (Unknown)
  6444. >6    leshort        1        (Ethernet)
  6445. >6    leshort        2        (Token Ring)
  6446. >6    leshort        3        (FDDI)
  6447.  
  6448. #
  6449. # Microsoft Network Monitor 2.x capture files.
  6450. #
  6451. 0    string        GMBU        NetMon capture file
  6452. >4    byte        x        - version %d
  6453. >5    byte        x        \b.%d
  6454. >6    leshort        0        (Unknown)
  6455. >6    leshort        1        (Ethernet)
  6456. >6    leshort        2        (Token Ring)
  6457. >6    leshort        3        (FDDI)
  6458.  
  6459. #
  6460. # Network General Sniffer capture files.
  6461. # Sorry, make that "Network Associates Sniffer capture files."
  6462. #
  6463. 0    string        TRSNIFF\ data\ \ \ \ \032    Sniffer capture file
  6464. >33    byte        2        (compressed)
  6465. >23    leshort        x        - version %d
  6466. >25    leshort        x        \b.%d
  6467. >32    byte        0        (Token Ring)
  6468. >32    byte        1        (Ethernet)
  6469. >32    byte        2        (ARCNET)
  6470. >32    byte        3        (StarLAN)
  6471. >32    byte        4        (PC Network broadband)
  6472. >32    byte        5        (LocalTalk)
  6473. >32    byte        6        (Znet)
  6474. >32    byte        7        (Internetwork Analyzer)
  6475. >32    byte        9        (FDDI)
  6476. >32    byte        10        (ATM)
  6477.  
  6478. #
  6479. # Cinco Networks NetXRay capture files.
  6480. # Sorry, make that "Network General Sniffer Basic capture files."
  6481. # Sorry, make that "Network Associates Sniffer Basic capture files."
  6482. # Sorry, make that "Network Associates Sniffer Basic, and Windows
  6483. # Sniffer Pro", capture files."
  6484. #
  6485. 0    string        XCP\0        NetXRay capture file
  6486. >4    string        >\0        - version %s
  6487. >44    leshort        0        (Ethernet)
  6488. >44    leshort        1        (Token Ring)
  6489. >44    leshort        2        (FDDI)
  6490.  
  6491. #
  6492. # "libpcap" capture files.
  6493. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  6494. # the main program that uses that format, but there are other programs
  6495. # that use "libpcap", or that use the same capture file format.)
  6496. #
  6497. 0    ubelong        0xa1b2c3d4    tcpdump capture file (big-endian)
  6498. >4    beshort        x        - version %d
  6499. >6    beshort        x        \b.%d
  6500. >20    belong        0        (No link-layer encapsulation
  6501. >20    belong        1        (Ethernet
  6502. >20    belong        2        (3Mb Ethernet
  6503. >20    belong        3        (AX.25
  6504. >20    belong        4        (ProNET
  6505. >20    belong        5        (CHAOS
  6506. >20    belong        6        (Token Ring
  6507. >20    belong        7        (ARCNET
  6508. >20    belong        8        (SLIP
  6509. >20    belong        9        (PPP
  6510. >20    belong        10        (FDDI
  6511. >20    belong        11        (RFC 1483 ATM
  6512. >20    belong        12        (raw IP
  6513. >20    belong        13        (BSD/OS SLIP
  6514. >20    belong        14        (BSD/OS PPP
  6515. >20    belong        50        (PPP or Cisco HDLC
  6516. >20    belong        51        (PPP-over-Ethernet
  6517. >20    belong        100        (RFC 1483 ATM
  6518. >20    belong        101        (raw IP
  6519. >20    belong        102        (BSD/OS SLIP
  6520. >20    belong        103        (BSD/OS PPP
  6521. >20    belong        104        (BSD/OS Cisco HDLC
  6522. >20    belong        105        (802.11
  6523. >20    belong        106        (Linux Classical IP over ATM
  6524. >20    belong        108        (OpenBSD loopback
  6525. >20    belong        109        (OpenBSD IPSEC encrypted
  6526. >20    belong        113        (Linux "cooked"
  6527. >20    belong        114        (LocalTalk
  6528. >16    belong        x        \b, capture length %d)
  6529. 0    ulelong        0xa1b2c3d4    tcpdump capture file (little-endian)
  6530. >4    leshort        x        - version %d
  6531. >6    leshort        x        \b.%d
  6532. >20    lelong        0        (No link-layer encapsulation
  6533. >20    lelong        1        (Ethernet
  6534. >20    lelong        2        (3Mb Ethernet
  6535. >20    lelong        3        (AX.25
  6536. >20    lelong        4        (ProNET
  6537. >20    lelong        5        (CHAOS
  6538. >20    lelong        6        (Token Ring
  6539. >20    lelong        7        (ARCNET
  6540. >20    lelong        8        (SLIP
  6541. >20    lelong        9        (PPP
  6542. >20    lelong        10        (FDDI
  6543. >20    lelong        11        (RFC 1483 ATM
  6544. >20    lelong        12        (raw IP
  6545. >20    lelong        13        (BSD/OS SLIP
  6546. >20    lelong        14        (BSD/OS PPP
  6547. >20    lelong        50        (PPP or Cisco HDLC
  6548. >20    lelong        51        (PPP-over-Ethernet
  6549. >20    lelong        100        (RFC 1483 ATM
  6550. >20    lelong        101        (raw IP
  6551. >20    lelong        102        (BSD/OS SLIP
  6552. >20    lelong        103        (BSD/OS PPP
  6553. >20    lelong        104        (BSD/OS Cisco HDLC
  6554. >20    lelong        105        (802.11
  6555. >20    lelong        106        (Linux Classical IP over ATM
  6556. >20    lelong        108        (OpenBSD loopback
  6557. >20    lelong        109        (OpenBSD IPSEC encrypted
  6558. >20    lelong        113        (Linux "cooked"
  6559. >20    lelong        114        (LocalTalk
  6560. >16    lelong        x        \b, capture length %d)
  6561.  
  6562. #
  6563. # "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
  6564. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  6565. # the main program that uses that format, but there are other programs
  6566. # that use "libpcap", or that use the same capture file format.)
  6567. #
  6568. 0    ubelong        0xa1b2cd34    extended tcpdump capture file (big-endian)
  6569. >4    beshort        x        - version %d
  6570. >6    beshort        x        \b.%d
  6571. >20    belong        0        (No link-layer encapsulation
  6572. >20    belong        1        (Ethernet
  6573. >20    belong        2        (3Mb Ethernet
  6574. >20    belong        3        (AX.25
  6575. >20    belong        4        (ProNET
  6576. >20    belong        5        (CHAOS
  6577. >20    belong        6        (Token Ring
  6578. >20    belong        7        (ARCNET
  6579. >20    belong        8        (SLIP
  6580. >20    belong        9        (PPP
  6581. >20    belong        10        (FDDI
  6582. >20    belong        11        (RFC 1483 ATM
  6583. >20    belong        12        (raw IP
  6584. >20    belong        13        (BSD/OS SLIP
  6585. >20    belong        14        (BSD/OS PPP
  6586. >16    belong        x        \b, capture length %d)
  6587. 0    ulelong        0xa1b2cd34    extended tcpdump capture file (little-endian)
  6588. >4    leshort        x        - version %d
  6589. >6    leshort        x        \b.%d
  6590. >20    lelong        0        (No link-layer encapsulation
  6591. >20    lelong        1        (Ethernet
  6592. >20    lelong        2        (3Mb Ethernet
  6593. >20    lelong        3        (AX.25
  6594. >20    lelong        4        (ProNET
  6595. >20    lelong        5        (CHAOS
  6596. >20    lelong        6        (Token Ring
  6597. >20    lelong        7        (ARCNET
  6598. >20    lelong        8        (SLIP
  6599. >20    lelong        9        (PPP
  6600. >20    lelong        10        (FDDI
  6601. >20    lelong        11        (RFC 1483 ATM
  6602. >20    lelong        12        (raw IP
  6603. >20    lelong        13        (BSD/OS SLIP
  6604. >20    lelong        14        (BSD/OS PPP
  6605. >16    lelong        x        \b, capture length %d)
  6606.  
  6607. #
  6608. # AIX "iptrace" capture files.
  6609. #
  6610. 0    string        iptrace\ 2.0    "iptrace" capture file
  6611.  
  6612. #
  6613. # Novell LANalyzer capture files.
  6614. #
  6615. 0    leshort        0x1001        LANalyzer capture file
  6616. 0    leshort        0x1007        LANalyzer capture file
  6617.  
  6618. #
  6619. # HP-UX "nettl" capture files.
  6620. #
  6621. 0    string        \x54\x52\x00\x64\x00    "nettl" capture file
  6622.  
  6623. #
  6624. # RADCOM WAN/LAN Analyzer capture files.
  6625. #
  6626. 0    string        \x42\xd2\x00\x34\x12\x66\x22\x88    RADCOM WAN/LAN Analyzer capture file
  6627.  
  6628. #
  6629. # NetStumbler log files.  Not really packets, per se, but about as
  6630. # close as you can get.  These are log files from NetStumbler, a
  6631. # Windows program, that scans for 802.11b networks.
  6632. #
  6633. 0    string        NetS        NetStumbler log file
  6634. >8    lelong        x        \b, %d stations found
  6635.  
  6636. #------------------------------------------------------------------------------
  6637. # softquad:  file(1) magic for SoftQuad Publishing Software
  6638. #
  6639. # Author/Editor and RulesBuilder
  6640. #
  6641. # XXX - byte order?
  6642. #
  6643. 0    string        \<!SQ\ DTD>    Compiled SGML rules file
  6644. >9    string        >\0         Type %s
  6645. 0    string        \<!SQ\ A/E>    A/E SGML Document binary
  6646. >9    string        >\0         Type %s
  6647. 0    string        \<!SQ\ STS>    A/E SGML binary styles file
  6648. >9    string        >\0         Type %s
  6649. 0    short        0xc0de        Compiled PSI (v1) data
  6650. 0    short        0xc0da        Compiled PSI (v2) data
  6651. >3    string        >\0        (%s)
  6652. # Binary sqtroff font/desc files...
  6653. 0    short        0125252        SoftQuad DESC or font file binary
  6654. >2    short        >0        - version %d
  6655. # Bitmaps...
  6656. 0    string        SQ\ BITMAP1    SoftQuad Raster Format text
  6657. #0    string        SQ\ BITMAP2    SoftQuad Raster Format data
  6658. # sqtroff intermediate language (replacement for ditroff int. lang.)
  6659. 0    string        X\         SoftQuad troff Context intermediate
  6660. >2    string        495        for AT&T 495 laser printer
  6661. >2    string        hp        for Hewlett-Packard LaserJet
  6662. >2    string        impr        for IMAGEN imPRESS
  6663. >2    string        ps        for PostScript
  6664.  
  6665. #------------------------------------------------------------------------------
  6666. # spectrum:  file(1) magic for Spectrum emulator files.
  6667. #
  6668. # John Elliott <jce@seasip.demon.co.uk>
  6669.  
  6670. #
  6671. # Spectrum +3DOS header
  6672. #
  6673. 0       string          PLUS3DOS\032    Spectrum +3 data
  6674. >15     byte            0               - BASIC program
  6675. >15     byte            1               - number array
  6676. >15     byte            2               - character array
  6677. >15     byte            3               - memory block
  6678. >>16    belong          0x001B0040      (screen)
  6679. >15     byte            4               - Tasword document
  6680. >15     string          TAPEFILE        - ZXT tapefile
  6681. #
  6682. # Tape file. This assumes the .TAP starts with a Spectrum-format header,
  6683. # which nearly all will.
  6684. #
  6685. 0       string          \023\000\000    Spectrum .TAP data
  6686. >4      string          x               "%-10.10s"
  6687. >3      byte            0               - BASIC program
  6688. >3      byte            1               - number array
  6689. >3      byte            2               - character array
  6690. >3      byte            3               - memory block
  6691. >>14    belong          0x001B0040      (screen)
  6692.  
  6693. #------------------------------------------------------------------------------
  6694. # sun:  file(1) magic for Sun machines
  6695. #
  6696. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  6697. # releases.  (5.x uses ELF.)
  6698. #
  6699. 0    belong&077777777    0600413        sparc demand paged
  6700. >0    byte        &0x80
  6701. >>20    belong        <4096        shared library
  6702. >>20    belong        =4096        dynamically linked executable
  6703. >>20    belong        >4096        dynamically linked executable
  6704. >0    byte        ^0x80        executable
  6705. >16    belong        >0        not stripped
  6706. 0    belong&077777777    0600410        sparc pure
  6707. >0    byte        &0x80        dynamically linked executable
  6708. >0    byte        ^0x80        executable
  6709. >16    belong        >0        not stripped
  6710. 0    belong&077777777    0600407        sparc
  6711. >0    byte        &0x80        dynamically linked executable
  6712. >0    byte        ^0x80        executable
  6713. >16    belong        >0        not stripped
  6714.  
  6715. 0    belong&077777777    0400413        mc68020 demand paged
  6716. >0    byte        &0x80
  6717. >>20    belong        <4096        shared library
  6718. >>20    belong        =4096        dynamically linked executable
  6719. >>20    belong        >4096        dynamically linked executable
  6720. >16    belong        >0        not stripped
  6721. 0    belong&077777777    0400410        mc68020 pure
  6722. >0    byte        &0x80        dynamically linked executable
  6723. >0    byte        ^0x80        executable
  6724. >16    belong        >0        not stripped
  6725. 0    belong&077777777    0400407        mc68020
  6726. >0    byte        &0x80        dynamically linked executable
  6727. >0    byte        ^0x80        executable
  6728. >16    belong        >0        not stripped
  6729.  
  6730. 0    belong&077777777    0200413        mc68010 demand paged
  6731. >0    byte        &0x80
  6732. >>20    belong        <4096        shared library
  6733. >>20    belong        =4096        dynamically linked executable
  6734. >>20    belong        >4096        dynamically linked executable
  6735. >16    belong        >0        not stripped
  6736. 0    belong&077777777    0200410        mc68010 pure
  6737. >0    byte        &0x80        dynamically linked executable
  6738. >0    byte        ^0x80        executable
  6739. >16    belong        >0        not stripped
  6740. 0    belong&077777777    0200407        mc68010
  6741. >0    byte        &0x80        dynamically linked executable
  6742. >0    byte        ^0x80        executable
  6743. >16    belong        >0        not stripped
  6744.  
  6745. # reworked these to avoid anything beginning with zero becoming "old sun-2"
  6746. 0    belong        0407        old sun-2 executable
  6747. >16    belong        >0        not stripped
  6748. 0    belong        0410        old sun-2 pure executable
  6749. >16    belong        >0        not stripped
  6750. 0    belong        0413        old sun-2 demand paged executable
  6751. >16    belong        >0        not stripped
  6752.  
  6753. #
  6754. # Core files.  "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  6755. # binary executed in compatibility mode under SunOS 5.x".
  6756. #
  6757. 0    belong        0x080456    SunOS core file
  6758. >4    belong        432        (SPARC)
  6759. >>132    string        >\0        from '%s'
  6760. >>116    belong        =3        (quit)
  6761. >>116    belong        =4        (illegal instruction)
  6762. >>116    belong        =5        (trace trap)
  6763. >>116    belong        =6        (abort)
  6764. >>116    belong        =7        (emulator trap)
  6765. >>116    belong        =8        (arithmetic exception)
  6766. >>116    belong        =9        (kill)
  6767. >>116    belong        =10        (bus error)
  6768. >>116    belong        =11        (segmentation violation)
  6769. >>116    belong        =12        (bad argument to system call)
  6770. >>116    belong        =29        (resource lost)
  6771. >>120    belong        x        (T=%dK,
  6772. >>124    belong        x        D=%dK,
  6773. >>128    belong        x        S=%dK)
  6774. >4    belong        826        (68K)
  6775. >>128    string        >\0        from '%s'
  6776. >4    belong        456        (SPARC 4.x BCP)
  6777. >>152    string        >\0        from '%s'
  6778. # Sun SunPC
  6779. 0    long        0xfa33c08e    SunPC 4.0 Hard Disk
  6780. 0    string        #SUNPC_CONFIG    SunPC 4.0 Properties Values
  6781. # Sun snoop (see RFC 1761, which describes the capture file format).
  6782. #
  6783. 0    string        snoop        Snoop capture file
  6784. >8    belong        >0        - version %ld
  6785. >12    belong        0        (IEEE 802.3)
  6786. >12    belong        1        (IEEE 802.4)
  6787. >12    belong        2        (IEEE 802.5)
  6788. >12    belong        3        (IEEE 802.6)
  6789. >12    belong        4        (Ethernet)
  6790. >12    belong        5        (HDLC)
  6791. >12    belong        6        (Character synchronous)
  6792. >12    belong        7        (IBM channel-to-channel adapter)
  6793. >12    belong        8        (FDDI)
  6794. >12    belong        9        (Unknown)
  6795. # Sun KCMS
  6796. 36    string        acsp        Kodak Color Management System, ICC Profile
  6797.  
  6798.  
  6799. #------------------------------------------------------------------------
  6800. # sysex: file(1) magic for MIDI sysex files
  6801. #
  6802. 0    byte            0xF0        SysEx File -
  6803.  
  6804. >1    byte            0x2f        ELKA
  6805. >>3    byte            0x09        EK-44
  6806.  
  6807. >1    byte            0x3e        Waldorf
  6808. >>3    byte            0x7f        Microwave I
  6809.  
  6810. >1    byte            0x40        Kawai
  6811. >>3    byte            0x22        K4
  6812.  
  6813. >1    byte            0x41        Roland
  6814. >>3    byte            0x14        D-50
  6815. >>3    byte            0x2b        U-220
  6816. >>3    byte            0x02        TR-707
  6817.  
  6818. >1    byte            0x42        Korg
  6819. >>3    byte            0x19        M1
  6820.  
  6821. >1    byte            0x43        Yamaha
  6822. >1    byte            0x44        Casio
  6823. >1    byte            0x46        Kamiya
  6824. >1    byte            0x47        Akai
  6825. >1    byte            0x48        Victor
  6826. >1    byte            0x4b        Fujitsu
  6827. >1    byte            0x4c        Sony
  6828. >1    byte            0x4e        Teac
  6829. >1    byte            0x50        Matsushita
  6830. >1    byte            0x51        Fostex
  6831. >1    byte            0x52        Zoom
  6832. >1    byte            0x54        Matsushita
  6833. >1    byte            0x57        Acoustic tech. lab.
  6834.  
  6835. >1    belong&0xffffff00    0x00007400    Ta Horng
  6836. >1    belong&0xffffff00    0x00007500    e-Tek
  6837. >1    belong&0xffffff00    0x00007600    E-Voice
  6838. >1    belong&0xffffff00    0x00007700    Midisoft
  6839. >1    belong&0xffffff00    0x00007800    Q-Sound
  6840. >1    belong&0xffffff00    0x00007900    Westrex
  6841. >1    belong&0xffffff00    0x00007a00    Nvidia*
  6842. >1    belong&0xffffff00    0x00007b00    ESS
  6843. >1    belong&0xffffff00    0x00007c00    Mediatrix
  6844. >1    belong&0xffffff00    0x00007d00    Brooktree
  6845. >1    belong&0xffffff00    0x00007e00    Otari
  6846. >1    belong&0xffffff00    0x00007f00    Key Electronics
  6847. >1    belong&0xffffff00    0x00010000    Shure
  6848. >1    belong&0xffffff00    0x00010100    AuraSound
  6849. >1    belong&0xffffff00    0x00010200    Crystal
  6850. >1    belong&0xffffff00    0x00010300    Rockwell
  6851. >1    belong&0xffffff00    0x00010400    Silicon Graphics
  6852. >1    belong&0xffffff00    0x00010500    Midiman
  6853. >1    belong&0xffffff00    0x00010600    PreSonus
  6854. >1    belong&0xffffff00    0x00010800    Topaz
  6855. >1    belong&0xffffff00    0x00010900    Cast Lightning
  6856. >1    belong&0xffffff00    0x00010a00    Microsoft
  6857. >1    belong&0xffffff00    0x00010b00    Sonic Foundry
  6858. >1    belong&0xffffff00    0x00010c00    Line 6
  6859. >1    belong&0xffffff00    0x00010d00    Beatnik Inc.
  6860. >1    belong&0xffffff00    0x00010e00    Van Koerving
  6861. >1    belong&0xffffff00    0x00010f00    Altech Systems
  6862. >1    belong&0xffffff00    0x00011000    S & S Research
  6863. >1    belong&0xffffff00    0x00011100    VLSI Technology
  6864. >1    belong&0xffffff00    0x00011200    Chromatic
  6865. >1    belong&0xffffff00    0x00011300    Sapphire
  6866. >1    belong&0xffffff00    0x00011400    IDRC
  6867. >1    belong&0xffffff00    0x00011500    Justonic Tuning
  6868. >1    belong&0xffffff00    0x00011600    TorComp
  6869. >1    belong&0xffffff00    0x00011700    Newtek Inc.
  6870. >1    belong&0xffffff00    0x00011800    Sound Sculpture
  6871. >1    belong&0xffffff00    0x00011900    Walker Technical
  6872. >1    belong&0xffffff00    0x00011a00    Digital Harmony
  6873. >1    belong&0xffffff00    0x00011b00    InVision
  6874. >1    belong&0xffffff00    0x00011c00    T-Square
  6875. >1    belong&0xffffff00    0x00011d00    Nemesys
  6876. >1    belong&0xffffff00    0x00011e00    DBX
  6877. >1    belong&0xffffff00    0x00011f00    Syndyne
  6878. >1    belong&0xffffff00    0x00012000    Bitheadz    
  6879. >1    belong&0xffffff00    0x00012100    Cakewalk
  6880. >1    belong&0xffffff00    0x00012200    Staccato
  6881. >1    belong&0xffffff00    0x00012300    National Semicon.
  6882. >1    belong&0xffffff00    0x00012400    Boom Theory
  6883. >1    belong&0xffffff00    0x00012500    Virtual DSP Corp
  6884. >1    belong&0xffffff00    0x00012600    Antares
  6885. >1    belong&0xffffff00    0x00012700    Angel Software
  6886. >1    belong&0xffffff00    0x00012800    St Louis Music
  6887. >1    belong&0xffffff00    0x00012900    Lyrrus dba G-VOX
  6888. >1    belong&0xffffff00    0x00012a00    Ashley Audio
  6889. >1    belong&0xffffff00    0x00012b00    Vari-Lite
  6890. >1    belong&0xffffff00    0x00012c00    Summit Audio
  6891. >1    belong&0xffffff00    0x00012d00    Aureal Semicon.
  6892. >1    belong&0xffffff00    0x00012e00    SeaSound
  6893. >1    belong&0xffffff00    0x00012f00    U.S. Robotics
  6894. >1    belong&0xffffff00    0x00013000    Aurisis
  6895. >1    belong&0xffffff00    0x00013100    Nearfield Multimedia
  6896. >1    belong&0xffffff00    0x00013200    FM7 Inc.
  6897. >1    belong&0xffffff00    0x00013300    Swivel Systems
  6898. >1    belong&0xffffff00    0x00013400    Hyperactive
  6899. >1    belong&0xffffff00    0x00013500    MidiLite
  6900. >1    belong&0xffffff00    0x00013600    Radical
  6901. >1    belong&0xffffff00    0x00013700    Roger Linn
  6902. >1    belong&0xffffff00    0x00013800    Helicon
  6903. >1    belong&0xffffff00    0x00013900    Event
  6904. >1    belong&0xffffff00    0x00013a00    Sonic Network
  6905. >1    belong&0xffffff00    0x00013b00    Realtime Music
  6906. >1    belong&0xffffff00    0x00013c00    Apogee Digital
  6907.  
  6908. >1    belong&0xffffff00    0x00202b00    Medeli Electronics
  6909. >1    belong&0xffffff00    0x00202c00    Charlie Lab
  6910. >1    belong&0xffffff00    0x00202d00    Blue Chip Music
  6911. >1    belong&0xffffff00    0x00202e00    BEE OH Corp
  6912. >1    belong&0xffffff00    0x00202f00    LG Semicon America
  6913. >1    belong&0xffffff00    0x00203000    TESI
  6914. >1    belong&0xffffff00    0x00203100    EMAGIC
  6915. >1    belong&0xffffff00    0x00203200    Behringer
  6916. >1    belong&0xffffff00    0x00203300    Access Music
  6917. >1    belong&0xffffff00    0x00203400    Synoptic
  6918. >1    belong&0xffffff00    0x00203500    Hanmesoft Corp
  6919. >1    belong&0xffffff00    0x00203600    Terratec
  6920. >1    belong&0xffffff00    0x00203700    Proel SpA
  6921. >1    belong&0xffffff00    0x00203800    IBK MIDI
  6922. >1    belong&0xffffff00    0x00203900    IRCAM
  6923. >1    belong&0xffffff00    0x00203a00    Propellerhead Software
  6924. >1    belong&0xffffff00    0x00203b00    Red Sound Systems
  6925. >1    belong&0xffffff00    0x00203c00    Electron ESI AB
  6926. >1    belong&0xffffff00    0x00203d00    Sintefex Audio
  6927. >1    belong&0xffffff00    0x00203e00    Music and More
  6928. >1    belong&0xffffff00    0x00203f00    Amsaro
  6929. >1    belong&0xffffff00    0x00204000    CDS Advanced Technology
  6930. >1    belong&0xffffff00    0x00204100    Touched by Sound
  6931. >1    belong&0xffffff00    0x00204200    DSP Arts
  6932. >1    belong&0xffffff00    0x00204300    Phil Rees Music
  6933. >1    belong&0xffffff00    0x00204400    Stamer Musikanlagen GmbH
  6934. >1    belong&0xffffff00    0x00204500    Soundart
  6935. >1    belong&0xffffff00    0x00204600    C-Mexx Software
  6936. >1    belong&0xffffff00    0x00204700    Klavis Tech.
  6937. >1    belong&0xffffff00    0x00204800    Noteheads AB
  6938.  
  6939. 0    string            T707        Roland TR-707 Data
  6940. #------------------------------------------------------------------------------
  6941. # teapot:  file(1) magic for "teapot" spreadsheet
  6942. #
  6943. 0       string          #!teapot\012xdr      teapot work sheet (XDR format)
  6944.  
  6945. #------------------------------------------------------------------------------
  6946. # terminfo:  file(1) magic for terminfo
  6947. #
  6948. # XXX - byte order for screen images?
  6949. #
  6950. 0    string        \032\001    Compiled terminfo entry
  6951. 0    short        0433        Curses screen image
  6952. 0    short        0434        Curses screen image
  6953.  
  6954. #------------------------------------------------------------------------------
  6955. # tex:  file(1) magic for TeX files
  6956. #
  6957. # From <conklin@talisman.kaleida.com>
  6958.  
  6959. # Although we may know the offset of certain text fields in TeX DVI
  6960. # and font files, we can't use them reliably because they are not
  6961. # zero terminated. [but we do anyway, christos]
  6962. 0    string        \367\002    TeX DVI file
  6963. >16    string        >\0        (%s)
  6964. 0    string        \367\203    TeX generic font data
  6965. 0    string        \367\131    TeX packed font data
  6966. >3    string        >\0        (%s)
  6967. 0    string        \367\312    TeX virtual font data
  6968. 0    string        This\ is\ TeX,    TeX transcript text
  6969. 0    string        This\ is\ METAFONT,    METAFONT transcript text
  6970.  
  6971. # There is no way to detect TeX Font Metric (*.tfm) files without
  6972. # breaking them apart and reading the data.  The following patterns
  6973. # match most *.tfm files generated by METAFONT or afm2tfm.
  6974. 2    string        \000\021    TeX font metric data
  6975. >33    string        >\0        (%s)
  6976. 2    string        \000\022    TeX font metric data
  6977. >33    string        >\0        (%s)
  6978.  
  6979. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  6980. 0    string        \\input\ texinfo    Texinfo source text
  6981. 0    string        This\ is\ Info\ file    GNU Info text
  6982.  
  6983. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  6984. 0    string        \\input        TeX document text
  6985. 0    string        \\section    LaTeX document text
  6986. 0    string        \\setlength    LaTeX document text
  6987. 0    string        \\documentstyle    LaTeX document text
  6988. 0    string        \\chapter    LaTeX document text
  6989. 0    string        \\documentclass    LaTeX 2e document text
  6990. 0    string        \\relax        LaTeX auxiliary file
  6991. 0    string        \\contentsline    LaTeX  table of contents
  6992. 0    string        %\ -*-latex-*-    LaTeX document text
  6993.  
  6994. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  6995. 0   string      \\ifx       TeX document text
  6996.  
  6997. # Index and glossary files
  6998. 0    string        \\indexentry    LaTeX raw index file
  6999. 0    string        \\begin{theindex}    LaTeX sorted index
  7000. 0    string        \\glossaryentry    LaTeX raw glossary
  7001. 0    string        \\begin{theglossary}    LaTeX sorted glossary
  7002. 0    string        This\ is\ makeindex    Makeindex log file
  7003.  
  7004. # End of TeX
  7005.  
  7006. #------------------------------------------------------------------------------
  7007. # file(1) magic for BibTex text files
  7008. # From Hendrik Scholz <hendrik@scholz.net>
  7009.  
  7010. 0   string @article{          BibTex text file
  7011. 0   string @book{             BibTex text file
  7012. 0   string @inbook{           BibTex text file
  7013. 0   string @incollection{     BibTex text file
  7014. 0   string @inproceedings{    BibTex text file
  7015. 0   string @manual{           BibTex text file
  7016. 0   string @misc{             BibTex text file
  7017. 0   string @preamble{         BibTex text file
  7018. 0   string @phdthesis{        BibTex text file
  7019. 0   string @techreport{       BibTex text file
  7020. 0   string @unpublished{      BibTex text file
  7021.  
  7022. 0   string @Article{          BibTex text file
  7023. 0   string @Book{             BibTex text file
  7024. 0   string @Inbook{           BibTex text file
  7025. 0   string @Incollection{     BibTex text file
  7026. 0   string @Inproceedings{    BibTex text file
  7027. 0   string @Manual{           BibTex text file
  7028. 0   string @Misc{             BibTex text file
  7029. 0   string @Preamble{         BibTex text file
  7030. 0   string @Phdthesis{        BibTex text file
  7031. 0   string @Techreport{       BibTex text file
  7032. 0   string @Unpublished{      BibTex text file
  7033.  
  7034. 0   string @ARTICLE{          BibTex text file
  7035. 0   string @BOOK{             BibTex text file
  7036. 0   string @INBOOK{           BibTex text file
  7037. 0   string @INCOLLECTION{     BibTex text file
  7038. 0   string @INPROCEEDINGS{    BibTex text file
  7039. 0   string @MANUAL{           BibTex text file
  7040. 0   string @MISC{             BibTex text file
  7041. 0   string @PREAMBLE{         BibTex text file
  7042. 0   string @PHDTHESIS{        BibTex text file
  7043. 0   string @TECHREPORT{       BibTex text file
  7044. 0   string @UNPUBLISHED{      BibTex text file
  7045.  
  7046. 73  string %%%\ \ BibTeX-file{ BibTex text file (with full header)
  7047.  
  7048. 73  string %%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
  7049.  
  7050. 0   string %\ BibTeX\ standard\ bibliography\      BibTeX standard bibliography style text file
  7051.  
  7052. 0   string %\ BibTeX\ `     BibTeX custom bibliography style text file
  7053.  
  7054. 0   string  @c\ @mapfile{   TeX font aliases text file
  7055.  
  7056. #------------------------------------------------------------------------------
  7057. # file(1) magic for tgif(1) files
  7058. # From Hendrik Scholz <hendrik@scholz.net>
  7059.  
  7060. 0   string  %TGIF\ 4   tgif version 4 object file
  7061.  
  7062. # ------------------------------------------------------------------------
  7063. # ti-8x: file(1) magic for the TI-8x and TI-92 Graphing Calculators.
  7064. #
  7065. # From: Ryan McGuire (rmcguire@freenet.columbus.oh.us).
  7066. #
  7067. # NOTE: This list is not complete.
  7068. #
  7069. # Magic Numbers for the TI-82
  7070. #
  7071. 0               string          **TI82**        TI-82 Graphing Calculator
  7072. >0x000037       byte            0x0B            TI-BASIC Group/Program File.
  7073. #
  7074. # Magic Numbers for the TI-83
  7075. #
  7076. 0               string          **TI83**        TI-83 Graphing Calculator
  7077. >0x000037       byte            0x0B            TI-BASIC Group/Program File.
  7078. #
  7079. # Magic Numbers for the TI-85
  7080. #
  7081. 0               string          **TI85**        TI-85 Graphing Calculator
  7082. >11             string          Backup          Backup File.
  7083. >0x000032       string          ZS4             - ZShell Version 4 File.
  7084. >0x000032       string          ZS3             - ZShell Version 3 File.
  7085. >0x00000B       string          GDatabase       Graphics Database.
  7086. >0x00003B       byte            0x12            TI-BASIC Group/Program File.
  7087. #
  7088. # Magic Numbers for the TI-92
  7089. #
  7090. 0               string          **TI92**        TI-92 Graphing Calculator
  7091. >0x000058       byte            0x12            TI-BASIC Group File.
  7092. >0x000012       string          Function        Function.
  7093. >0x000048       byte            0x12            TI-BASIC Program.
  7094. # Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
  7095. # program/group magic numbers in here because I cannot find any.
  7096. 0               string          **TI80**        TI-80 Graphing Calculator File.
  7097. 0               string          **TI81**        TI-81 Graphing Calculator File.
  7098.  
  7099. #------------------------------------------------------------------------------
  7100. # timezone:  file(1) magic for timezone data
  7101. #
  7102. # from Daniel Quinlan (quinlan@yggdrasil.com)
  7103. # this should work on Linux, SunOS, and maybe others
  7104. # Added new official magic number for recent versions of the Olson code
  7105. 0    string    TZif    timezone data
  7106. 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
  7107. 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
  7108. 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
  7109. 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
  7110. 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
  7111. 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
  7112.  
  7113. #------------------------------------------------------------------------------
  7114. # troff:  file(1) magic for *roff
  7115. #
  7116. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  7117.  
  7118. # troff input
  7119. 0    string        .\\"        troff or preprocessor input text
  7120. 0    string        '\\"        troff or preprocessor input text
  7121. 0    string        '.\\"        troff or preprocessor input text
  7122. 0    string        \\"        troff or preprocessor input text
  7123. 0    string        '''        troff or preprocessor input text
  7124.  
  7125. # ditroff intermediate output text
  7126. 0    string        x\ T        ditroff output text
  7127. >4    string        cat        for the C/A/T phototypesetter
  7128. >4    string        ps        for PostScript
  7129. >4    string        dvi        for DVI
  7130. >4    string        ascii        for ASCII
  7131. >4    string        lj4        for LaserJet 4
  7132. >4    string        latin1        for ISO 8859-1 (Latin 1)
  7133. >4    string        X75        for xditview at 75dpi
  7134. >>7    string        -12        (12pt)
  7135. >4    string        X100        for xditview at 100dpi
  7136. >>8    string        -12        (12pt)
  7137.  
  7138. # output data formats
  7139. 0    string        \100\357    very old (C/A/T) troff output data
  7140. #
  7141. #------------------------------------------------------------------------------
  7142. # tuxedo:    file(1) magic for BEA TUXEDO data files
  7143. #
  7144. # from Ian Springer <ispringer@hotmail.com>
  7145. #
  7146. 0    string        \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0    BEA TUXEDO DES mask data
  7147.  
  7148. #------------------------------------------------------------------------------
  7149. # typeset:  file(1) magic for other typesetting
  7150. #
  7151. 0    string        Interpress/Xerox    Xerox InterPress data
  7152. >16    string        /            (version
  7153. >>17    string        >\0            %s)
  7154.  
  7155. #------------------------------------------------------------------------------
  7156. # unknown:  file(1) magic for unknown machines
  7157. #
  7158. # XXX - this probably should be pruned, as it'll match PDP-11 and
  7159. # VAX image formats.
  7160. #
  7161. # 0x107 is 0407; 0x108 is 0410; both are PDP-11 (executable and pure,
  7162. # respectively).
  7163. #
  7164. # 0x109 is 0411; that's PDP-11 split I&D, but the PDP-11 version doesn't
  7165. # have the "version %ld", which may be a bogus COFFism (I don't think
  7166. # there ever was COFF for the PDP-11).
  7167. #
  7168. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  7169. # long, as it would be on a VAX.
  7170. #
  7171. # 0x10C is 0414, 0x10D is 0415, and 0x10E is 416; those *are* unknown.
  7172. #
  7173. 0    short        0x107        unknown machine executable
  7174. >8    short        >0        not stripped
  7175. >15    byte        >0        - version %ld
  7176. 0    short        0x108        unknown pure executable
  7177. >8    short        >0        not stripped
  7178. >15    byte        >0        - version %ld
  7179. 0    short        0x109        PDP-11 separate I&D
  7180. >8    short        >0        not stripped
  7181. >15    byte        >0        - version %ld
  7182. 0    short        0x10b        unknown pure executable
  7183. >8    short        >0        not stripped
  7184. >15    byte        >0        - version %ld
  7185. 0    long        0x10c        unknown demand paged pure executable
  7186. >16    long        >0        not stripped
  7187. 0    long        0x10d        unknown demand paged pure executable
  7188. >16    long        >0        not stripped
  7189. 0    long        0x10e        unknown readable demand paged pure executable
  7190.  
  7191. #------------------------------------------------------------------------------
  7192. # uuencode:  file(1) magic for ASCII-encoded files
  7193. #
  7194.  
  7195. # GRR:  the first line of xxencoded files is identical to that in uuencoded
  7196. # files, but the first character in most subsequent lines is 'h' instead of
  7197. # 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
  7198. # punctuation and survives BITNET gateways better.)  If regular expressions
  7199. # were supported, this entry could possibly be split into two with
  7200. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  7201. 0    string        begin\040    uuencoded or xxencoded text
  7202.  
  7203. # btoa(1) is an alternative to uuencode that requires less space.
  7204. 0    string        xbtoa\ Begin    btoa'd text
  7205.  
  7206. # ship(1) is another, much cooler alternative to uuencode.
  7207. # Greg Roelofs, newt@uchicago.edu
  7208. 0    string        $\012ship    ship'd binary text
  7209.  
  7210. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  7211. # Greg Roelofs, newt@uchicago.edu
  7212. 0    string    Decode\ the\ following\ with\ bdeco    bencoded News text
  7213.  
  7214. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  7215. # Daniel Quinlan, quinlan@yggdrasil.com
  7216. 11    string    must\ be\ converted\ with\ BinHex    BinHex binary text
  7217. >41    string    x                    \b, version %.3s
  7218.  
  7219. # GRR:  is MIME BASE64 encoding handled somewhere?
  7220.  
  7221. #------------------------------------------------------------------------------
  7222. # varied.out:  file(1) magic for various USG systems
  7223. #
  7224. #    Herewith many of the object file formats used by USG systems.
  7225. #    Most have been moved to files for a particular processor,
  7226. #    and deleted if they duplicate other entries.
  7227. #
  7228. 0    short        0610        Perkin-Elmer executable
  7229. # AMD 29K
  7230. 0    beshort        0572        amd 29k coff noprebar executable
  7231. 0    beshort        01572        amd 29k coff prebar executable
  7232. 0    beshort        0160007        amd 29k coff archive
  7233. # Cray
  7234. 6    beshort        0407        unicos (cray) executable
  7235. # Ultrix 4.3
  7236. 596    string        \130\337\377\377    Ultrix core file
  7237. >600    string        >\0        from '%s'
  7238. # BeOS and MAcOS PEF executables
  7239. # From: hplus@zilker.net (Jon Watte)
  7240. 0    string        Joy!peffpwpc    header for PowerPC PEF executable
  7241. #
  7242. # ava assembler/linker Uros Platise <uros.platise@ijs.si>
  7243. 0       string          avaobj  AVR assembler object code
  7244. >7      string          >\0     version '%s'
  7245. # gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr>
  7246. 0    string        gmon        GNU prof performance data
  7247. >4    long        x        - version %ld
  7248. # From: Dave Pearson <davep@davep.org>
  7249. # Harbour <URL:http://www.harbour-project.org/> HRB files.
  7250. 0     string \xc0HRB   Harbour HRB file
  7251. >4    short  x         version %d
  7252.  
  7253. #------------------------------------------------------------------------------
  7254. # vax:  file(1) magic for VAX executable/object and APL workspace
  7255. #
  7256. 0    lelong        0101557        VAX single precision APL workspace
  7257. 0    lelong        0101556        VAX double precision APL workspace
  7258.  
  7259. #
  7260. # VAX a.out (32V, BSD)
  7261. #
  7262. 0    lelong        0407        VAX executable
  7263. >16    lelong        >0        not stripped
  7264.  
  7265. 0    lelong        0410        VAX pure executable
  7266. >16    lelong        >0        not stripped
  7267.  
  7268. 0    lelong        0413        VAX demand paged pure executable
  7269. >16    lelong        >0        not stripped
  7270.  
  7271. 0    lelong        0420        VAX demand paged (first page unmapped) pure executable
  7272. >16    lelong        >0        not stripped
  7273.  
  7274. #
  7275. # VAX COFF
  7276. #
  7277. # The `versions' should be un-commented if they work for you.
  7278. # (Was the problem just one of endianness?)
  7279. #
  7280. 0    leshort        0570        VAX COFF executable
  7281. >12    lelong        >0        not stripped
  7282. >22    leshort        >0        - version %ld
  7283. 0    leshort        0575        VAX COFF pure executable
  7284. >12    lelong        >0        not stripped
  7285. >22    leshort        >0        - version %ld
  7286.  
  7287. #------------------------------------------------------------------------------
  7288. # vicar:  file(1) magic for VICAR files.
  7289. #
  7290. # From: Ossama Othman <othman@astrosun.tn.cornell.edu
  7291. # VICAR is JPL's in-house spacecraft image processing program
  7292. # VICAR image
  7293. 0    string    LBLSIZE=    VICAR image data
  7294. >32    string    BYTE        \b, 8 bits  = VAX byte
  7295. >32    string    HALF        \b, 16 bits = VAX word     = Fortran INTEGER*2
  7296. >32    string    FULL        \b, 32 bits = VAX longword = Fortran INTEGER*4
  7297. >32    string    REAL        \b, 32 bits = VAX longword = Fortran REAL*4
  7298. >32    string    DOUB        \b, 64 bits = VAX quadword = Fortran REAL*8
  7299. >32    string    COMPLEX        \b, 64 bits = VAX quadword = Fortran COMPLEX*8
  7300. # VICAR label file
  7301. 43    string    SFDU_LABEL    VICAR label file
  7302.  
  7303. #------------------------------------------------------------------------------
  7304. # visx:  file(1) magic for Visx format files
  7305. #
  7306. 0    short        0x5555        VISX image file
  7307. >2    byte        0        (zero)
  7308. >2    byte        1        (unsigned char)
  7309. >2    byte        2        (short integer)
  7310. >2    byte        3        (float 32)
  7311. >2    byte        4        (float 64)
  7312. >2    byte        5        (signed char)
  7313. >2    byte        6        (bit-plane)
  7314. >2    byte        7        (classes)
  7315. >2    byte        8        (statistics)
  7316. >2    byte        10        (ascii text)
  7317. >2    byte        15        (image segments)
  7318. >2    byte        100        (image set)
  7319. >2    byte        101        (unsigned char vector)
  7320. >2    byte        102        (short integer vector)
  7321. >2    byte        103        (float 32 vector)
  7322. >2    byte        104        (float 64 vector)
  7323. >2    byte        105        (signed char vector)
  7324. >2    byte        106        (bit plane vector)
  7325. >2    byte        121        (feature vector)
  7326. >2    byte        122        (feature vector library)
  7327. >2    byte        124        (chain code)
  7328. >2    byte        126        (bit vector)
  7329. >2    byte        130        (graph)
  7330. >2    byte        131        (adjacency graph)
  7331. >2    byte        132        (adjacency graph library)
  7332. >2    string        .VISIX        (ascii text)
  7333.  
  7334. #------------------------------------------------------------------------------
  7335. # vms:  file(1) magic for VMS executables (experimental)
  7336. #
  7337. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  7338.  
  7339. # GRR 950122:  I'm just guessing on these, based on inspection of the headers
  7340. # of three executables each for Alpha and VAX architectures.  The VAX files
  7341. # all had headers similar to this:
  7342. #
  7343. #   00000  b0 00 30 00 44 00 60 00  00 00 00 00 30 32 30 35  ..0.D.`.....0205
  7344. #   00010  01 01 00 00 ff ff ff ff  ff ff ff ff 00 00 00 00  ................
  7345. #
  7346. 0    string    \xb0\0\x30\0    VMS VAX executable
  7347. >44032    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  7348. #
  7349. # The AXP files all looked like this, except that the byte at offset 0x22
  7350. # was 06 in some of them and 07 in others:
  7351. #
  7352. #   00000  03 00 00 00 00 00 00 00  ec 02 00 00 10 01 00 00  ................
  7353. #   00010  68 00 00 00 98 00 00 00  b8 00 00 00 00 00 00 00  h...............
  7354. #   00020  00 00 07 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
  7355. #   00030  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
  7356. #   00040  00 00 00 00 ff ff ff ff  ff ff ff ff 02 00 00 00  ................
  7357. #
  7358. 0    belong    0x03000000    VMS Alpha executable
  7359. >75264    string    PK\003\004    \b, Info-ZIP SFX archive v5.12 w/decryption
  7360.  
  7361. # -----------------------------------------------------------
  7362. # VMware specific files (deducted from version 1.1 and log file entries)
  7363. # Anthon van der Neut (anthon@mnt.org)
  7364. 0    belong    0x4d52564e    VMware nvram 
  7365. 0    belong    0x434f5744    
  7366. >8    byte    3         VMware virtual disk 
  7367. >>32    lelong    x        (%d/
  7368. >>36    lelong    x        \b%d/
  7369. >>40    lelong    x        \b%d)
  7370. >8    byte    2         VMware undoable disk
  7371. >>32    string  >\0        (%s)
  7372.  
  7373. #------------------------------------------------------------------------------
  7374. # vorbis:  file(1) magic for Ogg/Vorbis files
  7375. #
  7376. # From Felix von Leitner <leitner@fefe.de>
  7377. # Extended by Beni Cherniavsky <cben@crosswinds.net>
  7378. # Further extended by Greg Wooledge <greg@wooledge.org>
  7379. #
  7380. # Most (everything but the number of channels and bitrate) is commented
  7381. # out with `##' as it's not interesting to the average user.  The most
  7382. # probable things advanced users would want to uncomment are probably
  7383. # the number of comments and the encoder version.
  7384. #
  7385. # --- Ogg Framing ---
  7386. 0        string        OggS        Ogg data
  7387. >4        byte        !0        UNKNOWN REVISION %u
  7388. ##>4        byte        0        revision 0
  7389. >4        byte        0
  7390. ##>>14        lelong        x        (Serial %lX)
  7391. # --- First vorbis packet - general header ---
  7392. >>28        string        \x01vorbis    \b, Vorbis audio,
  7393. >>>35        lelong        !0        UNKNOWN VERSION %lu,
  7394. ##>>>35        lelong        0        version 0,
  7395. >>>35        lelong        0
  7396. >>>>39        ubyte        1        mono,
  7397. >>>>39        ubyte        2        stereo,
  7398. >>>>39        ubyte        >2        %u channels,
  7399. >>>>40        lelong        x        %lu Hz
  7400. # Minimal, nominal and maximal bitrates specified when encoding
  7401. >>>>48        string        <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff    \b,
  7402. # The above tests if at least one of these is specified:
  7403. >>>>>44        lelong        !-1
  7404. # Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
  7405. # instead of -1.
  7406. >>>>>>44    lelong        !-1000
  7407. >>>>>>>44    lelong        x        >%lu
  7408. >>>>>48        lelong        !-1
  7409. >>>>>>48    lelong        x        ~%lu
  7410. >>>>>52        lelong        !-1
  7411. >>>>>>52    lelong        !-1000
  7412. >>>>>>>52    lelong        x        <%lu
  7413. >>>>>48        string        <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff    kbps
  7414. # -- Second vorbis header packet - the comments
  7415. # A kludge to read the vendor string.  It's a counted string, not a
  7416. # zero-terminated one, so file(1) can't read it in a generic way.
  7417. # libVorbis is the only one existing currently, so I detect specifically
  7418. # it.  The interesting value is the cvs date (8 digits decimal).
  7419. # Post-RC1 Ogg files have the second header packet (and thus the version)
  7420. # in a different place, so we must use an indirect offset.
  7421. >>>(84.b+85)        string        \x03vorbis
  7422. >>>>(84.b+96)        string/c    Xiphophorus\ libVorbis\ I    \b, created by: Xiphophorus libVorbis I
  7423. >>>>>(84.b+120)        string        >00000000    %.8s
  7424. # Map to beta version numbers:
  7425. >>>>>>(84.b+120)    string        <20000508    (<beta1 - prepublic)
  7426. >>>>>>(84.b+120)    string        20000508    (beta1/2)
  7427. >>>>>>(84.b+120)    string        >20000508
  7428. >>>>>>>(84.b+120)    string        <20001031    (beta2-3)
  7429. >>>>>>(84.b+120)    string        20001031    (beta3)
  7430. >>>>>>(84.b+120)    string        >20001031
  7431. >>>>>>>(84.b+120)    string        <20010225    (beta3-4)
  7432. >>>>>>(84.b+120)    string        20010225    (beta4)
  7433. >>>>>>(84.b+120)    string        >20010225
  7434. >>>>>>>(84.b+120)    string        <20010615    (beta4-RC1)
  7435. >>>>>>(84.b+120)    string        20010615    (RC1)
  7436. >>>>>>(84.b+120)    string        20010813    (RC2)
  7437. >>>>>>(84.b+120)    string        20010816    (RC2 - Garf tuned v1)
  7438. >>>>>>(84.b+120)    string        20011014    (RC2 - Garf tuned v2)
  7439. >>>>>>(84.b+120)    string        20011217    (pre-RC3 CVS)
  7440. >>>>>>(84.b+120)    string        20011231    (RC3)
  7441. # The string has not changed from beta1 to 2 - they are indistinguishable.
  7442. # Then come the comments, again length-counted (and number-counted).
  7443. # Some looping constructs and registers would allow reading them but now
  7444. # it's impossible.  However we can print the number of comments present
  7445. # (skipping by the vendor string length):
  7446. ##>>>>(109.l.113)    lelong        0        \b, no comments
  7447. ##>>>>(109.l+113)    lelong        >0        \b, %lu comments
  7448.  
  7449. #------------------------------------------------------------------------------
  7450. # VXL: file(1) magic for VXL binary IO data files
  7451. #
  7452. # from Ian Scott <scottim@sf.net>
  7453. #
  7454. # VXL is a collection of C++ libraries for Computer Vision.
  7455. # See the vsl chapter in the VXL Book for more info
  7456. # http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
  7457. # http:/vxl.sf.net
  7458.  
  7459. 2    lelong    0x472b2c4e    VXL data file,
  7460. >0    leshort    >0        schema version no %d
  7461. #WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  7462. 0    string    \377WPC\020\000\000\000\022\012\001\001\000\000\000\000    (WP) loadable text
  7463. >15    byte    0    Optimized for Intel
  7464. >15    byte    1    Optimized for Non-Intel
  7465. 1    string    WPC    (Corel/WP)
  7466. >8    short    257    WordPerfect macro
  7467. >8    short    258    WordPerfect help file
  7468. >8    short    259    WordPerfect keyboard file
  7469. >8    short    266    WordPerfect document
  7470. >8    short    267    WordPerfect dictionary
  7471. >8    short    268    WordPerfect thesaurus
  7472. >8    short    269    WordPerfect block
  7473. >8    short    270    WordPerfect rectangular block
  7474. >8    short    271    WordPerfect column block
  7475. >8    short    272    WordPerfect printer data
  7476. >8    short    275    WordPerfect printer data
  7477. >8    short    276    WordPerfect driver resource data
  7478. >8    short    279    WordPerfect hyphenation code
  7479. >8    short    280    WordPerfect hyphenation data
  7480. >8    short    281    WordPerfect macro resource data
  7481. >8    short    283    WordPerfect hyphenation lex
  7482. >8    short    285    WordPerfect wordlist
  7483. >8    short    286    WordPerfect equation resource data
  7484. >8    short    289    WordPerfect spell rules
  7485. >8    short    290    WordPerfect dictionary rules
  7486. >8    short    295    WordPerfect spell rules (Microlytics)
  7487. >8    short    299    WordPerfect settings file
  7488. >8    short    301    WordPerfect 4.2 document
  7489. >8    short    325    WordPerfect dialog file
  7490. >8    short    332    WordPerfect button bar
  7491. >8    short    513    Shell macro
  7492. >8    short    522    Shell definition
  7493. >8    short    769    Notebook macro
  7494. >8    short    770    Notebook help file
  7495. >8    short    771    Notebook keyboard file
  7496. >8    short    778    Notebook definition
  7497. >8    short    1026    Calculator help file
  7498. >8    short     1538    Calendar help file
  7499. >8    short     1546    Calendar data file
  7500. >8    short    1793    Editor macro
  7501. >8    short    1794    Editor help file
  7502. >8    short    1795    Editor keyboard file
  7503. >8    short    1817    Editor macro resource file
  7504. >8    short     2049    Macro editor macro
  7505. >8    short     2050    Macro editor help file
  7506. >8    short    2051    Macro editor keyboard file
  7507. >8    short    2305    PlanPerfect macro
  7508. >8    short    2306    PlanPerfect help file
  7509. >8    short    2307    PlanPerfect keyboard file
  7510. >8    short    2314    PlanPerfect worksheet
  7511. >8    short    2319    PlanPerfect printer definition
  7512. >8    short    2322    PlanPerfect graphic definition
  7513. >8    short    2323    PlanPerfect data
  7514. >8    short    2324    PlanPerfect temporary printer
  7515. >8    short    2329    PlanPerfect macro resource data
  7516. >8    byte    11    Mail
  7517. >8    short    2818    help file
  7518. >8    short    2821    distribution list
  7519. >8    short    2826    out box
  7520. >8    short    2827    in box
  7521. >8    short    2836    users archived mailbox
  7522. >8    short    2837    archived message database
  7523. >8    short    2838    archived attachments
  7524. >8    short    3083    Printer temporary file
  7525. >8    short    3330    Scheduler help file
  7526. >8    short    3338    Scheduler in file
  7527. >8    short    3339    Scheduler out file
  7528. >8    short    3594    GroupWise settings file
  7529. >8    short    3601    GroupWise directory services
  7530. >8    short    3627    GroupWise settings file
  7531. >8    short    4362    Terminal resource data
  7532. >8    short    4363    Terminal resource data
  7533. >8    short    4395    Terminal resource data
  7534. >8    short    4619    GUI loadable text
  7535. >8    short    4620    graphics resource data
  7536. >8    short    4621    printer settings file
  7537. >8    short    4622    port definition file
  7538. >8    short    4623    print queue parameters
  7539. >8    short    4624    compressed file
  7540. >8    short    5130    Network service msg file
  7541. >8    short    5131    Network service msg file
  7542. >8    short    5132    Async gateway login msg
  7543. >8    short    5134    GroupWise message file
  7544. >8    short    7956    GroupWise admin domain database
  7545. >8    short    7957    GroupWise admin host database
  7546. >8    short    7959    GroupWise admin remote host database
  7547. >8    short    7960    GroupWise admin ADS deferment data file
  7548. >8    short    8458    IntelliTAG (SGML) compiled DTD
  7549. >8    long    18219264    WordPerfect graphic image (1.0)
  7550. >8    long    18219520    WordPerfect graphic image (2.0)
  7551. #end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  7552.  
  7553. #------------------------------------------------------------------------------
  7554. # file(1) magic(5) data for xdelta  Josh MacDonald <jmacd@CS.Berkeley.EDU>
  7555. #
  7556. 0    string    %XDELTA%    XDelta binary patch file 0.14
  7557. 0    string    %XDZ000%    XDelta binary patch file 0.18
  7558. 0    string    %XDZ001%    XDelta binary patch file 0.20
  7559. 0    string    %XDZ002%    XDelta binary patch file 1.0
  7560. 0    string    %XDZ003%    XDelta binary patch file 1.0.4
  7561. 0    string    %XDZ004%    XDelta binary patch file 1.1
  7562.  
  7563. #------------------------------------------------------------------------------
  7564. # xenix:  file(1) magic for Microsoft Xenix
  7565. #
  7566. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  7567. # model" lifted from "magic.xenix", with comment "derived empirically;
  7568. # treat as folklore until proven"
  7569. #
  7570. # "small model", "large model", "huge model" stuff lifted from XXX
  7571. #
  7572. # XXX - "x.out" collides with PDP-11 archives
  7573. #
  7574. 0    string        core        core file (Xenix)
  7575. 0    byte        0x80        8086 relocatable (Microsoft)
  7576. 0    leshort        0xff65        x.out
  7577. >2    string        __.SYMDEF     randomized
  7578. >0    byte        x        archive
  7579. 0    leshort        0x206        Microsoft a.out
  7580. >8    leshort        1        Middle model
  7581. >0x1e    leshort        &0x10        overlay
  7582. >0x1e    leshort        &0x2        separate
  7583. >0x1e    leshort        &0x4        pure
  7584. >0x1e    leshort        &0x800        segmented
  7585. >0x1e    leshort        &0x400        standalone
  7586. >0x1e    leshort        &0x8        fixed-stack
  7587. >0x1c    byte        &0x80        byte-swapped
  7588. >0x1c    byte        &0x40        word-swapped
  7589. >0x10    lelong        >0        not-stripped
  7590. >0x1e    leshort        ^0xc000        pre-SysV
  7591. >0x1e    leshort        &0x4000        V2.3
  7592. >0x1e    leshort        &0x8000        V3.0
  7593. >0x1c    byte        &0x4        86
  7594. >0x1c    byte        &0xb        186
  7595. >0x1c    byte        &0x9        286
  7596. >0x1c    byte        &0xa        386
  7597. >0x1f    byte        <0x040        small model
  7598. >0x1f    byte        =0x048        large model    
  7599. >0x1f    byte        =0x049        huge model 
  7600. >0x1e    leshort        &0x1        executable
  7601. >0x1e    leshort        ^0x1        object file
  7602. >0x1e    leshort        &0x40        Large Text
  7603. >0x1e    leshort        &0x20        Large Data
  7604. >0x1e    leshort        &0x120        Huge Objects Enabled
  7605. >0x10    lelong        >0        not stripped
  7606.  
  7607. 0    leshort        0x140        old Microsoft 8086 x.out
  7608. >0x3    byte        &0x4        separate
  7609. >0x3    byte        &0x2        pure
  7610. >0    byte        &0x1        executable
  7611. >0    byte        ^0x1        relocatable
  7612. >0x14    lelong        >0        not stripped
  7613.  
  7614. 0    lelong        0x206        b.out
  7615. >0x1e    leshort        &0x10        overlay
  7616. >0x1e    leshort        &0x2        separate
  7617. >0x1e    leshort        &0x4        pure
  7618. >0x1e    leshort        &0x800        segmented
  7619. >0x1e    leshort        &0x400        standalone
  7620. >0x1e    leshort        &0x1        executable
  7621. >0x1e    leshort        ^0x1        object file
  7622. >0x1e    leshort        &0x4000        V2.3
  7623. >0x1e    leshort        &0x8000        V3.0
  7624. >0x1c    byte        &0x4        86
  7625. >0x1c    byte        &0xb        186
  7626. >0x1c    byte        &0x9        286
  7627. >0x1c    byte        &0x29        286
  7628. >0x1c    byte        &0xa        386
  7629. >0x1e    leshort        &0x4        Large Text
  7630. >0x1e    leshort        &0x2        Large Data
  7631. >0x1e    leshort        &0x102        Huge Objects Enabled
  7632.  
  7633. 0    leshort        0x580        XENIX 8086 relocatable or 80286 small model
  7634.  
  7635. #------------------------------------------------------------------------------
  7636. # zilog:  file(1) magic for Zilog Z8000.
  7637. #
  7638. # Was it big-endian or little-endian?  My Product Specification doesn't
  7639. # say.
  7640. #
  7641. 0    long        0xe807        object file (z8000 a.out)
  7642. 0    long        0xe808        pure object file (z8000 a.out)
  7643. 0    long        0xe809        separate object file (z8000 a.out)
  7644. 0    long        0xe805        overlay object file (z8000 a.out)
  7645.  
  7646. #------------------------------------------------------------------------------
  7647. # zyxel:  file(1) magic for ZyXEL modems
  7648. #
  7649. # From <rob@pe1chl.ampr.org>
  7650. # These are the /etc/magic entries to decode datafiles as used for the
  7651. # ZyXEL U-1496E DATA/FAX/VOICE modems.  (This header conforms to a
  7652. # ZyXEL-defined standard)
  7653.  
  7654. 0    string        ZyXEL\002    ZyXEL voice data
  7655. >10    byte        0        - CELP encoding
  7656. >10    byte&0x0B    1        - ADPCM2 encoding
  7657. >10    byte&0x0B    2        - ADPCM3 encoding
  7658. >10    byte&0x0B    3        - ADPCM4 encoding
  7659. >10    byte&0x0B    8        - New ADPCM3 encoding
  7660. >10    byte&0x04    4        with resync
  7661.