root/phoneyc/trunk/magic.py

Revision 1451, 57.6 kB (checked in by oxff, 1 year ago)

adherence to svn guidelines

  • Property svn:executable set to
Line 
1 #!/usr/local/bin/python
2 '''
3 magic.py
4  determines a file type by its magic number
5
6  (C)opyright 2000 Jason Petrone <jp_py@demonseed.net>
7  All Rights Reserved
8
9  Command Line Usage: running as `python magic.py file` will print
10                      a description of what 'file' is.
11
12  Module Usage:
13      magic.whatis(data): when passed a string 'data' containing
14                          binary or text data, a description of
15                          what the data is will be returned.
16
17      magic.file(filename): returns a description of what the file
18                            'filename' contains.
19 '''
20
21 import re, struct, string
22
23 __version__ = '0.1'
24
25 magic = [
26   [0L, 'leshort', '=', 1538L, 'application/x-alan-adventure-game'],
27   [0L, 'string', '=', 'TADS', 'application/x-tads-game'],
28   [0L, 'short', '=', 420L, 'application/x-executable-file'],
29   [0L, 'short', '=', 421L, 'application/x-executable-file'],
30   [0L, 'leshort', '=', 603L, 'application/x-executable-file'],
31   [0L, 'string', '=', 'Core\001', 'application/x-executable-file'],
32   [0L, 'string', '=', 'AMANDA: TAPESTART DATE', 'application/x-amanda-header'],
33   [0L, 'belong', '=', 1011L, 'application/x-executable-file'],
34   [0L, 'belong', '=', 999L, 'application/x-library-file'],
35   [0L, 'belong', '=', 435L, 'video/mpeg'],
36   [0L, 'belong', '=', 442L, 'video/mpeg'],
37   [0L, 'beshort&0xfff0', '=', 65520L, 'audio/mpeg'],
38   [4L, 'leshort', '=', 44817L, 'video/fli'],
39   [4L, 'leshort', '=', 44818L, 'video/flc'],
40   [0L, 'string', '=', 'MOVI', 'video/x-sgi-movie'],
41   [4L, 'string', '=', 'moov', 'video/quicktime'],
42   [4L, 'string', '=', 'mdat', 'video/quicktime'],
43   [0L, 'long', '=', 100554L, 'application/x-apl-workspace'],
44   [0L, 'string', '=', 'FiLeStArTfIlEsTaRt', 'text/x-apple-binscii'],
45   [0L, 'string', '=', '\012GL', 'application/data'],
46   [0L, 'string', '=', 'v\377', 'application/data'],
47   [0L, 'string', '=', 'NuFile', 'application/data'],
48   [0L, 'string', '=', 'N\365F\351l\345', 'application/data'],
49   [0L, 'belong', '=', 333312L, 'application/data'],
50   [0L, 'belong', '=', 333319L, 'application/data'],
51   [257L, 'string', '=', 'ustar\000', 'application/x-tar'],
52   [257L, 'string', '=', 'ustar  \000', 'application/x-gtar'],
53   [0L, 'short', '=', 70707L, 'application/x-cpio'],
54   [0L, 'short', '=', 143561L, 'application/x-bcpio'],
55   [0L, 'string', '=', '070707', 'application/x-cpio'],
56   [0L, 'string', '=', '070701', 'application/x-cpio'],
57   [0L, 'string', '=', '070702', 'application/x-cpio'],
58   [0L, 'string', '=', '!<arch>\012debian', 'application/x-dpkg'],
59   [0L, 'long', '=', 177555L, 'application/x-ar'],
60   [0L, 'short', '=', 177555L, 'application/data'],
61   [0L, 'long', '=', 177545L, 'application/data'],
62   [0L, 'short', '=', 177545L, 'application/data'],
63   [0L, 'long', '=', 100554L, 'application/x-apl-workspace'],
64   [0L, 'string', '=', '<ar>', 'application/x-ar'],
65   [0L, 'string', '=', '!<arch>\012__________E', 'application/x-ar'],
66   [0L, 'string', '=', '-h-', 'application/data'],
67   [0L, 'string', '=', '!<arch>', 'application/x-ar'],
68   [0L, 'string', '=', '<ar>', 'application/x-ar'],
69   [0L, 'string', '=', '<ar>', 'application/x-ar'],
70   [0L, 'belong', '=', 1711210496L, 'application/x-ar'],
71   [0L, 'belong', '=', 1013019198L, 'application/x-ar'],
72   [0L, 'long', '=', 557605234L, 'application/x-ar'],
73   [0L, 'lelong', '=', 177555L, 'application/data'],
74   [0L, 'leshort', '=', 177555L, 'application/data'],
75   [0L, 'lelong', '=', 177545L, 'application/data'],
76   [0L, 'leshort', '=', 177545L, 'application/data'],
77   [0L, 'lelong', '=', 236525L, 'application/data'],
78   [0L, 'lelong', '=', 236526L, 'application/data'],
79   [0L, 'lelong&0x8080ffff', '=', 2074L, 'application/x-arc'],
80   [0L, 'lelong&0x8080ffff', '=', 2330L, 'application/x-arc'],
81   [0L, 'lelong&0x8080ffff', '=', 538L, 'application/x-arc'],
82   [0L, 'lelong&0x8080ffff', '=', 794L, 'application/x-arc'],
83   [0L, 'lelong&0x8080ffff', '=', 1050L, 'application/x-arc'],
84   [0L, 'lelong&0x8080ffff', '=', 1562L, 'application/x-arc'],
85   [0L, 'string', '=', '\032archive', 'application/data'],
86   [0L, 'leshort', '=', 60000L, 'application/x-arj'],
87   [0L, 'string', '=', 'HPAK', 'application/data'],
88   [0L, 'string', '=', '\351,\001JAM application/data', ''],
89   [2L, 'string', '=', '-lh0-', 'application/x-lha'],
90   [2L, 'string', '=', '-lh1-', 'application/x-lha'],
91   [2L, 'string', '=', '-lz4-', 'application/x-lha'],
92   [2L, 'string', '=', '-lz5-', 'application/x-lha'],
93   [2L, 'string', '=', '-lzs-', 'application/x-lha'],
94   [2L, 'string', '=', '-lh -', 'application/x-lha'],
95   [2L, 'string', '=', '-lhd-', 'application/x-lha'],
96   [2L, 'string', '=', '-lh2-', 'application/x-lha'],
97   [2L, 'string', '=', '-lh3-', 'application/x-lha'],
98   [2L, 'string', '=', '-lh4-', 'application/x-lha'],
99   [2L, 'string', '=', '-lh5-', 'application/x-lha'],
100   [0L, 'string', '=', 'Rar!', 'application/x-rar'],
101   [0L, 'string', '=', 'SQSH', 'application/data'],
102   [0L, 'string', '=', 'UC2\032', 'application/data'],
103   [0L, 'string', '=', 'PK\003\004', 'application/zip'],
104   [20L, 'lelong', '=', 4257523676L, 'application/x-zoo'],
105   [10L, 'string', '=', '# This is a shell archive', 'application/x-shar'],
106   [0L, 'string', '=', '*STA', 'application/data'],
107   [0L, 'string', '=', '2278', 'application/data'],
108   [0L, 'beshort', '=', 560L, 'application/x-executable-file'],
109   [0L, 'beshort', '=', 561L, 'application/x-executable-file'],
110   [0L, 'string', '=', '\000\004\036\212\200', 'application/core'],
111   [0L, 'string', '=', '.snd', 'audio/basic'],
112   [0L, 'lelong', '=', 6583086L, 'audio/basic'],
113   [0L, 'string', '=', 'MThd', 'audio/midi'],
114   [0L, 'string', '=', 'CTMF', 'audio/x-cmf'],
115   [0L, 'string', '=', 'SBI', 'audio/x-sbi'],
116   [0L, 'string', '=', 'Creative Voice File', 'audio/x-voc'],
117   [0L, 'belong', '=', 1314148939L, 'audio/x-multitrack'],
118   [0L, 'string', '=', 'RIFF', 'audio/x-wav'],
119   [0L, 'string', '=', 'EMOD', 'audio/x-emod'],
120   [0L, 'belong', '=', 779248125L, 'audio/x-pn-realaudio'],
121   [0L, 'string', '=', 'MTM', 'audio/x-multitrack'],
122   [0L, 'string', '=', 'if', 'audio/x-669-mod'],
123   [0L, 'string', '=', 'FAR', 'audio/mod'],
124   [0L, 'string', '=', 'MAS_U', 'audio/x-multimate-mod'],
125   [44L, 'string', '=', 'SCRM', 'audio/x-st3-mod'],
126   [0L, 'string', '=', 'GF1PATCH110\000ID#000002\000', 'audio/x-gus-patch'],
127   [0L, 'string', '=', 'GF1PATCH100\000ID#000002\000', 'audio/x-gus-patch'],
128   [0L, 'string', '=', 'JN', 'audio/x-669-mod'],
129   [0L, 'string', '=', 'UN05', 'audio/x-mikmod-uni'],
130   [0L, 'string', '=', 'Extended Module:', 'audio/x-ft2-mod'],
131   [21L, 'string', '=', '!SCREAM!', 'audio/x-st2-mod'],
132   [1080L, 'string', '=', 'M.K.', 'audio/x-protracker-mod'],
133   [1080L, 'string', '=', 'M!K!', 'audio/x-protracker-mod'],
134   [1080L, 'string', '=', 'FLT4', 'audio/x-startracker-mod'],
135   [1080L, 'string', '=', '4CHN', 'audio/x-fasttracker-mod'],
136   [1080L, 'string', '=', '6CHN', 'audio/x-fasttracker-mod'],
137   [1080L, 'string', '=', '8CHN', 'audio/x-fasttracker-mod'],
138   [1080L, 'string', '=', 'CD81', 'audio/x-oktalyzer-mod'],
139   [1080L, 'string', '=', 'OKTA', 'audio/x-oktalyzer-mod'],
140   [1080L, 'string', '=', '16CN', 'audio/x-taketracker-mod'],
141   [1080L, 'string', '=', '32CN', 'audio/x-taketracker-mod'],
142   [0L, 'string', '=', 'TOC', 'audio/x-toc'],
143   [0L, 'short', '=', 3401L, 'application/x-executable-file'],
144   [0L, 'long', '=', 406L, 'application/x-executable-file'],
145   [0L, 'short', '=', 406L, 'application/x-executable-file'],
146   [0L, 'short', '=', 3001L, 'application/x-executable-file'],
147   [0L, 'lelong', '=', 314L, 'application/x-executable-file'],
148   [0L, 'string', '=', '//', 'text/cpp'],
149   [0L, 'string', '=', '\\\\1cw\\', 'application/data'],
150   [0L, 'string', '=', '\\\\1cw', 'application/data'],
151   [0L, 'belong&0xffffff00', '=', 2231440384L, 'application/data'],
152   [0L, 'belong&0xffffff00', '=', 2231487232L, 'application/data'],
153   [0L, 'short', '=', 575L, 'application/x-executable-file'],
154   [0L, 'short', '=', 577L, 'application/x-executable-file'],
155   [4L, 'string', '=', 'pipe', 'application/data'],
156   [4L, 'string', '=', 'prof', 'application/data'],
157   [0L, 'string', '=', ': shell', 'application/data'],
158   [0L, 'string', '=', '#!/bin/sh', 'application/x-sh'],
159   [0L, 'string', '=', '#! /bin/sh', 'application/x-sh'],
160   [0L, 'string', '=', '#! /bin/sh', 'application/x-sh'],
161   [0L, 'string', '=', '#!/bin/csh', 'application/x-csh'],
162   [0L, 'string', '=', '#! /bin/csh', 'application/x-csh'],
163   [0L, 'string', '=', '#! /bin/csh', 'application/x-csh'],
164   [0L, 'string', '=', '#!/bin/ksh', 'application/x-ksh'],
165   [0L, 'string', '=', '#! /bin/ksh', 'application/x-ksh'],
166   [0L, 'string', '=', '#! /bin/ksh', 'application/x-ksh'],
167   [0L, 'string', '=', '#!/bin/tcsh', 'application/x-csh'],
168   [0L, 'string', '=', '#! /bin/tcsh', 'application/x-csh'],
169   [0L, 'string', '=', '#! /bin/tcsh', 'application/x-csh'],
170   [0L, 'string', '=', '#!/usr/local/tcsh', 'application/x-csh'],
171   [0L, 'string', '=', '#! /usr/local/tcsh', 'application/x-csh'],
172   [0L, 'string', '=', '#!/usr/local/bin/tcsh', 'application/x-csh'],
173   [0L, 'string', '=', '#! /usr/local/bin/tcsh', 'application/x-csh'],
174   [0L, 'string', '=', '#! /usr/local/bin/tcsh', 'application/x-csh'],
175   [0L, 'string', '=', '#!/usr/local/bin/zsh', 'application/x-zsh'],
176   [0L, 'string', '=', '#! /usr/local/bin/zsh', 'application/x-zsh'],
177   [0L, 'string', '=', '#! /usr/local/bin/zsh', 'application/x-zsh'],
178   [0L, 'string', '=', '#!/usr/local/bin/ash', 'application/x-sh'],
179   [0L, 'string', '=', '#! /usr/local/bin/ash', 'application/x-zsh'],
180   [0L, 'string', '=', '#! /usr/local/bin/ash', 'application/x-zsh'],
181   [0L, 'string', '=', '#!/usr/local/bin/ae', 'text/script'],
182   [0L, 'string', '=', '#! /usr/local/bin/ae', 'text/script'],
183   [0L, 'string', '=', '#! /usr/local/bin/ae', 'text/script'],
184   [0L, 'string', '=', '#!/bin/nawk', 'application/x-awk'],
185   [0L, 'string', '=', '#! /bin/nawk', 'application/x-awk'],
186   [0L, 'string', '=', '#! /bin/nawk', 'application/x-awk'],
187   [0L, 'string', '=', '#!/usr/bin/nawk', 'application/x-awk'],
188   [0L, 'string', '=', '#! /usr/bin/nawk', 'application/x-awk'],
189   [0L, 'string', '=', '#! /usr/bin/nawk', 'application/x-awk'],
190   [0L, 'string', '=', '#!/usr/local/bin/nawk', 'application/x-awk'],
191   [0L, 'string', '=', '#! /usr/local/bin/nawk', 'application/x-awk'],
192   [0L, 'string', '=', '#! /usr/local/bin/nawk', 'application/x-awk'],
193   [0L, 'string', '=', '#!/bin/gawk', 'application/x-awk'],
194   [0L, 'string', '=', '#! /bin/gawk', 'application/x-awk'],
195   [0L, 'string', '=', '#! /bin/gawk', 'application/x-awk'],
196   [0L, 'string', '=', '#!/usr/bin/gawk', 'application/x-awk'],
197   [0L, 'string', '=', '#! /usr/bin/gawk', 'application/x-awk'],
198   [0L, 'string', '=', '#! /usr/bin/gawk', 'application/x-awk'],
199   [0L, 'string', '=', '#!/usr/local/bin/gawk', 'application/x-awk'],
200   [0L, 'string', '=', '#! /usr/local/bin/gawk', 'application/x-awk'],
201   [0L, 'string', '=', '#! /usr/local/bin/gawk', 'application/x-awk'],
202   [0L, 'string', '=', '#!/bin/awk', 'application/x-awk'],
203   [0L, 'string', '=', '#! /bin/awk', 'application/x-awk'],
204   [0L, 'string', '=', '#! /bin/awk', 'application/x-awk'],
205   [0L, 'string', '=', '#!/usr/bin/awk', 'application/x-awk'],
206   [0L, 'string', '=', '#! /usr/bin/awk', 'application/x-awk'],
207   [0L, 'string', '=', '#! /usr/bin/awk', 'application/x-awk'],
208   [0L, 'string', '=', 'BEGIN', 'application/x-awk'],
209   [0L, 'string', '=', '#!/bin/perl', 'application/x-perl'],
210   [0L, 'string', '=', '#! /bin/perl', 'application/x-perl'],
211   [0L, 'string', '=', '#! /bin/perl', 'application/x-perl'],
212   [0L, 'string', '=', 'eval "exec /bin/perl', 'application/x-perl'],
213   [0L, 'string', '=', '#!/usr/bin/perl', 'application/x-perl'],
214   [0L, 'string', '=', '#! /usr/bin/perl', 'application/x-perl'],
215   [0L, 'string', '=', '#! /usr/bin/perl', 'application/x-perl'],
216   [0L, 'string', '=', 'eval "exec /usr/bin/perl', 'application/x-perl'],
217   [0L, 'string', '=', '#!/usr/local/bin/perl', 'application/x-perl'],
218   [0L, 'string', '=', '#! /usr/local/bin/perl', 'application/x-perl'],
219   [0L, 'string', '=', '#! /usr/local/bin/perl', 'application/x-perl'],
220   [0L, 'string', '=', 'eval "exec /usr/local/bin/perl', 'application/x-perl'],
221   [0L, 'string', '=', '#!/bin/python', 'application/x-python'],
222   [0L, 'string', '=', '#! /bin/python', 'application/x-python'],
223   [0L, 'string', '=', '#! /bin/python', 'application/x-python'],
224   [0L, 'string', '=', 'eval "exec /bin/python', 'application/x-python'],
225   [0L, 'string', '=', '#!/usr/bin/python', 'application/x-python'],
226   [0L, 'string', '=', '#! /usr/bin/python', 'application/x-python'],
227   [0L, 'string', '=', '#! /usr/bin/python', 'application/x-python'],
228   [0L, 'string', '=', 'eval "exec /usr/bin/python', 'application/x-python'],
229   [0L, 'string', '=', '#!/usr/local/bin/python', 'application/x-python'],
230   [0L, 'string', '=', '#! /usr/local/bin/python', 'application/x-python'],
231   [0L, 'string', '=', '#! /usr/local/bin/python', 'application/x-python'],
232   [0L, 'string', '=', 'eval "exec /usr/local/bin/python', 'application/x-python'],
233   [0L, 'string', '=', '#!/usr/bin/env python', 'application/x-python'],
234   [0L, 'string', '=', '#! /usr/bin/env python', 'application/x-python'],
235   [0L, 'string', '=', '#!/bin/rc', 'text/script'],
236   [0L, 'string', '=', '#! /bin/rc', 'text/script'],
237   [0L, 'string', '=', '#! /bin/rc', 'text/script'],
238   [0L, 'string', '=', '#!/bin/bash', 'application/x-sh'],
239   [0L, 'string', '=', '#! /bin/bash', 'application/x-sh'],
240   [0L, 'string', '=', '#! /bin/bash', 'application/x-sh'],
241   [0L, 'string', '=', '#!/usr/local/bin/bash', 'application/x-sh'],
242   [0L, 'string', '=', '#! /usr/local/bin/bash', 'application/x-sh'],
243   [0L, 'string', '=', '#! /usr/local/bin/bash', 'application/x-sh'],
244   [0L, 'string', '=', '#! /', 'text/script'],
245   [0L, 'string', '=', '#! /', 'text/script'],
246   [0L, 'string', '=', '#!/', 'text/script'],
247   [0L, 'string', '=', '#! text/script', ''],
248   [0L, 'string', '=', '\037\235', 'application/compress'],
249   [0L, 'string', '=', '\037\213', 'application/x-gzip'],
250   [0L, 'string', '=', '\037\036', 'application/data'],
251   [0L, 'short', '=', 17437L, 'application/data'],
252   [0L, 'short', '=', 8191L, 'application/data'],
253   [0L, 'string', '=', '\377\037', 'application/data'],
254   [0L, 'short', '=', 145405L, 'application/data'],
255   [0L, 'string', '=', 'BZh', 'application/x-bzip2'],
256   [0L, 'leshort', '=', 65398L, 'application/data'],
257   [0L, 'leshort', '=', 65142L, 'application/data'],
258   [0L, 'leshort', '=', 64886L, 'application/x-lzh'],
259   [0L, 'string', '=', '\037\237', 'application/data'],
260   [0L, 'string', '=', '\037\236', 'application/data'],
261   [0L, 'string', '=', '\037\240', 'application/data'],
262   [0L, 'string', '=', 'BZ', 'application/x-bzip'],
263   [0L, 'string', '=', '\211LZO\000\015\012\032\012', 'application/data'],
264   [0L, 'belong', '=', 507L, 'application/x-object-file'],
265   [0L, 'belong', '=', 513L, 'application/x-executable-file'],
266   [0L, 'belong', '=', 515L, 'application/x-executable-file'],
267   [0L, 'belong', '=', 517L, 'application/x-executable-file'],
268   [0L, 'belong', '=', 70231L, 'application/core'],
269   [24L, 'belong', '=', 60011L, 'application/data'],
270   [24L, 'belong', '=', 60012L, 'application/data'],
271   [24L, 'belong', '=', 60013L, 'application/data'],
272   [24L, 'belong', '=', 60014L, 'application/data'],
273   [0L, 'belong', '=', 601L, 'application/x-object-file'],
274   [0L, 'belong', '=', 607L, 'application/data'],
275   [0L, 'belong', '=', 324508366L, 'application/x-gdbm'],
276   [0L, 'lelong', '=', 324508366L, 'application/x-gdbm'],
277   [0L, 'string', '=', 'GDBM', 'application/x-gdbm'],
278   [0L, 'belong', '=', 398689L, 'application/x-db'],
279   [0L, 'belong', '=', 340322L, 'application/x-db'],
280   [0L, 'string', '=', '<list>\012<protocol bbn-m', 'application/data'],
281   [0L, 'string', '=', 'diff text/x-patch', ''],
282   [0L, 'string', '=', '*** text/x-patch', ''],
283   [0L, 'string', '=', 'Only in text/x-patch', ''],
284   [0L, 'string', '=', 'Common subdirectories: text/x-patch', ''],
285   [0L, 'string', '=', '!<arch>\012________64E', 'application/data'],
286   [0L, 'leshort', '=', 387L, 'application/x-executable-file'],
287   [0L, 'leshort', '=', 392L, 'application/x-executable-file'],
288   [0L, 'leshort', '=', 399L, 'application/x-object-file'],
289   [0L, 'string', '=', '\377\377\177', 'application/data'],
290   [0L, 'string', '=', '\377\377|', 'application/data'],
291   [0L, 'string', '=', '\377\377~', 'application/data'],
292   [0L, 'string', '=', '\033c\033', 'application/data'],
293   [0L, 'long', '=', 4553207L, 'image/x11'],
294   [0L, 'string', '=', '!<PDF>!\012', 'application/x-prof'],
295   [0L, 'short', '=', 1281L, 'application/x-locale'],
296   [24L, 'belong', '=', 60012L, 'application/x-dump'],
297   [24L, 'belong', '=', 60011L, 'application/x-dump'],
298   [24L, 'lelong', '=', 60012L, 'application/x-dump'],
299   [24L, 'lelong', '=', 60011L, 'application/x-dump'],
300   [0L, 'string', '=', '\177ELF', 'application/x-executable-file'],
301   [0L, 'short', '=', 340L, 'application/data'],
302   [0L, 'short', '=', 341L, 'application/x-executable-file'],
303   [1080L, 'leshort', '=', 61267L, 'application/x-linux-ext2fs'],
304   [0L, 'string', '=', '\366\366\366\366', 'application/x-pc-floppy'],
305   [774L, 'beshort', '=', 55998L, 'application/data'],
306   [510L, 'leshort', '=', 43605L, 'application/data'],
307   [1040L, 'leshort', '=', 4991L, 'application/x-filesystem'],
308   [1040L, 'leshort', '=', 5007L, 'application/x-filesystem'],
309   [1040L, 'leshort', '=', 9320L, 'application/x-filesystem'],
310   [1040L, 'leshort', '=', 9336L, 'application/x-filesystem'],
311   [0L, 'string', '=', '-rom1fs-\000', 'application/x-filesystem'],
312   [395L, 'string', '=', 'OS/2', 'application/x-bootable'],
313   [0L, 'string', '=', 'FONT', 'font/x-vfont'],
314   [0L, 'short', '=', 436L, 'font/x-vfont'],
315   [0L, 'short', '=', 17001L, 'font/x-vfont'],
316   [0L, 'string', '=', '%!PS-AdobeFont-1.0', 'font/type1'],
317   [6L, 'string', '=', '%!PS-AdobeFont-1.0', 'font/type1'],
318   [0L, 'belong', '=', 4L, 'font/x-snf'],
319   [0L, 'lelong', '=', 4L, 'font/x-snf'],
320   [0L, 'string', '=', 'STARTFONT font/x-bdf', ''],
321   [0L, 'string', '=', '\001fcp', 'font/x-pcf'],
322   [0L, 'string', '=', 'D1.0\015', 'font/x-speedo'],
323   [0L, 'string', '=', 'flf', 'font/x-figlet'],
324   [0L, 'string', '=', 'flc', 'application/x-font'],
325   [0L, 'belong', '=', 335698201L, 'font/x-libgrx'],
326   [0L, 'belong', '=', 4282797902L, 'font/x-dos'],
327   [7L, 'belong', '=', 4540225L, 'font/x-dos'],
328   [7L, 'belong', '=', 5654852L, 'font/x-dos'],
329   [4098L, 'string', '=', 'DOSFONT', 'font/x-dos'],
330   [0L, 'string', '=', '<MakerFile', 'application/x-framemaker'],
331   [0L, 'string', '=', '<MIFFile', 'application/x-framemaker'],
332   [0L, 'string', '=', '<MakerDictionary', 'application/x-framemaker'],
333   [0L, 'string', '=', '<MakerScreenFont', 'font/x-framemaker'],
334   [0L, 'string', '=', '<MML', 'application/x-framemaker'],
335   [0L, 'string', '=', '<BookFile', 'application/x-framemaker'],
336   [0L, 'string', '=', '<Maker', 'application/x-framemaker'],
337   [0L, 'lelong&0377777777', '=', 41400407L, 'application/x-executable-file'],
338   [0L, 'lelong&0377777777', '=', 41400410L, 'application/x-executable-file'],
339   [0L, 'lelong&0377777777', '=', 41400413L, 'application/x-executable-file'],
340   [0L, 'lelong&0377777777', '=', 41400314L, 'application/x-executable-file'],
341   [7L, 'string', '=', '\357\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000', 'application/core'],
342   [0L, 'lelong', '=', 11421044151L, 'application/data'],
343   [0L, 'string', '=', 'GIMP Gradient', 'application/x-gimp-gradient'],
344   [0L, 'string', '=', 'gimp xcf', 'application/x-gimp-image'],
345   [20L, 'string', '=', 'GPAT', 'application/x-gimp-pattern'],
346   [20L, 'string', '=', 'GIMP', 'application/x-gimp-brush'],
347   [0L, 'string', '=', '\336\022\004\225', 'application/x-locale'],
348   [0L, 'string', '=', '\225\004\022\336', 'application/x-locale'],
349   [0L, 'beshort', '=', 627L, 'application/x-executable-file'],
350   [0L, 'beshort', '=', 624L, 'application/x-executable-file'],
351   [0L, 'string', '=', '\000\001\000\000\000', 'font/ttf'],
352   [0L, 'long', '=', 1203604016L, 'application/data'],
353   [0L, 'long', '=', 1702407010L, 'application/data'],
354   [0L, 'long', '=', 1003405017L, 'application/data'],
355   [0L, 'long', '=', 1602007412L, 'application/data'],
356   [0L, 'belong', '=', 34603270L, 'application/x-object-file'],
357   [0L, 'belong', '=', 34603271L, 'application/x-executable-file'],
358   [0L, 'belong', '=', 34603272L, 'application/x-executable-file'],
359   [0L, 'belong', '=', 34603275L, 'application/x-executable-file'],
360   [0L, 'belong', '=', 34603278L, 'application/x-library-file'],
361   [0L, 'belong', '=', 34603277L, 'application/x-library-file'],
362   [0L, 'belong', '=', 34865414L, 'application/x-object-file'],
363   [0L, 'belong', '=', 34865415L, 'application/x-executable-file'],
364   [0L, 'belong', '=', 34865416L, 'application/x-executable-file'],
365   [0L, 'belong', '=', 34865419L, 'application/x-executable-file'],
366   [0L, 'belong', '=', 34865422L, 'application/x-library-file'],
367   [0L, 'belong', '=', 34865421L, 'application/x-object-file'],
368   [0L, 'belong', '=', 34275590L, 'application/x-object-file'],
369   [0L, 'belong', '=', 34275591L, 'application/x-executable-file'],
370   [0L, 'belong', '=', 34275592L, 'application/x-executable-file'],
371   [0L, 'belong', '=', 34275595L, 'application/x-executable-file'],
372   [0L, 'belong', '=', 34275598L, 'application/x-library-file'],
373   [0L, 'belong', '=', 34275597L, 'application/x-library-file'],
374   [0L, 'belong', '=', 557605234L, 'application/x-ar'],
375   [0L, 'long', '=', 34078982L, 'application/x-executable-file'],
376   [0L, 'long', '=', 34078983L, 'application/x-executable-file'],
377   [0L, 'long', '=', 34078984L, 'application/x-executable-file'],
378   [0L, 'belong', '=', 34341128L, 'application/x-executable-file'],
379   [0L, 'belong', '=', 34341127L, 'application/x-executable-file'],
380   [0L, 'belong', '=', 34341131L, 'application/x-executable-file'],
381   [0L, 'belong', '=', 34341126L, 'application/x-executable-file'],
382   [0L, 'belong', '=', 34210056L, 'application/x-executable-file'],
383   [0L, 'belong', '=', 34210055L, 'application/x-executable-file'],
384   [0L, 'belong', '=', 34341134L, 'application/x-library-file'],
385   [0L, 'belong', '=', 34341133L, 'application/x-library-file'],
386   [0L, 'long', '=', 65381L, 'application/x-library-file'],
387   [0L, 'long', '=', 34275173L, 'application/x-library-file'],
388   [0L, 'long', '=', 34406245L, 'application/x-library-file'],
389   [0L, 'long', '=', 34144101L, 'application/x-library-file'],
390   [0L, 'long', '=', 22552998L, 'application/core'],
391   [0L, 'long', '=', 1302851304L, 'font/x-hp-windows'],
392   [0L, 'string', '=', 'Bitmapfile', 'image/unknown'],
393   [0L, 'string', '=', 'IMGfile', 'CIS image/unknown'],
394   [0L, 'long', '=', 34341132L, 'application/x-lisp'],
395   [0L, 'string', '=', 'msgcat01', 'application/x-locale'],
396   [0L, 'string', '=', 'HPHP48-', 'HP48 binary'],
397   [0L, 'string', '=', '%%HP:', 'HP48 text'],
398   [0L, 'beshort', '=', 200L, 'hp200 (68010) BSD'],
399   [0L, 'beshort', '=', 300L, 'hp300 (68020+68881) BSD'],
400   [0L, 'beshort', '=', 537L, '370 XA sysV executable'],
401   [0L, 'beshort', '=', 532L, '370 XA sysV pure executable'],
402   [0L, 'beshort', '=', 54001L, '370 sysV pure executable'],
403   [0L, 'beshort', '=', 55001L, '370 XA sysV pure executable'],
404   [0L, 'beshort', '=', 56401L, '370 sysV executable'],
405   [0L, 'beshort', '=', 57401L, '370 XA sysV executable'],
406   [0L, 'beshort', '=', 531L, 'SVR2 executable (Amdahl-UTS)'],
407   [0L, 'beshort', '=', 534L, 'SVR2 pure executable (Amdahl-UTS)'],
408   [0L, 'beshort', '=', 530L, 'SVR2 pure executable (USS/370)'],
409   [0L, 'beshort', '=', 535L, 'SVR2 executable (USS/370)'],
410   [0L, 'beshort', '=', 479L, 'executable (RISC System/6000 V3.1) or obj module'],
411   [0L, 'beshort', '=', 260L, 'shared library'],
412   [0L, 'beshort', '=', 261L, 'ctab data'],
413   [0L, 'beshort', '=', 65028L, 'structured file'],
414   [0L, 'string', '=', '0xabcdef', 'AIX message catalog'],
415   [0L, 'belong', '=', 505L, 'AIX compiled message catalog'],
416   [0L, 'string', '=', '<aiaff>', 'archive'],
417   [0L, 'string', '=', 'FORM', 'IFF data'],
418   [0L, 'string', '=', 'P1', 'image/x-portable-bitmap'],
419   [0L, 'string', '=', 'P2', 'image/x-portable-graymap'],
420   [0L, 'string', '=', 'P3', 'image/x-portable-pixmap'],
421   [0L, 'string', '=', 'P4', 'image/x-portable-bitmap'],
422   [0L, 'string', '=', 'P5', 'image/x-portable-graymap'],
423   [0L, 'string', '=', 'P6', 'image/x-portable-pixmap'],
424   [0L, 'string', '=', 'IIN1', 'image/tiff'],
425   [0L, 'string', '=', 'MM\000*', 'image/tiff'],
426   [0L, 'string', '=', 'II*\000', 'image/tiff'],
427   [0L, 'string', '=', '\211PNG', 'image/x-png'],
428   [1L, 'string', '=', 'PNG', 'image/x-png'],
429   [0L, 'string', '=', 'GIF8', 'image/gif'],
430   [0L, 'string', '=', '\361\000@\273', 'image/x-cmu-raster'],
431   [0L, 'string', '=', 'id=ImageMagick', 'MIFF image data'],
432   [0L, 'long', '=', 1123028772L, 'Artisan image data'],
433   [0L, 'string', '=', '#FIG', 'FIG image text'],
434   [0L, 'string', '=', 'ARF_BEGARF', 'PHIGS clear text archive'],
435   [0L, 'string', '=', '@(#)SunPHIGS', 'SunPHIGS'],
436   [0L, 'string', '=', 'GKSM', 'GKS Metafile'],
437   [0L, 'string', '=', 'BEGMF', 'clear text Computer Graphics Metafile'],
438   [0L, 'beshort&0xffe0', '=', 32L, 'binary Computer Graphics Metafile'],
439   [0L, 'beshort', '=', 12320L, 'character Computer Graphics Metafile'],
440   [0L, 'string', '=', 'yz', 'MGR bitmap, modern format, 8-bit aligned'],
441   [0L, 'string', '=', 'zz', 'MGR bitmap, old format, 1-bit deep, 16-bit aligned'],
442   [0L, 'string', '=', 'xz', 'MGR bitmap, old format, 1-bit deep, 32-bit aligned'],
443   [0L, 'string', '=', 'yx', 'MGR bitmap, modern format, squeezed'],
444   [0L, 'string', '=', '%bitmap\000', 'FBM image data'],
445   [1L, 'string', '=', 'PC Research, Inc', 'group 3 fax data'],
446   [0L, 'beshort', '=', 65496L, 'image/jpeg'],
447   [0L, 'string', '=', 'hsi1', 'image/x-jpeg-proprietary'],
448   [0L, 'string', '=', 'BM', 'image/x-bmp'],
449   [0L, 'string', '=', 'IC', 'image/x-ico'],
450   [0L, 'string', '=', 'PI', 'PC pointer image data'],
451   [0L, 'string', '=', 'CI', 'PC color icon data'],
452   [0L, 'string', '=', 'CP', 'PC color pointer image data'],
453   [0L, 'string', '=', '/* XPM */', 'X pixmap image text'],
454   [0L, 'leshort', '=', 52306L, 'RLE image data,'],
455   [0L, 'string', '=', 'Imagefile version-', 'iff image data'],
456   [0L, 'belong', '=', 1504078485L, 'x/x-image-sun-raster'],
457   [0L, 'beshort', '=', 474L, 'x/x-image-sgi'],
458   [0L, 'string', '=', 'IT01', 'FIT image data'],
459   [0L, 'string', '=', 'IT02', 'FIT image data'],
460   [2048L, 'string', '=', 'PCD_IPI', 'x/x-photo-cd-pack-file'],
461   [0L, 'string', '=', 'PCD_OPA', 'x/x-photo-cd-overfiew-file'],
462   [0L, 'string', '=', 'SIMPLE  =', 'FITS image data'],
463   [0L, 'string', '=', 'This is a BitMap file', 'Lisp Machine bit-array-file'],
464   [0L, 'string', '=', '!!', 'Bennet Yee\'s "face" format'],
465   [0L, 'beshort', '=', 4112L, 'PEX Binary Archive'],
466   [3000L, 'string', '=', 'Visio (TM) Drawing', '%s'],
467   [0L, 'leshort', '=', 502L, 'basic-16 executable'],
468   [0L, 'leshort', '=', 503L, 'basic-16 executable (TV)'],
469   [0L, 'leshort', '=', 510L, 'application/x-executable-file'],
470   [0L, 'leshort', '=', 511L, 'application/x-executable-file'],
471   [0L, 'leshort', '=', 512L, 'application/x-executable-file'],
472   [0L, 'leshort', '=', 522L, 'application/x-executable-file'],
473   [0L, 'leshort', '=', 514L, 'application/x-executable-file'],
474   [0L, 'string', '=', '\210OPS', 'Interleaf saved data'],
475   [0L, 'string', '=', '<!OPS', 'Interleaf document text'],
476   [4L, 'string', '=', 'pgscriptver', 'IslandWrite document'],
477   [13L, 'string', '=', 'DrawFile', 'IslandDraw document'],
478   [0L, 'leshort&0xFFFC', '=', 38400L, 'little endian ispell'],
479   [0L, 'beshort&0xFFFC', '=', 38400L, 'big endian ispell'],
480   [0L, 'belong', '=', 3405691582L, 'compiled Java class data,'],
481   [0L, 'beshort', '=', 44269L, 'Java serialization data'],
482   [0L, 'string', '=', 'KarmaRHD', 'Version Karma Data Structure Version'],
483   [0L, 'string', '=', 'lect', 'DEC SRC Virtual Paper Lectern file'],
484   [53L, 'string', '=', 'yyprevious', 'C program text (from lex)'],
485   [21L, 'string', '=', 'generated by flex', 'C program text (from flex)'],
486   [0L, 'string',