line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Type; |
2
|
3
|
|
|
3
|
|
27176
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
100
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
89
|
|
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
2849
|
use IO::File; |
|
3
|
|
|
|
|
31700
|
|
|
3
|
|
|
|
|
26998
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = "0.22"; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
3
|
|
|
3
|
1
|
851
|
my $class = shift; |
11
|
3
|
|
|
|
|
8
|
my $self = {}; |
12
|
3
|
|
|
|
|
8
|
bless $self, $class; |
13
|
3
|
|
|
|
|
9
|
return $self; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub mime_type { |
17
|
|
|
|
|
|
|
# magically route argument |
18
|
|
|
|
|
|
|
|
19
|
18
|
|
|
18
|
1
|
10002
|
my($self, $argument) = @_; |
20
|
|
|
|
|
|
|
|
21
|
18
|
100
|
100
|
|
|
95
|
if (length $argument > 1024 || $argument =~ m/\n/) { |
22
|
|
|
|
|
|
|
# assume it's data. Saves a stat call if the data's long |
23
|
|
|
|
|
|
|
# also avoids stat warning if there's a newline |
24
|
10
|
|
|
|
|
26
|
return $self->checktype_contents($argument); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
8
|
100
|
|
|
|
176
|
if (-e $argument) { |
28
|
6
|
50
|
|
|
|
77
|
if (!-d $argument) { |
29
|
6
|
|
|
|
|
19
|
return $self->checktype_filename($argument); |
30
|
|
|
|
|
|
|
} else { |
31
|
0
|
|
|
|
|
0
|
return undef; # directories don't have mime types |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
# otherwise, fall back to checking the string as if it's data again |
35
|
2
|
|
|
|
|
7
|
return $self->checktype_contents($argument); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub checktype_filename { |
39
|
|
|
|
|
|
|
# reads in 16k of selected file, or returns undef if can't open, |
40
|
|
|
|
|
|
|
# then checks contents |
41
|
|
|
|
|
|
|
|
42
|
24
|
|
|
24
|
1
|
7533
|
my($self, $filename) = @_; |
43
|
24
|
|
50
|
|
|
147
|
my $fh = IO::File->new($filename) || return undef; |
44
|
24
|
|
|
|
|
1777
|
my $data; |
45
|
24
|
|
|
|
|
78
|
$fh->read($data, 16*1024); |
46
|
24
|
|
|
|
|
702
|
$fh->close; |
47
|
24
|
|
|
|
|
331
|
return $self->checktype_contents($data); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub checktype_contents { |
51
|
|
|
|
|
|
|
# checks file contents |
52
|
|
|
|
|
|
|
|
53
|
54
|
|
|
54
|
1
|
171
|
my($self, $data) = @_; |
54
|
54
|
|
|
|
|
57
|
my $substr; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# autogenerated code begins |
57
|
|
|
|
|
|
|
|
58
|
54
|
50
|
|
|
|
127
|
if ($data =~ m[^TADS]) { |
59
|
0
|
|
|
|
|
0
|
return q{application/x-tads-game}; |
60
|
|
|
|
|
|
|
} |
61
|
54
|
50
|
|
|
|
105
|
if ($data =~ m[^Core\001]) { |
62
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
63
|
|
|
|
|
|
|
} |
64
|
54
|
50
|
|
|
|
91
|
if ($data =~ m[^AMANDA\:\ TAPESTART\ DATE]) { |
65
|
0
|
|
|
|
|
0
|
return q{application/x-amanda-header}; |
66
|
|
|
|
|
|
|
} |
67
|
54
|
50
|
|
|
|
108
|
if (length $data > 0) { |
68
|
54
|
|
|
|
|
90
|
$substr = substr($data, 0, 4); |
69
|
54
|
50
|
|
|
|
101
|
if (pack('H*', '000003f3') eq $substr ) { |
70
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
} |
73
|
54
|
50
|
|
|
|
90
|
if (length $data > 0) { |
74
|
54
|
|
|
|
|
60
|
$substr = substr($data, 0, 4); |
75
|
54
|
50
|
|
|
|
120
|
if (pack('H*', '000003e7') eq $substr ) { |
76
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
} |
79
|
54
|
50
|
|
|
|
85
|
if (length $data > 0) { |
80
|
54
|
|
|
|
|
59
|
$substr = substr($data, 0, 4); |
81
|
54
|
50
|
|
|
|
91
|
if (pack('H*', '000001b3') eq $substr ) { |
82
|
0
|
|
|
|
|
0
|
return q{video/mpeg}; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
} |
85
|
54
|
50
|
|
|
|
85
|
if (length $data > 0) { |
86
|
54
|
|
|
|
|
102
|
$substr = substr($data, 0, 4); |
87
|
54
|
50
|
|
|
|
88
|
if (pack('H*', '000001ba') eq $substr ) { |
88
|
0
|
|
|
|
|
0
|
return q{video/mpeg}; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
} |
91
|
54
|
50
|
|
|
|
85
|
if (length $data > 0) { |
92
|
54
|
|
|
|
|
60
|
$substr = substr($data, 0, 2); |
93
|
54
|
50
|
|
|
|
95
|
if (pack('H*', 'fff0') eq $substr ) { |
94
|
0
|
|
|
|
|
0
|
return q{audio/mpeg}; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
} |
97
|
54
|
50
|
|
|
|
87
|
if ($data =~ m[^MOVI]) { |
98
|
0
|
|
|
|
|
0
|
return q{video/x-sgi-movie}; |
99
|
|
|
|
|
|
|
} |
100
|
54
|
50
|
|
|
|
93
|
if (length $data > 4) { |
101
|
54
|
|
|
|
|
87
|
$substr = substr($data, 4, 1024); |
102
|
54
|
100
|
66
|
|
|
239
|
if (defined $substr && $substr =~ m[^moov]) { |
103
|
3
|
|
|
|
|
16
|
return q{video/quicktime}; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
} |
106
|
51
|
50
|
|
|
|
97
|
if (length $data > 4) { |
107
|
51
|
|
|
|
|
87
|
$substr = substr($data, 4, 1024); |
108
|
51
|
50
|
33
|
|
|
187
|
if (defined $substr && $substr =~ m[^mdat]) { |
109
|
0
|
|
|
|
|
0
|
return q{video/quicktime}; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
} |
112
|
51
|
50
|
|
|
|
89
|
if (length $data > 8) { |
113
|
51
|
|
|
|
|
71
|
$substr = substr($data, 8, 1024); |
114
|
51
|
50
|
33
|
|
|
203
|
if (defined $substr && $substr =~ m[^mp42]) { |
115
|
0
|
|
|
|
|
0
|
return q{video/quicktime}; |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
} |
118
|
51
|
50
|
|
|
|
93
|
if (length $data > 12) { |
119
|
51
|
|
|
|
|
75
|
$substr = substr($data, 12, 1024); |
120
|
51
|
50
|
33
|
|
|
180
|
if (defined $substr && $substr =~ m[^mdat]) { |
121
|
0
|
|
|
|
|
0
|
return q{video/quicktime}; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
} |
124
|
51
|
50
|
|
|
|
91
|
if (length $data > 36) { |
125
|
51
|
|
|
|
|
67
|
$substr = substr($data, 36, 1024); |
126
|
51
|
50
|
33
|
|
|
182
|
if (defined $substr && $substr =~ m[^mdat]) { |
127
|
0
|
|
|
|
|
0
|
return q{video/quicktime}; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
} |
130
|
51
|
50
|
|
|
|
87
|
if (length $data > 0) { |
131
|
51
|
|
|
|
|
80
|
$substr = substr($data, 0, 4); |
132
|
51
|
100
|
|
|
|
93
|
if (pack('H*', '3026b275') eq $substr ) { |
133
|
3
|
|
|
|
|
18
|
return q{video/x-ms-asf}; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
} |
136
|
48
|
50
|
|
|
|
94
|
if ($data =~ m[^ASF\ ]) { |
137
|
0
|
|
|
|
|
0
|
return q{audio/x-ms-asx}; |
138
|
|
|
|
|
|
|
} |
139
|
48
|
50
|
|
|
|
96
|
if ($data =~ m[^\
|
140
|
0
|
|
|
|
|
0
|
return q{audio/x-ms-asx}; |
141
|
|
|
|
|
|
|
} |
142
|
48
|
50
|
|
|
|
84
|
if ($data =~ m[^\
|
143
|
0
|
|
|
|
|
0
|
return q{audio/x-ms-asx}; |
144
|
|
|
|
|
|
|
} |
145
|
48
|
50
|
|
|
|
89
|
if ($data =~ m[^FiLeStArTfIlEsTaRt]) { |
146
|
0
|
|
|
|
|
0
|
return q{text/x-apple-binscii}; |
147
|
|
|
|
|
|
|
} |
148
|
48
|
50
|
|
|
|
81
|
if ($data =~ m[^\x0aGL]) { |
149
|
0
|
|
|
|
|
0
|
return q{application/data}; |
150
|
|
|
|
|
|
|
} |
151
|
48
|
50
|
|
|
|
82
|
if ($data =~ m[^\x76\xff]) { |
152
|
0
|
|
|
|
|
0
|
return q{application/data}; |
153
|
|
|
|
|
|
|
} |
154
|
48
|
50
|
|
|
|
93
|
if ($data =~ m[^NuFile]) { |
155
|
0
|
|
|
|
|
0
|
return q{application/data}; |
156
|
|
|
|
|
|
|
} |
157
|
48
|
50
|
|
|
|
81
|
if ($data =~ m[^N\xf5F\xe9l\xe5]) { |
158
|
0
|
|
|
|
|
0
|
return q{application/data}; |
159
|
|
|
|
|
|
|
} |
160
|
48
|
50
|
|
|
|
75
|
if (length $data > 0) { |
161
|
48
|
|
|
|
|
56
|
$substr = substr($data, 0, 4); |
162
|
48
|
50
|
|
|
|
95
|
if (pack('H*', '00051600') eq $substr ) { |
163
|
0
|
|
|
|
|
0
|
return q{application/data}; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
} |
166
|
48
|
50
|
|
|
|
79
|
if (length $data > 0) { |
167
|
48
|
|
|
|
|
57
|
$substr = substr($data, 0, 4); |
168
|
48
|
50
|
|
|
|
95
|
if (pack('H*', '00051607') eq $substr ) { |
169
|
0
|
|
|
|
|
0
|
return q{application/data}; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
} |
172
|
48
|
100
|
|
|
|
69
|
if (length $data > 257) { |
173
|
33
|
|
|
|
|
58
|
$substr = substr($data, 257, 1024); |
174
|
33
|
100
|
66
|
|
|
127
|
if (defined $substr && $substr =~ m[^ustar\0]) { |
175
|
3
|
|
|
|
|
18
|
return q{application/x-tar}; |
176
|
|
|
|
|
|
|
} |
177
|
|
|
|
|
|
|
} |
178
|
45
|
100
|
|
|
|
80
|
if (length $data > 257) { |
179
|
30
|
|
|
|
|
45
|
$substr = substr($data, 257, 1024); |
180
|
30
|
50
|
33
|
|
|
112
|
if (defined $substr && $substr =~ m[^ustar\040\040\0]) { |
181
|
0
|
|
|
|
|
0
|
return q{application/x-gtar}; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
} |
184
|
45
|
50
|
|
|
|
90
|
if ($data =~ m[^070707]) { |
185
|
0
|
|
|
|
|
0
|
return q{application/x-cpio}; |
186
|
|
|
|
|
|
|
} |
187
|
45
|
50
|
|
|
|
79
|
if ($data =~ m[^070701]) { |
188
|
0
|
|
|
|
|
0
|
return q{application/x-cpio}; |
189
|
|
|
|
|
|
|
} |
190
|
45
|
50
|
|
|
|
71
|
if ($data =~ m[^070702]) { |
191
|
0
|
|
|
|
|
0
|
return q{application/x-cpio}; |
192
|
|
|
|
|
|
|
} |
193
|
45
|
50
|
|
|
|
107
|
if ($data =~ m[^\!\\ndebian]) { |
194
|
0
|
|
|
|
|
0
|
return q{application/x-dpkg}; |
195
|
|
|
|
|
|
|
} |
196
|
45
|
50
|
|
|
|
67
|
if ($data =~ m[^\=\]) { |
197
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
198
|
|
|
|
|
|
|
} |
199
|
45
|
50
|
|
|
|
84
|
if ($data =~ m[^\!\\n__________E]) { |
200
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
201
|
|
|
|
|
|
|
} |
202
|
45
|
50
|
|
|
|
66
|
if ($data =~ m[^\-h\-]) { |
203
|
0
|
|
|
|
|
0
|
return q{application/data}; |
204
|
|
|
|
|
|
|
} |
205
|
45
|
50
|
|
|
|
74
|
if ($data =~ m[^\!\]) { |
206
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
207
|
|
|
|
|
|
|
} |
208
|
45
|
50
|
|
|
|
71
|
if ($data =~ m[^\]) { |
209
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
210
|
|
|
|
|
|
|
} |
211
|
45
|
50
|
|
|
|
71
|
if ($data =~ m[^\=\]) { |
212
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
213
|
|
|
|
|
|
|
} |
214
|
45
|
50
|
|
|
|
87
|
if (length $data > 0) { |
215
|
45
|
|
|
|
|
51
|
$substr = substr($data, 0, 4); |
216
|
45
|
50
|
|
|
|
79
|
if (pack('H*', '65ff0000') eq $substr ) { |
217
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
} |
220
|
45
|
50
|
|
|
|
68
|
if (length $data > 0) { |
221
|
45
|
|
|
|
|
47
|
$substr = substr($data, 0, 4); |
222
|
45
|
50
|
|
|
|
65
|
if (pack('H*', '3c61723e') eq $substr ) { |
223
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
} |
226
|
45
|
50
|
|
|
|
131
|
if ($data =~ m[^\032archive]) { |
227
|
0
|
|
|
|
|
0
|
return q{application/data}; |
228
|
|
|
|
|
|
|
} |
229
|
45
|
50
|
|
|
|
66
|
if ($data =~ m[^HPAK]) { |
230
|
0
|
|
|
|
|
0
|
return q{application/data}; |
231
|
|
|
|
|
|
|
} |
232
|
45
|
50
|
|
|
|
71
|
if ($data =~ m[^\351\,\001JAM\ ]) { |
233
|
0
|
|
|
|
|
0
|
return q{application/data}; |
234
|
|
|
|
|
|
|
} |
235
|
45
|
50
|
|
|
|
88
|
if (length $data > 2) { |
236
|
45
|
|
|
|
|
69
|
$substr = substr($data, 2, 1024); |
237
|
45
|
50
|
33
|
|
|
175
|
if (defined $substr && $substr =~ m[^\-lh0\-]) { |
238
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
} |
241
|
45
|
50
|
|
|
|
76
|
if (length $data > 2) { |
242
|
45
|
|
|
|
|
59
|
$substr = substr($data, 2, 1024); |
243
|
45
|
50
|
33
|
|
|
169
|
if (defined $substr && $substr =~ m[^\-lh1\-]) { |
244
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
} |
247
|
45
|
50
|
|
|
|
81
|
if (length $data > 2) { |
248
|
45
|
|
|
|
|
65
|
$substr = substr($data, 2, 1024); |
249
|
45
|
50
|
33
|
|
|
146
|
if (defined $substr && $substr =~ m[^\-lz4\-]) { |
250
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
} |
253
|
45
|
50
|
|
|
|
78
|
if (length $data > 2) { |
254
|
45
|
|
|
|
|
67
|
$substr = substr($data, 2, 1024); |
255
|
45
|
50
|
33
|
|
|
166
|
if (defined $substr && $substr =~ m[^\-lz5\-]) { |
256
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
} |
259
|
45
|
50
|
|
|
|
79
|
if (length $data > 2) { |
260
|
45
|
|
|
|
|
74
|
$substr = substr($data, 2, 1024); |
261
|
45
|
50
|
33
|
|
|
155
|
if (defined $substr && $substr =~ m[^\-lzs\-]) { |
262
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
263
|
|
|
|
|
|
|
} |
264
|
|
|
|
|
|
|
} |
265
|
45
|
50
|
|
|
|
68
|
if (length $data > 2) { |
266
|
45
|
|
|
|
|
64
|
$substr = substr($data, 2, 1024); |
267
|
45
|
50
|
33
|
|
|
149
|
if (defined $substr && $substr =~ m[^\-lh40\-]) { |
268
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
} |
271
|
45
|
50
|
|
|
|
126
|
if (length $data > 2) { |
272
|
45
|
|
|
|
|
70
|
$substr = substr($data, 2, 1024); |
273
|
45
|
50
|
33
|
|
|
162
|
if (defined $substr && $substr =~ m[^\-lhd\-]) { |
274
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
} |
277
|
45
|
50
|
|
|
|
81
|
if (length $data > 2) { |
278
|
45
|
|
|
|
|
63
|
$substr = substr($data, 2, 1024); |
279
|
45
|
50
|
33
|
|
|
161
|
if (defined $substr && $substr =~ m[^\-lh2\-]) { |
280
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
} |
283
|
45
|
50
|
|
|
|
73
|
if (length $data > 2) { |
284
|
45
|
|
|
|
|
66
|
$substr = substr($data, 2, 1024); |
285
|
45
|
50
|
33
|
|
|
162
|
if (defined $substr && $substr =~ m[^\-lh3\-]) { |
286
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
287
|
|
|
|
|
|
|
} |
288
|
|
|
|
|
|
|
} |
289
|
45
|
50
|
|
|
|
73
|
if (length $data > 2) { |
290
|
45
|
|
|
|
|
62
|
$substr = substr($data, 2, 1024); |
291
|
45
|
50
|
33
|
|
|
156
|
if (defined $substr && $substr =~ m[^\-lh4\-]) { |
292
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
293
|
|
|
|
|
|
|
} |
294
|
|
|
|
|
|
|
} |
295
|
45
|
50
|
|
|
|
83
|
if (length $data > 2) { |
296
|
45
|
|
|
|
|
71
|
$substr = substr($data, 2, 1024); |
297
|
45
|
50
|
33
|
|
|
157
|
if (defined $substr && $substr =~ m[^\-lh5\-]) { |
298
|
0
|
|
|
|
|
0
|
return q{application/x-lha}; |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
} |
301
|
45
|
50
|
|
|
|
85
|
if ($data =~ m[^Rar\!]) { |
302
|
0
|
|
|
|
|
0
|
return q{application/x-rar}; |
303
|
|
|
|
|
|
|
} |
304
|
45
|
50
|
|
|
|
81
|
if ($data =~ m[^SQSH]) { |
305
|
0
|
|
|
|
|
0
|
return q{application/data}; |
306
|
|
|
|
|
|
|
} |
307
|
45
|
50
|
|
|
|
76
|
if ($data =~ m[^UC2\x1a]) { |
308
|
0
|
|
|
|
|
0
|
return q{application/data}; |
309
|
|
|
|
|
|
|
} |
310
|
45
|
100
|
|
|
|
78
|
if ($data =~ m[^PK\003\004]) { |
311
|
3
|
|
|
|
|
18
|
return q{application/zip}; |
312
|
|
|
|
|
|
|
} |
313
|
42
|
50
|
|
|
|
69
|
if (length $data > 10) { |
314
|
42
|
|
|
|
|
61
|
$substr = substr($data, 10, 1024); |
315
|
42
|
50
|
33
|
|
|
149
|
if (defined $substr && $substr =~ m[^\#\ This\ is\ a\ shell\ archive]) { |
316
|
0
|
|
|
|
|
0
|
return q{application/x-shar}; |
317
|
|
|
|
|
|
|
} |
318
|
|
|
|
|
|
|
} |
319
|
42
|
50
|
|
|
|
80
|
if ($data =~ m[^\*STA]) { |
320
|
0
|
|
|
|
|
0
|
return q{application/data}; |
321
|
|
|
|
|
|
|
} |
322
|
42
|
50
|
|
|
|
70
|
if ($data =~ m[^2278]) { |
323
|
0
|
|
|
|
|
0
|
return q{application/data}; |
324
|
|
|
|
|
|
|
} |
325
|
42
|
50
|
|
|
|
76
|
if ($data =~ m[^\000\004\036\212\200]) { |
326
|
0
|
|
|
|
|
0
|
return q{application/core}; |
327
|
|
|
|
|
|
|
} |
328
|
42
|
50
|
|
|
|
73
|
if ($data =~ m[^\.snd]) { |
329
|
0
|
|
|
|
|
0
|
return q{audio/basic}; |
330
|
|
|
|
|
|
|
} |
331
|
42
|
50
|
|
|
|
69
|
if ($data =~ m[^MThd]) { |
332
|
0
|
|
|
|
|
0
|
return q{audio/midi}; |
333
|
|
|
|
|
|
|
} |
334
|
42
|
50
|
|
|
|
67
|
if ($data =~ m[^CTMF]) { |
335
|
0
|
|
|
|
|
0
|
return q{audio/x-cmf}; |
336
|
|
|
|
|
|
|
} |
337
|
42
|
50
|
|
|
|
89
|
if ($data =~ m[^SBI]) { |
338
|
0
|
|
|
|
|
0
|
return q{audio/x-sbi}; |
339
|
|
|
|
|
|
|
} |
340
|
42
|
50
|
|
|
|
72
|
if ($data =~ m[^Creative\ Voice\ File]) { |
341
|
0
|
|
|
|
|
0
|
return q{audio/x-voc}; |
342
|
|
|
|
|
|
|
} |
343
|
42
|
50
|
|
|
|
68
|
if (length $data > 0) { |
344
|
42
|
|
|
|
|
51
|
$substr = substr($data, 0, 4); |
345
|
42
|
50
|
|
|
|
78
|
if (pack('H*', '4e54524b') eq $substr ) { |
346
|
0
|
|
|
|
|
0
|
return q{audio/x-multitrack}; |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
} |
349
|
42
|
50
|
|
|
|
69
|
if (length $data > 8) { |
350
|
42
|
|
|
|
|
62
|
$substr = substr($data, 8, 1024); |
351
|
42
|
100
|
66
|
|
|
169
|
if (defined $substr && $substr =~ m[^AVI]) { |
352
|
3
|
|
|
|
|
18
|
return q{video/x-msvideo}; |
353
|
|
|
|
|
|
|
} |
354
|
|
|
|
|
|
|
} |
355
|
39
|
50
|
|
|
|
67
|
if (length $data > 8) { |
356
|
39
|
|
|
|
|
52
|
$substr = substr($data, 8, 1024); |
357
|
39
|
100
|
66
|
|
|
141
|
if (defined $substr && $substr =~ m[^WAVE]) { |
358
|
6
|
|
|
|
|
38
|
return q{audio/x-wav}; |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
} |
361
|
33
|
50
|
|
|
|
54
|
if ($data =~ m[^EMOD]) { |
362
|
0
|
|
|
|
|
0
|
return q{audio/x-emod}; |
363
|
|
|
|
|
|
|
} |
364
|
33
|
50
|
|
|
|
60
|
if (length $data > 0) { |
365
|
33
|
|
|
|
|
37
|
$substr = substr($data, 0, 4); |
366
|
33
|
50
|
|
|
|
59
|
if (pack('H*', '2e7261fd') eq $substr ) { |
367
|
0
|
|
|
|
|
0
|
return q{audio/x-pn-realaudio}; |
368
|
|
|
|
|
|
|
} |
369
|
|
|
|
|
|
|
} |
370
|
33
|
50
|
|
|
|
63
|
if ($data =~ m[^MTM]) { |
371
|
0
|
|
|
|
|
0
|
return q{audio/x-multitrack}; |
372
|
|
|
|
|
|
|
} |
373
|
33
|
50
|
|
|
|
53
|
if ($data =~ m[^if]) { |
374
|
0
|
|
|
|
|
0
|
return q{audio/x-669-mod}; |
375
|
|
|
|
|
|
|
} |
376
|
33
|
50
|
|
|
|
60
|
if ($data =~ m[^FAR]) { |
377
|
0
|
|
|
|
|
0
|
return q{audio/mod}; |
378
|
|
|
|
|
|
|
} |
379
|
33
|
50
|
|
|
|
53
|
if ($data =~ m[^MAS_U]) { |
380
|
0
|
|
|
|
|
0
|
return q{audio/x-multimate-mod}; |
381
|
|
|
|
|
|
|
} |
382
|
33
|
50
|
|
|
|
60
|
if (length $data > 0x2c) { |
383
|
33
|
|
|
|
|
54
|
$substr = substr($data, 0x2c, 1024); |
384
|
33
|
50
|
33
|
|
|
122
|
if (defined $substr && $substr =~ m[^SCRM]) { |
385
|
0
|
|
|
|
|
0
|
return q{audio/x-st3-mod}; |
386
|
|
|
|
|
|
|
} |
387
|
|
|
|
|
|
|
} |
388
|
33
|
50
|
|
|
|
60
|
if ($data =~ m[^GF1PATCH110\0ID\#000002\0]) { |
389
|
0
|
|
|
|
|
0
|
return q{audio/x-gus-patch}; |
390
|
|
|
|
|
|
|
} |
391
|
33
|
50
|
|
|
|
54
|
if ($data =~ m[^GF1PATCH100\0ID\#000002\0]) { |
392
|
0
|
|
|
|
|
0
|
return q{audio/x-gus-patch}; |
393
|
|
|
|
|
|
|
} |
394
|
33
|
50
|
|
|
|
55
|
if ($data =~ m[^JN]) { |
395
|
0
|
|
|
|
|
0
|
return q{audio/x-669-mod}; |
396
|
|
|
|
|
|
|
} |
397
|
33
|
50
|
|
|
|
55
|
if ($data =~ m[^UN05]) { |
398
|
0
|
|
|
|
|
0
|
return q{audio/x-mikmod-uni}; |
399
|
|
|
|
|
|
|
} |
400
|
33
|
50
|
|
|
|
59
|
if ($data =~ m[^Extended\ Module\:]) { |
401
|
0
|
|
|
|
|
0
|
return q{audio/x-ft2-mod}; |
402
|
|
|
|
|
|
|
} |
403
|
33
|
50
|
|
|
|
53
|
if (length $data > 21) { |
404
|
33
|
|
|
|
|
50
|
$substr = substr($data, 21, 1024); |
405
|
33
|
50
|
33
|
|
|
136
|
if (defined $substr && $substr =~ m[^\!SCREAM\!]) { |
406
|
0
|
|
|
|
|
0
|
return q{audio/x-st2-mod}; |
407
|
|
|
|
|
|
|
} |
408
|
|
|
|
|
|
|
} |
409
|
33
|
100
|
|
|
|
61
|
if (length $data > 1080) { |
410
|
12
|
|
|
|
|
20
|
$substr = substr($data, 1080, 1024); |
411
|
12
|
50
|
33
|
|
|
49
|
if (defined $substr && $substr =~ m[^M\.K\.]) { |
412
|
0
|
|
|
|
|
0
|
return q{audio/x-protracker-mod}; |
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
} |
415
|
33
|
100
|
|
|
|
68
|
if (length $data > 1080) { |
416
|
12
|
|
|
|
|
18
|
$substr = substr($data, 1080, 1024); |
417
|
12
|
50
|
33
|
|
|
50
|
if (defined $substr && $substr =~ m[^M\!K\!]) { |
418
|
0
|
|
|
|
|
0
|
return q{audio/x-protracker-mod}; |
419
|
|
|
|
|
|
|
} |
420
|
|
|
|
|
|
|
} |
421
|
33
|
100
|
|
|
|
51
|
if (length $data > 1080) { |
422
|
12
|
|
|
|
|
21
|
$substr = substr($data, 1080, 1024); |
423
|
12
|
50
|
33
|
|
|
50
|
if (defined $substr && $substr =~ m[^FLT4]) { |
424
|
0
|
|
|
|
|
0
|
return q{audio/x-startracker-mod}; |
425
|
|
|
|
|
|
|
} |
426
|
|
|
|
|
|
|
} |
427
|
33
|
100
|
|
|
|
51
|
if (length $data > 1080) { |
428
|
12
|
|
|
|
|
24
|
$substr = substr($data, 1080, 1024); |
429
|
12
|
50
|
33
|
|
|
51
|
if (defined $substr && $substr =~ m[^4CHN]) { |
430
|
0
|
|
|
|
|
0
|
return q{audio/x-fasttracker-mod}; |
431
|
|
|
|
|
|
|
} |
432
|
|
|
|
|
|
|
} |
433
|
33
|
100
|
|
|
|
63
|
if (length $data > 1080) { |
434
|
12
|
|
|
|
|
21
|
$substr = substr($data, 1080, 1024); |
435
|
12
|
50
|
33
|
|
|
54
|
if (defined $substr && $substr =~ m[^6CHN]) { |
436
|
0
|
|
|
|
|
0
|
return q{audio/x-fasttracker-mod}; |
437
|
|
|
|
|
|
|
} |
438
|
|
|
|
|
|
|
} |
439
|
33
|
100
|
|
|
|
59
|
if (length $data > 1080) { |
440
|
12
|
|
|
|
|
22
|
$substr = substr($data, 1080, 1024); |
441
|
12
|
50
|
33
|
|
|
51
|
if (defined $substr && $substr =~ m[^8CHN]) { |
442
|
0
|
|
|
|
|
0
|
return q{audio/x-fasttracker-mod}; |
443
|
|
|
|
|
|
|
} |
444
|
|
|
|
|
|
|
} |
445
|
33
|
100
|
|
|
|
56
|
if (length $data > 1080) { |
446
|
12
|
|
|
|
|
21
|
$substr = substr($data, 1080, 1024); |
447
|
12
|
50
|
33
|
|
|
52
|
if (defined $substr && $substr =~ m[^CD81]) { |
448
|
0
|
|
|
|
|
0
|
return q{audio/x-oktalyzer-mod}; |
449
|
|
|
|
|
|
|
} |
450
|
|
|
|
|
|
|
} |
451
|
33
|
100
|
|
|
|
55
|
if (length $data > 1080) { |
452
|
12
|
|
|
|
|
21
|
$substr = substr($data, 1080, 1024); |
453
|
12
|
50
|
33
|
|
|
78
|
if (defined $substr && $substr =~ m[^OKTA]) { |
454
|
0
|
|
|
|
|
0
|
return q{audio/x-oktalyzer-mod}; |
455
|
|
|
|
|
|
|
} |
456
|
|
|
|
|
|
|
} |
457
|
33
|
100
|
|
|
|
84
|
if (length $data > 1080) { |
458
|
12
|
|
|
|
|
22
|
$substr = substr($data, 1080, 1024); |
459
|
12
|
50
|
33
|
|
|
55
|
if (defined $substr && $substr =~ m[^16CN]) { |
460
|
0
|
|
|
|
|
0
|
return q{audio/x-taketracker-mod}; |
461
|
|
|
|
|
|
|
} |
462
|
|
|
|
|
|
|
} |
463
|
33
|
100
|
|
|
|
85
|
if (length $data > 1080) { |
464
|
12
|
|
|
|
|
25
|
$substr = substr($data, 1080, 1024); |
465
|
12
|
50
|
33
|
|
|
52
|
if (defined $substr && $substr =~ m[^32CN]) { |
466
|
0
|
|
|
|
|
0
|
return q{audio/x-taketracker-mod}; |
467
|
|
|
|
|
|
|
} |
468
|
|
|
|
|
|
|
} |
469
|
33
|
50
|
|
|
|
60
|
if ($data =~ m[^TOC]) { |
470
|
0
|
|
|
|
|
0
|
return q{audio/x-toc}; |
471
|
|
|
|
|
|
|
} |
472
|
33
|
50
|
|
|
|
77
|
if (length $data > 0) { |
473
|
33
|
|
|
|
|
40
|
$substr = substr($data, 0, 2); |
474
|
33
|
50
|
|
|
|
66
|
if (pack('H*', 'fffa') eq $substr ) { |
475
|
0
|
|
|
|
|
0
|
return q{audio/mp3}; |
476
|
|
|
|
|
|
|
} |
477
|
|
|
|
|
|
|
} |
478
|
33
|
100
|
|
|
|
89
|
if ($data =~ m[^ID3]) { |
479
|
3
|
|
|
|
|
16
|
return q{audio/mp3}; |
480
|
|
|
|
|
|
|
} |
481
|
30
|
50
|
|
|
|
55
|
if ($data =~ m[^\/\/]) { |
482
|
0
|
|
|
|
|
0
|
return q{text/cpp}; |
483
|
|
|
|
|
|
|
} |
484
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\\1cw\ ]) { |
485
|
0
|
|
|
|
|
0
|
return q{application/data}; |
486
|
|
|
|
|
|
|
} |
487
|
30
|
50
|
|
|
|
51
|
if ($data =~ m[^\\1cw]) { |
488
|
0
|
|
|
|
|
0
|
return q{application/data}; |
489
|
|
|
|
|
|
|
} |
490
|
30
|
50
|
|
|
|
48
|
if (length $data > 0) { |
491
|
30
|
|
|
|
|
33
|
$substr = substr($data, 0, 4); |
492
|
30
|
50
|
|
|
|
50
|
if (pack('H*', '85011400') eq $substr ) { |
493
|
0
|
|
|
|
|
0
|
return q{application/data}; |
494
|
|
|
|
|
|
|
} |
495
|
|
|
|
|
|
|
} |
496
|
30
|
50
|
|
|
|
56
|
if (length $data > 0) { |
497
|
30
|
|
|
|
|
34
|
$substr = substr($data, 0, 4); |
498
|
30
|
50
|
|
|
|
44
|
if (pack('H*', '8501cb00') eq $substr ) { |
499
|
0
|
|
|
|
|
0
|
return q{application/data}; |
500
|
|
|
|
|
|
|
} |
501
|
|
|
|
|
|
|
} |
502
|
30
|
50
|
|
|
|
56
|
if (length $data > 4) { |
503
|
30
|
|
|
|
|
54
|
$substr = substr($data, 4, 1024); |
504
|
30
|
50
|
33
|
|
|
112
|
if (defined $substr && $substr =~ m[^pipe]) { |
505
|
0
|
|
|
|
|
0
|
return q{application/data}; |
506
|
|
|
|
|
|
|
} |
507
|
|
|
|
|
|
|
} |
508
|
30
|
50
|
|
|
|
51
|
if (length $data > 4) { |
509
|
30
|
|
|
|
|
43
|
$substr = substr($data, 4, 1024); |
510
|
30
|
50
|
33
|
|
|
107
|
if (defined $substr && $substr =~ m[^prof]) { |
511
|
0
|
|
|
|
|
0
|
return q{application/data}; |
512
|
|
|
|
|
|
|
} |
513
|
|
|
|
|
|
|
} |
514
|
30
|
50
|
|
|
|
62
|
if ($data =~ m[^\:\ shell]) { |
515
|
0
|
|
|
|
|
0
|
return q{application/data}; |
516
|
|
|
|
|
|
|
} |
517
|
30
|
50
|
|
|
|
58
|
if ($data =~ m[^\#\!\/bin\/sh]) { |
518
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
519
|
|
|
|
|
|
|
} |
520
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\#\!\ \/bin\/sh]) { |
521
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
522
|
|
|
|
|
|
|
} |
523
|
30
|
50
|
|
|
|
56
|
if ($data =~ m[^\#\!\ \/bin\/sh]) { |
524
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
525
|
|
|
|
|
|
|
} |
526
|
30
|
50
|
|
|
|
47
|
if ($data =~ m[^\#\!\/bin\/csh]) { |
527
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
528
|
|
|
|
|
|
|
} |
529
|
30
|
50
|
|
|
|
41
|
if ($data =~ m[^\#\!\ \/bin\/csh]) { |
530
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
531
|
|
|
|
|
|
|
} |
532
|
30
|
50
|
|
|
|
53
|
if ($data =~ m[^\#\!\ \/bin\/csh]) { |
533
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
534
|
|
|
|
|
|
|
} |
535
|
30
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\/bin\/ksh]) { |
536
|
0
|
|
|
|
|
0
|
return q{application/x-ksh}; |
537
|
|
|
|
|
|
|
} |
538
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\ \/bin\/ksh]) { |
539
|
0
|
|
|
|
|
0
|
return q{application/x-ksh}; |
540
|
|
|
|
|
|
|
} |
541
|
30
|
50
|
|
|
|
56
|
if ($data =~ m[^\#\!\ \/bin\/ksh]) { |
542
|
0
|
|
|
|
|
0
|
return q{application/x-ksh}; |
543
|
|
|
|
|
|
|
} |
544
|
30
|
50
|
|
|
|
51
|
if ($data =~ m[^\#\!\/bin\/tcsh]) { |
545
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
546
|
|
|
|
|
|
|
} |
547
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\#\!\ \/bin\/tcsh]) { |
548
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
549
|
|
|
|
|
|
|
} |
550
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\ \/bin\/tcsh]) { |
551
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
552
|
|
|
|
|
|
|
} |
553
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\/usr\/local\/tcsh]) { |
554
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
555
|
|
|
|
|
|
|
} |
556
|
30
|
50
|
|
|
|
44
|
if ($data =~ m[^\#\!\ \/usr\/local\/tcsh]) { |
557
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
558
|
|
|
|
|
|
|
} |
559
|
30
|
50
|
|
|
|
55
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/tcsh]) { |
560
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
561
|
|
|
|
|
|
|
} |
562
|
30
|
50
|
|
|
|
52
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/tcsh]) { |
563
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
564
|
|
|
|
|
|
|
} |
565
|
30
|
50
|
|
|
|
53
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/tcsh]) { |
566
|
0
|
|
|
|
|
0
|
return q{application/x-csh}; |
567
|
|
|
|
|
|
|
} |
568
|
30
|
50
|
|
|
|
54
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/zsh]) { |
569
|
0
|
|
|
|
|
0
|
return q{application/x-zsh}; |
570
|
|
|
|
|
|
|
} |
571
|
30
|
50
|
|
|
|
57
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/zsh]) { |
572
|
0
|
|
|
|
|
0
|
return q{application/x-zsh}; |
573
|
|
|
|
|
|
|
} |
574
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/zsh]) { |
575
|
0
|
|
|
|
|
0
|
return q{application/x-zsh}; |
576
|
|
|
|
|
|
|
} |
577
|
30
|
50
|
|
|
|
47
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/ash]) { |
578
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
579
|
|
|
|
|
|
|
} |
580
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/ash]) { |
581
|
0
|
|
|
|
|
0
|
return q{application/x-zsh}; |
582
|
|
|
|
|
|
|
} |
583
|
30
|
50
|
|
|
|
291
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/ash]) { |
584
|
0
|
|
|
|
|
0
|
return q{application/x-zsh}; |
585
|
|
|
|
|
|
|
} |
586
|
30
|
50
|
|
|
|
51
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/ae]) { |
587
|
0
|
|
|
|
|
0
|
return q{text/script}; |
588
|
|
|
|
|
|
|
} |
589
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/ae]) { |
590
|
0
|
|
|
|
|
0
|
return q{text/script}; |
591
|
|
|
|
|
|
|
} |
592
|
30
|
50
|
|
|
|
46
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/ae]) { |
593
|
0
|
|
|
|
|
0
|
return q{text/script}; |
594
|
|
|
|
|
|
|
} |
595
|
30
|
50
|
|
|
|
54
|
if ($data =~ m[^\#\!\/bin\/nawk]) { |
596
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
597
|
|
|
|
|
|
|
} |
598
|
30
|
50
|
|
|
|
44
|
if ($data =~ m[^\#\!\ \/bin\/nawk]) { |
599
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
600
|
|
|
|
|
|
|
} |
601
|
30
|
50
|
|
|
|
54
|
if ($data =~ m[^\#\!\ \/bin\/nawk]) { |
602
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
603
|
|
|
|
|
|
|
} |
604
|
30
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\/usr\/bin\/nawk]) { |
605
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
606
|
|
|
|
|
|
|
} |
607
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\#\!\ \/usr\/bin\/nawk]) { |
608
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
609
|
|
|
|
|
|
|
} |
610
|
30
|
50
|
|
|
|
57
|
if ($data =~ m[^\#\!\ \/usr\/bin\/nawk]) { |
611
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
612
|
|
|
|
|
|
|
} |
613
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/nawk]) { |
614
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
615
|
|
|
|
|
|
|
} |
616
|
30
|
50
|
|
|
|
47
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/nawk]) { |
617
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
618
|
|
|
|
|
|
|
} |
619
|
30
|
50
|
|
|
|
54
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/nawk]) { |
620
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
621
|
|
|
|
|
|
|
} |
622
|
30
|
50
|
|
|
|
52
|
if ($data =~ m[^\#\!\/bin\/gawk]) { |
623
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
624
|
|
|
|
|
|
|
} |
625
|
30
|
50
|
|
|
|
51
|
if ($data =~ m[^\#\!\ \/bin\/gawk]) { |
626
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
627
|
|
|
|
|
|
|
} |
628
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\#\!\ \/bin\/gawk]) { |
629
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
630
|
|
|
|
|
|
|
} |
631
|
30
|
50
|
|
|
|
52
|
if ($data =~ m[^\#\!\/usr\/bin\/gawk]) { |
632
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
633
|
|
|
|
|
|
|
} |
634
|
30
|
50
|
|
|
|
51
|
if ($data =~ m[^\#\!\ \/usr\/bin\/gawk]) { |
635
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
636
|
|
|
|
|
|
|
} |
637
|
30
|
50
|
|
|
|
59
|
if ($data =~ m[^\#\!\ \/usr\/bin\/gawk]) { |
638
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
639
|
|
|
|
|
|
|
} |
640
|
30
|
50
|
|
|
|
57
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/gawk]) { |
641
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
642
|
|
|
|
|
|
|
} |
643
|
30
|
50
|
|
|
|
51
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/gawk]) { |
644
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
645
|
|
|
|
|
|
|
} |
646
|
30
|
50
|
|
|
|
54
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/gawk]) { |
647
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
648
|
|
|
|
|
|
|
} |
649
|
30
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\/bin\/awk]) { |
650
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
651
|
|
|
|
|
|
|
} |
652
|
30
|
50
|
|
|
|
50
|
if ($data =~ m[^\#\!\ \/bin\/awk]) { |
653
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
654
|
|
|
|
|
|
|
} |
655
|
30
|
50
|
|
|
|
56
|
if ($data =~ m[^\#\!\ \/bin\/awk]) { |
656
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
657
|
|
|
|
|
|
|
} |
658
|
30
|
50
|
|
|
|
56
|
if ($data =~ m[^\#\!\/usr\/bin\/awk]) { |
659
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
660
|
|
|
|
|
|
|
} |
661
|
30
|
50
|
|
|
|
52
|
if ($data =~ m[^\#\!\ \/usr\/bin\/awk]) { |
662
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
663
|
|
|
|
|
|
|
} |
664
|
30
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\ \/usr\/bin\/awk]) { |
665
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
666
|
|
|
|
|
|
|
} |
667
|
30
|
50
|
|
|
|
57
|
if ($data =~ m[^BEGIN]) { |
668
|
0
|
|
|
|
|
0
|
return q{application/x-awk}; |
669
|
|
|
|
|
|
|
} |
670
|
30
|
50
|
|
|
|
63
|
if ($data =~ m[^\#\!\/bin\/perl]) { |
671
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
672
|
|
|
|
|
|
|
} |
673
|
30
|
50
|
|
|
|
44
|
if ($data =~ m[^\#\!\ \/bin\/perl]) { |
674
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
675
|
|
|
|
|
|
|
} |
676
|
30
|
50
|
|
|
|
55
|
if ($data =~ m[^\#\!\ \/bin\/perl]) { |
677
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
678
|
|
|
|
|
|
|
} |
679
|
30
|
50
|
|
|
|
69
|
if ($data =~ m[^eval\ \"exec\ \/bin\/perl]) { |
680
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
681
|
|
|
|
|
|
|
} |
682
|
30
|
100
|
|
|
|
64
|
if ($data =~ m[^\#\!\/usr\/bin\/perl]) { |
683
|
3
|
|
|
|
|
22
|
return q{application/x-perl}; |
684
|
|
|
|
|
|
|
} |
685
|
27
|
50
|
|
|
|
53
|
if ($data =~ m[^\#\!\ \/usr\/bin\/perl]) { |
686
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
687
|
|
|
|
|
|
|
} |
688
|
27
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\ \/usr\/bin\/perl]) { |
689
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
690
|
|
|
|
|
|
|
} |
691
|
27
|
50
|
|
|
|
46
|
if ($data =~ m[^eval\ \"exec\ \/usr\/bin\/perl]) { |
692
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
693
|
|
|
|
|
|
|
} |
694
|
27
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/perl]) { |
695
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
696
|
|
|
|
|
|
|
} |
697
|
27
|
50
|
|
|
|
55
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/perl]) { |
698
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
699
|
|
|
|
|
|
|
} |
700
|
27
|
50
|
|
|
|
46
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/perl]) { |
701
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
702
|
|
|
|
|
|
|
} |
703
|
27
|
50
|
|
|
|
45
|
if ($data =~ m[^eval\ \"exec\ \/usr\/local\/bin\/perl]) { |
704
|
0
|
|
|
|
|
0
|
return q{application/x-perl}; |
705
|
|
|
|
|
|
|
} |
706
|
27
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\/bin\/rc]) { |
707
|
0
|
|
|
|
|
0
|
return q{text/script}; |
708
|
|
|
|
|
|
|
} |
709
|
27
|
50
|
|
|
|
42
|
if ($data =~ m[^\#\!\ \/bin\/rc]) { |
710
|
0
|
|
|
|
|
0
|
return q{text/script}; |
711
|
|
|
|
|
|
|
} |
712
|
27
|
50
|
|
|
|
46
|
if ($data =~ m[^\#\!\ \/bin\/rc]) { |
713
|
0
|
|
|
|
|
0
|
return q{text/script}; |
714
|
|
|
|
|
|
|
} |
715
|
27
|
50
|
|
|
|
47
|
if ($data =~ m[^\#\!\/bin\/bash]) { |
716
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
717
|
|
|
|
|
|
|
} |
718
|
27
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\ \/bin\/bash]) { |
719
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
720
|
|
|
|
|
|
|
} |
721
|
27
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\ \/bin\/bash]) { |
722
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
723
|
|
|
|
|
|
|
} |
724
|
27
|
50
|
|
|
|
49
|
if ($data =~ m[^\#\!\/usr\/local\/bin\/bash]) { |
725
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
726
|
|
|
|
|
|
|
} |
727
|
27
|
50
|
|
|
|
46
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/bash]) { |
728
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
729
|
|
|
|
|
|
|
} |
730
|
27
|
50
|
|
|
|
42
|
if ($data =~ m[^\#\!\ \/usr\/local\/bin\/bash]) { |
731
|
0
|
|
|
|
|
0
|
return q{application/x-sh}; |
732
|
|
|
|
|
|
|
} |
733
|
27
|
50
|
|
|
|
51
|
if ($data =~ m[^\#\!\ \/]) { |
734
|
0
|
|
|
|
|
0
|
return q{text/script}; |
735
|
|
|
|
|
|
|
} |
736
|
27
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\ \/]) { |
737
|
0
|
|
|
|
|
0
|
return q{text/script}; |
738
|
|
|
|
|
|
|
} |
739
|
27
|
50
|
|
|
|
48
|
if ($data =~ m[^\#\!\/]) { |
740
|
0
|
|
|
|
|
0
|
return q{text/script}; |
741
|
|
|
|
|
|
|
} |
742
|
27
|
50
|
|
|
|
46
|
if ($data =~ m[^\#\!\ ]) { |
743
|
0
|
|
|
|
|
0
|
return q{text/script}; |
744
|
|
|
|
|
|
|
} |
745
|
27
|
50
|
|
|
|
59
|
if ($data =~ m[^\037\235]) { |
746
|
0
|
|
|
|
|
0
|
return q{application/compress}; |
747
|
|
|
|
|
|
|
} |
748
|
27
|
100
|
|
|
|
57
|
if ($data =~ m[^\037\213]) { |
749
|
3
|
|
|
|
|
22
|
return q{application/x-gzip}; |
750
|
|
|
|
|
|
|
} |
751
|
24
|
50
|
|
|
|
51
|
if ($data =~ m[^\037\036]) { |
752
|
0
|
|
|
|
|
0
|
return q{application/data}; |
753
|
|
|
|
|
|
|
} |
754
|
24
|
50
|
|
|
|
43
|
if ($data =~ m[^\377\037]) { |
755
|
0
|
|
|
|
|
0
|
return q{application/data}; |
756
|
|
|
|
|
|
|
} |
757
|
24
|
100
|
|
|
|
47
|
if ($data =~ m[^BZh]) { |
758
|
3
|
|
|
|
|
20
|
return q{application/x-bzip2}; |
759
|
|
|
|
|
|
|
} |
760
|
21
|
50
|
|
|
|
37
|
if ($data =~ m[^\037\237]) { |
761
|
0
|
|
|
|
|
0
|
return q{application/data}; |
762
|
|
|
|
|
|
|
} |
763
|
21
|
50
|
|
|
|
45
|
if ($data =~ m[^\037\236]) { |
764
|
0
|
|
|
|
|
0
|
return q{application/data}; |
765
|
|
|
|
|
|
|
} |
766
|
21
|
50
|
|
|
|
35
|
if ($data =~ m[^\037\240]) { |
767
|
0
|
|
|
|
|
0
|
return q{application/data}; |
768
|
|
|
|
|
|
|
} |
769
|
21
|
50
|
|
|
|
44
|
if ($data =~ m[^BZ]) { |
770
|
0
|
|
|
|
|
0
|
return q{application/x-bzip}; |
771
|
|
|
|
|
|
|
} |
772
|
21
|
50
|
|
|
|
38
|
if ($data =~ m[^\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a]) { |
773
|
0
|
|
|
|
|
0
|
return q{application/data}; |
774
|
|
|
|
|
|
|
} |
775
|
21
|
50
|
|
|
|
40
|
if (length $data > 0) { |
776
|
21
|
|
|
|
|
27
|
$substr = substr($data, 0, 4); |
777
|
21
|
50
|
|
|
|
41
|
if (pack('H*', '011257') eq $substr ) { |
778
|
0
|
|
|
|
|
0
|
return q{application/core}; |
779
|
|
|
|
|
|
|
} |
780
|
|
|
|
|
|
|
} |
781
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
782
|
21
|
|
|
|
|
24
|
$substr = substr($data, 0, 4); |
783
|
21
|
50
|
|
|
|
38
|
if (pack('H*', '13579ace') eq $substr ) { |
784
|
0
|
|
|
|
|
0
|
return q{application/x-gdbm}; |
785
|
|
|
|
|
|
|
} |
786
|
|
|
|
|
|
|
} |
787
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^GDBM]) { |
788
|
0
|
|
|
|
|
0
|
return q{application/x-gdbm}; |
789
|
|
|
|
|
|
|
} |
790
|
21
|
50
|
|
|
|
39
|
if (length $data > 0) { |
791
|
21
|
|
|
|
|
19
|
$substr = substr($data, 0, 4); |
792
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '061561') eq $substr ) { |
793
|
0
|
|
|
|
|
0
|
return q{application/x-db}; |
794
|
|
|
|
|
|
|
} |
795
|
|
|
|
|
|
|
} |
796
|
21
|
50
|
|
|
|
38
|
if (length $data > 0) { |
797
|
21
|
|
|
|
|
26
|
$substr = substr($data, 0, 4); |
798
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '053162') eq $substr ) { |
799
|
0
|
|
|
|
|
0
|
return q{application/x-db}; |
800
|
|
|
|
|
|
|
} |
801
|
|
|
|
|
|
|
} |
802
|
21
|
50
|
|
|
|
41
|
if ($data =~ m[^\=\\n\
|
803
|
0
|
|
|
|
|
0
|
return q{application/data}; |
804
|
|
|
|
|
|
|
} |
805
|
21
|
50
|
|
|
|
39
|
if ($data =~ m[^diff\ ]) { |
806
|
0
|
|
|
|
|
0
|
return q{text/x-patch}; |
807
|
|
|
|
|
|
|
} |
808
|
21
|
50
|
|
|
|
39
|
if ($data =~ m[^\*\*\*\ ]) { |
809
|
0
|
|
|
|
|
0
|
return q{text/x-patch}; |
810
|
|
|
|
|
|
|
} |
811
|
21
|
50
|
|
|
|
37
|
if ($data =~ m[^Only\ in\ ]) { |
812
|
0
|
|
|
|
|
0
|
return q{text/x-patch}; |
813
|
|
|
|
|
|
|
} |
814
|
21
|
50
|
|
|
|
34
|
if ($data =~ m[^Common\ subdirectories\:\ ]) { |
815
|
0
|
|
|
|
|
0
|
return q{text/x-patch}; |
816
|
|
|
|
|
|
|
} |
817
|
21
|
50
|
|
|
|
33
|
if ($data =~ m[^\!\\n________64E]) { |
818
|
0
|
|
|
|
|
0
|
return q{application/data}; |
819
|
|
|
|
|
|
|
} |
820
|
21
|
50
|
|
|
|
35
|
if ($data =~ m[^\377\377\177]) { |
821
|
0
|
|
|
|
|
0
|
return q{application/data}; |
822
|
|
|
|
|
|
|
} |
823
|
21
|
50
|
|
|
|
44
|
if ($data =~ m[^\377\377\174]) { |
824
|
0
|
|
|
|
|
0
|
return q{application/data}; |
825
|
|
|
|
|
|
|
} |
826
|
21
|
50
|
|
|
|
29
|
if ($data =~ m[^\377\377\176]) { |
827
|
0
|
|
|
|
|
0
|
return q{application/data}; |
828
|
|
|
|
|
|
|
} |
829
|
21
|
50
|
|
|
|
39
|
if ($data =~ m[^\033c\033]) { |
830
|
0
|
|
|
|
|
0
|
return q{application/data}; |
831
|
|
|
|
|
|
|
} |
832
|
21
|
50
|
|
|
|
37
|
if ($data =~ m[^\!\\!\n]) { |
833
|
0
|
|
|
|
|
0
|
return q{application/x-prof}; |
834
|
|
|
|
|
|
|
} |
835
|
21
|
50
|
|
|
|
35
|
if ($data =~ m[^\177ELF]) { |
836
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
837
|
|
|
|
|
|
|
} |
838
|
21
|
50
|
|
|
|
44
|
if ($data =~ m[^\366\366\366\366]) { |
839
|
0
|
|
|
|
|
0
|
return q{application/x-pc-floppy}; |
840
|
|
|
|
|
|
|
} |
841
|
21
|
100
|
|
|
|
46
|
if (length $data > 0774) { |
842
|
15
|
|
|
|
|
20
|
$substr = substr($data, 0774, 2); |
843
|
15
|
50
|
|
|
|
30
|
if (pack('H*', 'dabe') eq $substr ) { |
844
|
0
|
|
|
|
|
0
|
return q{application/data}; |
845
|
|
|
|
|
|
|
} |
846
|
|
|
|
|
|
|
} |
847
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^\-rom1fs\-\0]) { |
848
|
0
|
|
|
|
|
0
|
return q{application/x-filesystem}; |
849
|
|
|
|
|
|
|
} |
850
|
21
|
100
|
|
|
|
37
|
if (length $data > 0x18b) { |
851
|
15
|
|
|
|
|
22
|
$substr = substr($data, 0x18b, 1024); |
852
|
15
|
50
|
33
|
|
|
65
|
if (defined $substr && $substr =~ m[^OS\/2]) { |
853
|
0
|
|
|
|
|
0
|
return q{application/x-bootable}; |
854
|
|
|
|
|
|
|
} |
855
|
|
|
|
|
|
|
} |
856
|
21
|
50
|
|
|
|
36
|
if ($data =~ m[^FONT]) { |
857
|
0
|
|
|
|
|
0
|
return q{font/x-vfont}; |
858
|
|
|
|
|
|
|
} |
859
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^\%\!PS\-AdobeFont\-1\.0]) { |
860
|
0
|
|
|
|
|
0
|
return q{font/type1}; |
861
|
|
|
|
|
|
|
} |
862
|
21
|
50
|
|
|
|
39
|
if (length $data > 6) { |
863
|
21
|
|
|
|
|
36
|
$substr = substr($data, 6, 1024); |
864
|
21
|
50
|
33
|
|
|
93
|
if (defined $substr && $substr =~ m[^\%\!PS\-AdobeFont\-1\.0]) { |
865
|
0
|
|
|
|
|
0
|
return q{font/type1}; |
866
|
|
|
|
|
|
|
} |
867
|
|
|
|
|
|
|
} |
868
|
21
|
50
|
|
|
|
43
|
if ($data =~ m[^STARTFONT\040]) { |
869
|
0
|
|
|
|
|
0
|
return q{font/x-bdf}; |
870
|
|
|
|
|
|
|
} |
871
|
21
|
50
|
|
|
|
33
|
if ($data =~ m[^\001fcp]) { |
872
|
0
|
|
|
|
|
0
|
return q{font/x-pcf}; |
873
|
|
|
|
|
|
|
} |
874
|
21
|
50
|
|
|
|
36
|
if ($data =~ m[^D1\.0\015]) { |
875
|
0
|
|
|
|
|
0
|
return q{font/x-speedo}; |
876
|
|
|
|
|
|
|
} |
877
|
21
|
50
|
|
|
|
34
|
if ($data =~ m[^flf]) { |
878
|
0
|
|
|
|
|
0
|
return q{font/x-figlet}; |
879
|
|
|
|
|
|
|
} |
880
|
21
|
50
|
|
|
|
39
|
if ($data =~ m[^flc]) { |
881
|
0
|
|
|
|
|
0
|
return q{application/x-font}; |
882
|
|
|
|
|
|
|
} |
883
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
884
|
21
|
|
|
|
|
25
|
$substr = substr($data, 0, 4); |
885
|
21
|
50
|
|
|
|
41
|
if (pack('H*', '14025919') eq $substr ) { |
886
|
0
|
|
|
|
|
0
|
return q{font/x-libgrx}; |
887
|
|
|
|
|
|
|
} |
888
|
|
|
|
|
|
|
} |
889
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
890
|
21
|
|
|
|
|
24
|
$substr = substr($data, 0, 4); |
891
|
21
|
50
|
|
|
|
38
|
if (pack('H*', 'ff464f4e') eq $substr ) { |
892
|
0
|
|
|
|
|
0
|
return q{font/x-dos}; |
893
|
|
|
|
|
|
|
} |
894
|
|
|
|
|
|
|
} |
895
|
21
|
50
|
|
|
|
42
|
if (length $data > 7) { |
896
|
21
|
|
|
|
|
31
|
$substr = substr($data, 7, 4); |
897
|
21
|
50
|
|
|
|
34
|
if (pack('H*', '00454741') eq $substr ) { |
898
|
0
|
|
|
|
|
0
|
return q{font/x-dos}; |
899
|
|
|
|
|
|
|
} |
900
|
|
|
|
|
|
|
} |
901
|
21
|
50
|
|
|
|
35
|
if (length $data > 7) { |
902
|
21
|
|
|
|
|
29
|
$substr = substr($data, 7, 4); |
903
|
21
|
50
|
|
|
|
37
|
if (pack('H*', '00564944') eq $substr ) { |
904
|
0
|
|
|
|
|
0
|
return q{font/x-dos}; |
905
|
|
|
|
|
|
|
} |
906
|
|
|
|
|
|
|
} |
907
|
21
|
100
|
|
|
|
40
|
if (length $data > 4098) { |
908
|
6
|
|
|
|
|
16
|
$substr = substr($data, 4098, 1024); |
909
|
6
|
50
|
33
|
|
|
38
|
if (defined $substr && $substr =~ m[^DOSFONT]) { |
910
|
0
|
|
|
|
|
0
|
return q{font/x-dos}; |
911
|
|
|
|
|
|
|
} |
912
|
|
|
|
|
|
|
} |
913
|
21
|
50
|
|
|
|
44
|
if ($data =~ m[^\
|
914
|
0
|
|
|
|
|
0
|
return q{application/x-framemaker}; |
915
|
|
|
|
|
|
|
} |
916
|
21
|
50
|
|
|
|
36
|
if ($data =~ m[^\
|
917
|
0
|
|
|
|
|
0
|
return q{application/x-framemaker}; |
918
|
|
|
|
|
|
|
} |
919
|
21
|
50
|
|
|
|
38
|
if ($data =~ m[^\
|
920
|
0
|
|
|
|
|
0
|
return q{application/x-framemaker}; |
921
|
|
|
|
|
|
|
} |
922
|
21
|
50
|
|
|
|
34
|
if ($data =~ m[^\
|
923
|
0
|
|
|
|
|
0
|
return q{font/x-framemaker}; |
924
|
|
|
|
|
|
|
} |
925
|
21
|
50
|
|
|
|
45
|
if ($data =~ m[^\
|
926
|
0
|
|
|
|
|
0
|
return q{application/x-framemaker}; |
927
|
|
|
|
|
|
|
} |
928
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^\
|
929
|
0
|
|
|
|
|
0
|
return q{application/x-framemaker}; |
930
|
|
|
|
|
|
|
} |
931
|
21
|
50
|
|
|
|
35
|
if ($data =~ m[^\
|
932
|
0
|
|
|
|
|
0
|
return q{application/x-framemaker}; |
933
|
|
|
|
|
|
|
} |
934
|
21
|
50
|
|
|
|
35
|
if (length $data > 7) { |
935
|
21
|
|
|
|
|
34
|
$substr = substr($data, 7, 1024); |
936
|
21
|
50
|
33
|
|
|
90
|
if (defined $substr && $substr =~ m[^\357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0]) { |
937
|
0
|
|
|
|
|
0
|
return q{application/core}; |
938
|
|
|
|
|
|
|
} |
939
|
|
|
|
|
|
|
} |
940
|
21
|
50
|
|
|
|
49
|
if ($data =~ m[^GIMP\ Gradient]) { |
941
|
0
|
|
|
|
|
0
|
return q{application/x-gimp-gradient}; |
942
|
|
|
|
|
|
|
} |
943
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^gimp\ xcf]) { |
944
|
0
|
|
|
|
|
0
|
return q{application/x-gimp-image}; |
945
|
|
|
|
|
|
|
} |
946
|
21
|
50
|
|
|
|
35
|
if (length $data > 20) { |
947
|
21
|
|
|
|
|
34
|
$substr = substr($data, 20, 1024); |
948
|
21
|
50
|
33
|
|
|
77
|
if (defined $substr && $substr =~ m[^GPAT]) { |
949
|
0
|
|
|
|
|
0
|
return q{application/x-gimp-pattern}; |
950
|
|
|
|
|
|
|
} |
951
|
|
|
|
|
|
|
} |
952
|
21
|
50
|
|
|
|
35
|
if (length $data > 20) { |
953
|
21
|
|
|
|
|
30
|
$substr = substr($data, 20, 1024); |
954
|
21
|
50
|
33
|
|
|
91
|
if (defined $substr && $substr =~ m[^GIMP]) { |
955
|
0
|
|
|
|
|
0
|
return q{application/x-gimp-brush}; |
956
|
|
|
|
|
|
|
} |
957
|
|
|
|
|
|
|
} |
958
|
21
|
50
|
|
|
|
53
|
if ($data =~ m[^\336\224\225]) { |
959
|
0
|
|
|
|
|
0
|
return q{application/x-locale}; |
960
|
|
|
|
|
|
|
} |
961
|
21
|
50
|
|
|
|
39
|
if ($data =~ m[^\2254\22\336]) { |
962
|
0
|
|
|
|
|
0
|
return q{application/x-locale}; |
963
|
|
|
|
|
|
|
} |
964
|
21
|
50
|
|
|
|
38
|
if ($data =~ m[^\000\001\000\000\000]) { |
965
|
0
|
|
|
|
|
0
|
return q{font/ttf}; |
966
|
|
|
|
|
|
|
} |
967
|
21
|
50
|
|
|
|
30
|
if (length $data > 0) { |
968
|
21
|
|
|
|
|
25
|
$substr = substr($data, 0, 4); |
969
|
21
|
50
|
|
|
|
38
|
if (pack('H*', '02100106') eq $substr ) { |
970
|
0
|
|
|
|
|
0
|
return q{application/x-object-file}; |
971
|
|
|
|
|
|
|
} |
972
|
|
|
|
|
|
|
} |
973
|
21
|
50
|
|
|
|
38
|
if (length $data > 0) { |
974
|
21
|
|
|
|
|
24
|
$substr = substr($data, 0, 4); |
975
|
21
|
50
|
|
|
|
39
|
if (pack('H*', '02100107') eq $substr ) { |
976
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
977
|
|
|
|
|
|
|
} |
978
|
|
|
|
|
|
|
} |
979
|
21
|
50
|
|
|
|
39
|
if (length $data > 0) { |
980
|
21
|
|
|
|
|
17
|
$substr = substr($data, 0, 4); |
981
|
21
|
50
|
|
|
|
37
|
if (pack('H*', '02100108') eq $substr ) { |
982
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
983
|
|
|
|
|
|
|
} |
984
|
|
|
|
|
|
|
} |
985
|
21
|
50
|
|
|
|
32
|
if (length $data > 0) { |
986
|
21
|
|
|
|
|
24
|
$substr = substr($data, 0, 4); |
987
|
21
|
50
|
|
|
|
40
|
if (pack('H*', '0210010b') eq $substr ) { |
988
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
989
|
|
|
|
|
|
|
} |
990
|
|
|
|
|
|
|
} |
991
|
21
|
50
|
|
|
|
37
|
if (length $data > 0) { |
992
|
21
|
|
|
|
|
26
|
$substr = substr($data, 0, 4); |
993
|
21
|
50
|
|
|
|
32
|
if (pack('H*', '0210010e') eq $substr ) { |
994
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
995
|
|
|
|
|
|
|
} |
996
|
|
|
|
|
|
|
} |
997
|
21
|
50
|
|
|
|
41
|
if (length $data > 0) { |
998
|
21
|
|
|
|
|
22
|
$substr = substr($data, 0, 4); |
999
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '0210010d') eq $substr ) { |
1000
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
1001
|
|
|
|
|
|
|
} |
1002
|
|
|
|
|
|
|
} |
1003
|
21
|
50
|
|
|
|
34
|
if (length $data > 0) { |
1004
|
21
|
|
|
|
|
688
|
$substr = substr($data, 0, 4); |
1005
|
21
|
50
|
|
|
|
39
|
if (pack('H*', '02140106') eq $substr ) { |
1006
|
0
|
|
|
|
|
0
|
return q{application/x-object-file}; |
1007
|
|
|
|
|
|
|
} |
1008
|
|
|
|
|
|
|
} |
1009
|
21
|
50
|
|
|
|
37
|
if (length $data > 0) { |
1010
|
21
|
|
|
|
|
20
|
$substr = substr($data, 0, 4); |
1011
|
21
|
50
|
|
|
|
32
|
if (pack('H*', '02140107') eq $substr ) { |
1012
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1013
|
|
|
|
|
|
|
} |
1014
|
|
|
|
|
|
|
} |
1015
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
1016
|
21
|
|
|
|
|
27
|
$substr = substr($data, 0, 4); |
1017
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '02140108') eq $substr ) { |
1018
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1019
|
|
|
|
|
|
|
} |
1020
|
|
|
|
|
|
|
} |
1021
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
1022
|
21
|
|
|
|
|
20
|
$substr = substr($data, 0, 4); |
1023
|
21
|
50
|
|
|
|
34
|
if (pack('H*', '0214010b') eq $substr ) { |
1024
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1025
|
|
|
|
|
|
|
} |
1026
|
|
|
|
|
|
|
} |
1027
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
1028
|
21
|
|
|
|
|
22
|
$substr = substr($data, 0, 4); |
1029
|
21
|
50
|
|
|
|
35
|
if (pack('H*', '0214010e') eq $substr ) { |
1030
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
1031
|
|
|
|
|
|
|
} |
1032
|
|
|
|
|
|
|
} |
1033
|
21
|
50
|
|
|
|
38
|
if (length $data > 0) { |
1034
|
21
|
|
|
|
|
24
|
$substr = substr($data, 0, 4); |
1035
|
21
|
50
|
|
|
|
40
|
if (pack('H*', '0214010d') eq $substr ) { |
1036
|
0
|
|
|
|
|
0
|
return q{application/x-object-file}; |
1037
|
|
|
|
|
|
|
} |
1038
|
|
|
|
|
|
|
} |
1039
|
21
|
50
|
|
|
|
33
|
if (length $data > 0) { |
1040
|
21
|
|
|
|
|
21
|
$substr = substr($data, 0, 4); |
1041
|
21
|
50
|
|
|
|
38
|
if (pack('H*', '020b0106') eq $substr ) { |
1042
|
0
|
|
|
|
|
0
|
return q{application/x-object-file}; |
1043
|
|
|
|
|
|
|
} |
1044
|
|
|
|
|
|
|
} |
1045
|
21
|
50
|
|
|
|
40
|
if (length $data > 0) { |
1046
|
21
|
|
|
|
|
24
|
$substr = substr($data, 0, 4); |
1047
|
21
|
50
|
|
|
|
37
|
if (pack('H*', '020b0107') eq $substr ) { |
1048
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1049
|
|
|
|
|
|
|
} |
1050
|
|
|
|
|
|
|
} |
1051
|
21
|
50
|
|
|
|
105
|
if (length $data > 0) { |
1052
|
21
|
|
|
|
|
26
|
$substr = substr($data, 0, 4); |
1053
|
21
|
50
|
|
|
|
104
|
if (pack('H*', '020b0108') eq $substr ) { |
1054
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1055
|
|
|
|
|
|
|
} |
1056
|
|
|
|
|
|
|
} |
1057
|
21
|
50
|
|
|
|
38
|
if (length $data > 0) { |
1058
|
21
|
|
|
|
|
27
|
$substr = substr($data, 0, 4); |
1059
|
21
|
50
|
|
|
|
37
|
if (pack('H*', '020b010b') eq $substr ) { |
1060
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1061
|
|
|
|
|
|
|
} |
1062
|
|
|
|
|
|
|
} |
1063
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
1064
|
21
|
|
|
|
|
23
|
$substr = substr($data, 0, 4); |
1065
|
21
|
50
|
|
|
|
35
|
if (pack('H*', '020b010e') eq $substr ) { |
1066
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
1067
|
|
|
|
|
|
|
} |
1068
|
|
|
|
|
|
|
} |
1069
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
1070
|
21
|
|
|
|
|
21
|
$substr = substr($data, 0, 4); |
1071
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '020b010d') eq $substr ) { |
1072
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
1073
|
|
|
|
|
|
|
} |
1074
|
|
|
|
|
|
|
} |
1075
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
1076
|
21
|
|
|
|
|
20
|
$substr = substr($data, 0, 4); |
1077
|
21
|
50
|
|
|
|
39
|
if (pack('H*', '213c6172') eq $substr ) { |
1078
|
0
|
|
|
|
|
0
|
return q{application/x-ar}; |
1079
|
|
|
|
|
|
|
} |
1080
|
|
|
|
|
|
|
} |
1081
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
1082
|
21
|
|
|
|
|
20
|
$substr = substr($data, 0, 4); |
1083
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '020c0108') eq $substr ) { |
1084
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1085
|
|
|
|
|
|
|
} |
1086
|
|
|
|
|
|
|
} |
1087
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
1088
|
21
|
|
|
|
|
23
|
$substr = substr($data, 0, 4); |
1089
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '020c0107') eq $substr ) { |
1090
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1091
|
|
|
|
|
|
|
} |
1092
|
|
|
|
|
|
|
} |
1093
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
1094
|
21
|
|
|
|
|
22
|
$substr = substr($data, 0, 4); |
1095
|
21
|
50
|
|
|
|
34
|
if (pack('H*', '020c010b') eq $substr ) { |
1096
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1097
|
|
|
|
|
|
|
} |
1098
|
|
|
|
|
|
|
} |
1099
|
21
|
50
|
|
|
|
39
|
if (length $data > 0) { |
1100
|
21
|
|
|
|
|
21
|
$substr = substr($data, 0, 4); |
1101
|
21
|
50
|
|
|
|
38
|
if (pack('H*', '020c0106') eq $substr ) { |
1102
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1103
|
|
|
|
|
|
|
} |
1104
|
|
|
|
|
|
|
} |
1105
|
21
|
50
|
|
|
|
49
|
if (length $data > 0) { |
1106
|
21
|
|
|
|
|
21
|
$substr = substr($data, 0, 4); |
1107
|
21
|
50
|
|
|
|
37
|
if (pack('H*', '020a0108') eq $substr ) { |
1108
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1109
|
|
|
|
|
|
|
} |
1110
|
|
|
|
|
|
|
} |
1111
|
21
|
50
|
|
|
|
190
|
if (length $data > 0) { |
1112
|
21
|
|
|
|
|
22
|
$substr = substr($data, 0, 4); |
1113
|
21
|
50
|
|
|
|
44
|
if (pack('H*', '020a0107') eq $substr ) { |
1114
|
0
|
|
|
|
|
0
|
return q{application/x-executable-file}; |
1115
|
|
|
|
|
|
|
} |
1116
|
|
|
|
|
|
|
} |
1117
|
21
|
50
|
|
|
|
38
|
if (length $data > 0) { |
1118
|
21
|
|
|
|
|
23
|
$substr = substr($data, 0, 4); |
1119
|
21
|
50
|
|
|
|
34
|
if (pack('H*', '020c010e') eq $substr ) { |
1120
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
1121
|
|
|
|
|
|
|
} |
1122
|
|
|
|
|
|
|
} |
1123
|
21
|
50
|
|
|
|
34
|
if (length $data > 0) { |
1124
|
21
|
|
|
|
|
22
|
$substr = substr($data, 0, 4); |
1125
|
21
|
50
|
|
|
|
39
|
if (pack('H*', '020c010d') eq $substr ) { |
1126
|
0
|
|
|
|
|
0
|
return q{application/x-library-file}; |
1127
|
|
|
|
|
|
|
} |
1128
|
|
|
|
|
|
|
} |
1129
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^Bitmapfile]) { |
1130
|
0
|
|
|
|
|
0
|
return q{image/unknown}; |
1131
|
|
|
|
|
|
|
} |
1132
|
21
|
50
|
|
|
|
34
|
if ($data =~ m[^IMGfile]) { |
1133
|
0
|
|
|
|
|
0
|
return q{CIS image/unknown}; |
1134
|
|
|
|
|
|
|
} |
1135
|
21
|
50
|
|
|
|
37
|
if ($data =~ m[^msgcat01]) { |
1136
|
0
|
|
|
|
|
0
|
return q{application/x-locale}; |
1137
|
|
|
|
|
|
|
} |
1138
|
21
|
50
|
|
|
|
33
|
if ($data =~ m[^HPHP48\-]) { |
1139
|
0
|
|
|
|
|
0
|
return q{application/unknown}; |
1140
|
|
|
|
|
|
|
} |
1141
|
21
|
50
|
|
|
|
34
|
if ($data =~ m[^\%\%HP\:]) { |
1142
|
0
|
|
|
|
|
0
|
return q{text/x-unknown}; |
1143
|
|
|
|
|
|
|
} |
1144
|
21
|
50
|
|
|
|
38
|
if (length $data > 0) { |
1145
|
21
|
|
|
|
|
25
|
$substr = substr($data, 0, 2); |
1146
|
21
|
50
|
|
|
|
34
|
if (pack('H*', '01df') eq $substr ) { |
1147
|
0
|
|
|
|
|
0
|
return q{application/executable}; |
1148
|
|
|
|
|
|
|
} |
1149
|
|
|
|
|
|
|
} |
1150
|
21
|
50
|
|
|
|
37
|
if (length $data > 0) { |
1151
|
21
|
|
|
|
|
19
|
$substr = substr($data, 0, 2); |
1152
|
21
|
50
|
|
|
|
46
|
if (pack('H*', '0104') eq $substr ) { |
1153
|
0
|
|
|
|
|
0
|
return q{application/x-shared-library}; |
1154
|
|
|
|
|
|
|
} |
1155
|
|
|
|
|
|
|
} |
1156
|
21
|
50
|
|
|
|
36
|
if (length $data > 0) { |
1157
|
21
|
|
|
|
|
23
|
$substr = substr($data, 0, 2); |
1158
|
21
|
50
|
|
|
|
36
|
if (pack('H*', '0105') eq $substr ) { |
1159
|
0
|
|
|
|
|
0
|
return q{application/data}; |
1160
|
|
|
|
|
|
|
} |
1161
|
|
|
|
|
|
|
} |
1162
|
21
|
50
|
|
|
|
34
|
if (length $data > 0) { |
1163
|
21
|
|
|
|
|
25
|
$substr = substr($data, 0, 2); |
1164
|
21
|
50
|
|
|
|
35
|
if (pack('H*', 'fe04') eq $substr ) { |
1165
|
0
|
|
|
|
|
0
|
return q{application/data}; |
1166
|
|
|
|
|
|
|
} |
1167
|
|
|
|
|
|
|
} |
1168
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^0xabcdef]) { |
1169
|
0
|
|
|
|
|
0
|
return q{application/data}; |
1170
|
|
|
|
|
|
|
} |
1171
|
21
|
50
|
|
|
|
35
|
if (length $data > 0) { |
1172
|
21
|
|
|
|
|
23
|
$substr = substr($data, 0, 4); |
1173
|
21
|
50
|
|
|
|
41
|
if (pack('H*', '000001f9') eq $substr ) { |
1174
|
0
|
|
|
|
|
0
|
return q{application/data}; |
1175
|
|
|
|
|
|
|
} |
1176
|
|
|
|
|
|
|
} |
1177
|
21
|
50
|
|
|
|
37
|
if ($data =~ m[^\]) { |
1178
|
0
|
|
|
|
|
0
|
return q{application/x-archive}; |
1179
|
|
|
|
|
|
|
} |
1180
|
21
|
50
|
|
|
|
40
|
if ($data =~ m[^FORM]) { |
1181
|
0
|
|
|
|
|
0
|
return q{application/data}; |
1182
|
|
|
|
|
|
|
} |
1183
|
21
|
50
|
|
|
|
39
|
if ($data =~ m[^P1]) { |
1184
|
0
|
|
|
|
|
0
|
return q{image/x-portable-bitmap}; |
1185
|
|
|
|
|
|
|
} |
1186
|
21
|
50
|
|
|
|
37
|
if ($data =~ m[^P2]) { |
1187
|
0
|
|
|
|
|
0
|
return q{image/x-portable-graymap}; |
1188
|
|
|
|
|
|
|
} |
1189
|
21
|
50
|
|
|
|
32
|
if ($data =~ m[^P3]) { |
1190
|
0
|
|
|
|
|
0
|
return q{image/x-portable-pixmap}; |
1191
|
|
|
|
|
|
|
} |
1192
|
21
|
50
|
|
|
|
36
|
if ($data =~ m[^P4]) { |
1193
|
0
|
|
|
|
|
0
|
return q{image/x-portable-bitmap}; |
1194
|
|
|
|
|
|
|
} |
1195
|
21
|
50
|
|
|
|
41
|
if ($data =~ m[^P5]) { |
1196
|
0
|
|
|
|
|
0
|
return q{image/x-portable-graymap}; |
1197
|
|
|
|
|
|
|
} |
1198
|
21
|
50
|
|
|
|
43
|
if ($data =~ m[^P6]) { |
1199
|
0
|
|
|
|
|
0
|
return q{image/x-portable-pixmap}; |
1200
|
|
|
|
|
|
|
} |
1201
|
21
|
50
|
|
|
|
35
|
if ($data =~ m[^IIN1]) { |
1202
|
0
|
|
|
|
|
0
|
return q{image/tiff}; |
1203
|
|
|
|
|
|
|
} |
1204
|
21
|
50
|
|
|
|
34
|
if ($data =~ m[^MM\x00\x2a]) { |
1205
|
0
|
|
|
|
|
0
|
return q{image/tiff}; |
1206
|
|
|
|
|
|
|
} |
1207
|
21
|
100
|
|
|
|
48
|
if ($data =~ m[^II\x2a\x00]) { |
1208
|
3
|
|
|
|
|
24
|
return q{image/tiff}; |
1209
|
|
|
|
|
|
|
} |
1210
|
18
|
100
|
|
|
|
34
|
if ($data =~ m[^\x89PNG]) { |
1211
|
3
|
|
|
|
|
21
|
return q{image/x-png}; |
1212
|
|
|
|
|
|
|
} |
1213
|
15
|
50
|
|
|
|
35
|
if (length $data > 1) { |
1214
|
15
|
|
|
|
|
21
|
$substr = substr($data, 1, 1024); |
1215
|
15
|
50
|
33
|
|
|
69
|
if (defined $substr && $substr =~ m[^PNG]) { |
1216
|
0
|
|
|
|
|
0
|
return q{image/x-png}; |
1217
|
|
|
|
|
|
|
} |
1218
|
|
|
|
|
|
|
} |
1219
|
15
|
100
|
|
|
|
34
|
if ($data =~ m[^GIF8]) { |
1220
|
3
|
|
|
|
|
24
|
return q{image/gif}; |
1221
|
|
|
|
|
|
|
} |
1222
|
12
|
50
|
|
|
|
20
|
if ($data =~ m[^\361\0\100\273]) { |
1223
|
0
|
|
|
|
|
0
|
return q{image/x-cmu-raster}; |
1224
|
|
|
|
|
|
|
} |
1225
|
12
|
50
|
|
|
|
20
|
if (length $data > 0) { |
1226
|
12
|
|
|
|
|
14
|
$substr = substr($data, 0, 2); |
1227
|
12
|
100
|
|
|
|
28
|
if (pack('H*', 'ffd8') eq $substr ) { |
1228
|
3
|
|
|
|
|
25
|
return q{image/jpeg}; |
1229
|
|
|
|
|
|
|
} |
1230
|
|
|
|
|
|
|
} |
1231
|
9
|
50
|
|
|
|
20
|
if ($data =~ m[^hsi1]) { |
1232
|
0
|
|
|
|
|
0
|
return q{image/x-jpeg-proprietary}; |
1233
|
|
|
|
|
|
|
} |
1234
|
9
|
100
|
|
|
|
25
|
if ($data =~ m[^BM]) { |
1235
|
3
|
|
|
|
|
20
|
return q{image/x-bmp}; |
1236
|
|
|
|
|
|
|
} |
1237
|
6
|
50
|
|
|
|
14
|
if ($data =~ m[^IC]) { |
1238
|
0
|
|
|
|
|
0
|
return q{image/x-ico}; |
1239
|
|
|
|
|
|
|
} |
1240
|
6
|
50
|
|
|
|
12
|
if (length $data > 0) { |
1241
|
6
|
|
|
|
|
6
|
$substr = substr($data, 0, 4); |
1242
|
6
|
50
|
|
|
|
11
|
if (pack('H*', '59a66a95') eq $substr ) { |
1243
|
0
|
|
|
|
|
0
|
return q{x/x-image-sun-raster}; |
1244
|
|
|
|
|
|
|
} |
1245
|
|
|
|
|
|
|
} |
1246
|
6
|
100
|
|
|
|
18
|
if (length $data > 2048) { |
1247
|
3
|
|
|
|
|
5
|
$substr = substr($data, 2048, 1024); |
1248
|
3
|
50
|
33
|
|
|
21
|
if (defined $substr && $substr =~ m[^PCD_IPI]) { |
1249
|
0
|
|
|
|
|
0
|
return q{x/x-photo-cd-pack-file}; |
1250
|
|
|
|
|
|
|
} |
1251
|
|
|
|
|
|
|
} |
1252
|
6
|
50
|
|
|
|
20
|
if ($data =~ m[^PCD_OPA]) { |
1253
|
0
|
|
|
|
|
0
|
return q{x/x-photo-cd-overfiew-file}; |
1254
|
|
|
|
|
|
|
} |
1255
|
6
|
50
|
|
|
|
17
|
if ($data =~ m[^\007\001\000]) { |
1256
|
0
|
|
|
|
|
0
|
return q{Linux/i386 object file}; |
1257
|
|
|
|
|
|
|
} |
1258
|
6
|
50
|
|
|
|
18
|
if (length $data > 4086) { |
1259
|
0
|
|
|
|
|
0
|
$substr = substr($data, 4086, 1024); |
1260
|
0
|
0
|
0
|
|
|
0
|
if (defined $substr && $substr =~ m[^SWAP\-SPACE]) { |
1261
|
0
|
|
|
|
|
0
|
return q{Linux/i386 swap file}; |
1262
|
|
|
|
|
|
|
} |
1263
|
|
|
|
|
|
|
} |
1264
|
6
|
50
|
|
|
|
18
|
if ($data =~ m[^\;\;]) { |
1265
|
0
|
|
|
|
|
0
|
return q{Lisp/Scheme program text}; |
1266
|
|
|
|
|
|
|
} |
1267
|
6
|
50
|
|
|
|
14
|
if ($data =~ m[^FFIL]) { |
1268
|
0
|
|
|
|
|
0
|
return q{font/ttf}; |
1269
|
|
|
|
|
|
|
} |
1270
|
6
|
50
|
|
|
|
14
|
if (length $data > 65) { |
1271
|
6
|
|
|
|
|
9
|
$substr = substr($data, 65, 1024); |
1272
|
6
|
50
|
33
|
|
|
32
|
if (defined $substr && $substr =~ m[^FFIL]) { |
1273
|
0
|
|
|
|
|
0
|
return q{font/ttf}; |
1274
|
|
|
|
|
|
|
} |
1275
|
|
|
|
|
|
|
} |
1276
|
6
|
50
|
|
|
|
13
|
if ($data =~ m[^LWFN]) { |
1277
|
0
|
|
|
|
|
0
|
return q{font/type1}; |
1278
|
|
|
|
|
|
|
} |
1279
|
6
|
50
|
|
|
|
13
|
if (length $data > 65) { |
1280
|
6
|
|
|
|
|
17
|
$substr = substr($data, 65, 1024); |
1281
|
6
|
50
|
33
|
|
|
36
|
if (defined $substr && $substr =~ m[^LWFN]) { |
1282
|
0
|
|
|
|
|
0
|
return q{font/type1}; |
1283
|
|
|
|
|
|
|
} |
1284
|
|
|
|
|
|
|
} |
1285
|
6
|
50
|
|
|
|
14
|
if ($data =~ m[^Return\-Path\:]) { |
1286
|
0
|
|
|
|
|
0
|
return q{message/rfc822}; |
1287
|
|
|
|
|
|
|
} |
1288
|
6
|
50
|
|
|
|
15
|
if ($data =~ m[^Path\:]) { |
1289
|
0
|
|
|
|
|
0
|
return q{message/news}; |
1290
|
|
|
|
|
|
|
} |
1291
|
6
|
50
|
|
|
|
16
|
if ($data =~ m[^Xref\:]) { |
1292
|
0
|
|
|
|
|
0
|
return q{message/news}; |
1293
|
|
|
|
|
|
|
} |
1294
|
6
|
50
|
|
|
|
14
|
if ($data =~ m[^From\:]) { |
1295
|
0
|
|
|
|
|
0
|
return q{message/rfc822}; |
1296
|
|
|
|
|
|
|
} |
1297
|
6
|
50
|
|
|
|
15
|
if ($data =~ m[^Article]) { |
1298
|
0
|
|
|
|
|
0
|
return q{message/news}; |
1299
|
|
|
|
|
|
|
} |
1300
|
6
|
50
|
|
|
|
14
|
if ($data =~ m[^BABYL]) { |
1301
|
0
|
|
|
|
|
0
|
return q{message/x-gnu-rmail}; |
1302
|
|
|
|
|
|
|
} |
1303
|
6
|
50
|
|
|
|
13
|
if ($data =~ m[^Received\:]) { |
1304
|
0
|
|
|
|
|
0
|
return q{message/rfc822}; |
1305
|
|
|
|
|
|
|
} |
1306
|
6
|
50
|
|
|
|
22
|
if ($data =~ m[^MZ]) { |
1307
|
0
|
|
|
|
|
0
|
return q{application/x-ms-dos-executable}; |
1308
|
|
|
|
|
|
|
} |
1309
|
6
|
100
|
|
|
|
16
|
if (length $data > 2080) { |
1310
|
3
|
|
|
|
|
7
|
$substr = substr($data, 2080, 1024); |
1311
|
3
|
50
|
33
|
|
|
33
|
if (defined $substr && $substr =~ m[^Microsoft\ Word\ 6\.0\ Document]) { |
1312
|
0
|
|
|
|
|
0
|
return q{text/vnd.ms-word}; |
1313
|
|
|
|
|
|
|
} |
1314
|
|
|
|
|
|
|
} |
1315
|
6
|
100
|
|
|
|
13
|
if (length $data > 2080) { |
1316
|
3
|
|
|
|
|
7
|
$substr = substr($data, 2080, 1024); |
1317
|
3
|
50
|
33
|
|
|
17
|
if (defined $substr && $substr =~ m[^Documento\ Microsoft\ Word\ 6]) { |
1318
|
0
|
|
|
|
|
0
|
return q{text/vnd.ms-word}; |
1319
|
|
|
|
|
|
|
} |
1320
|
|
|
|
|
|
|
} |
1321
|
6
|
100
|
|
|
|
24
|
if (length $data > 2112) { |
1322
|
3
|
|
|
|
|
5
|
$substr = substr($data, 2112, 1024); |
1323
|
3
|
50
|
33
|
|
|
24
|
if (defined $substr && $substr =~ m[^MSWordDoc]) { |
1324
|
0
|
|
|
|
|
0
|
return q{text/vnd.ms-word}; |
1325
|
|
|
|
|
|
|
} |
1326
|
|
|
|
|
|
|
} |
1327
|
6
|
50
|
|
|
|
20
|
if (length $data > 0) { |
1328
|
6
|
|
|
|
|
14
|
$substr = substr($data, 0, 4); |
1329
|
6
|
50
|
|
|
|
16
|
if (pack('H*', '31be0000') eq $substr ) { |
1330
|
0
|
|
|
|
|
0
|
return q{text/vnd.ms-word}; |
1331
|
|
|
|
|
|
|
} |
1332
|
|
|
|
|
|
|
} |
1333
|
6
|
50
|
|
|
|
17
|
if ($data =~ m[^PO\^Q\`]) { |
1334
|
0
|
|
|
|
|
0
|
return q{text/vnd.ms-word}; |
1335
|
|
|
|
|
|
|
} |
1336
|
6
|
100
|
|
|
|
15
|
if (length $data > 2080) { |
1337
|
3
|
|
|
|
|
7
|
$substr = substr($data, 2080, 1024); |
1338
|
3
|
50
|
33
|
|
|
19
|
if (defined $substr && $substr =~ m[^Microsoft\ Excel\ 5\.0\ Worksheet]) { |
1339
|
0
|
|
|
|
|
0
|
return q{application/vnd.ms-excel}; |
1340
|
|
|
|
|
|
|
} |
1341
|
|
|
|
|
|
|
} |
1342
|
6
|
100
|
|
|
|
15
|
if (length $data > 2114) { |
1343
|
3
|
|
|
|
|
11
|
$substr = substr($data, 2114, 1024); |
1344
|
3
|
50
|
33
|
|
|
25
|
if (defined $substr && $substr =~ m[^Biff5]) { |
1345
|
0
|
|
|
|
|
0
|
return q{application/vnd.ms-excel}; |
1346
|
|
|
|
|
|
|
} |
1347
|
|
|
|
|
|
|
} |
1348
|
6
|
50
|
|
|
|
16
|
if ($data =~ m[^\x31\xbe\x00\x00]) { |
1349
|
0
|
|
|
|
|
0
|
return q{application/msword}; |
1350
|
|
|
|
|
|
|
} |
1351
|
6
|
50
|
|
|
|
14
|
if ($data =~ m[^PO\^Q\`]) { |
1352
|
0
|
|
|
|
|
0
|
return q{application/msword}; |
1353
|
|
|
|
|
|
|
} |
1354
|
6
|
50
|
|
|
|
15
|
if (length $data > 1) { |
1355
|
6
|
|
|
|
|
9
|
$substr = substr($data, 1, 1024); |
1356
|
6
|
50
|
33
|
|
|
29
|
if (defined $substr && $substr =~ m[^WPC]) { |
1357
|
0
|
|
|
|
|
0
|
return q{text/vnd.wordperfect}; |
1358
|
|
|
|
|
|
|
} |
1359
|
|
|
|
|
|
|
} |
1360
|
6
|
50
|
|
|
|
15
|
if ($data =~ m[^StartFontMetrics]) { |
1361
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1362
|
|
|
|
|
|
|
} |
1363
|
6
|
50
|
|
|
|
13
|
if ($data =~ m[^StartFont]) { |
1364
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1365
|
|
|
|
|
|
|
} |
1366
|
6
|
50
|
|
|
|
13
|
if (length $data > 0) { |
1367
|
6
|
|
|
|
|
9
|
$substr = substr($data, 0, 4); |
1368
|
6
|
50
|
|
|
|
15
|
if (pack('H*', '137A2944') eq $substr ) { |
1369
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1370
|
|
|
|
|
|
|
} |
1371
|
|
|
|
|
|
|
} |
1372
|
6
|
50
|
|
|
|
24
|
if (length $data > 0) { |
1373
|
6
|
|
|
|
|
13
|
$substr = substr($data, 0, 4); |
1374
|
6
|
50
|
|
|
|
13
|
if (pack('H*', '137A2947') eq $substr ) { |
1375
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1376
|
|
|
|
|
|
|
} |
1377
|
|
|
|
|
|
|
} |
1378
|
6
|
50
|
|
|
|
16
|
if (length $data > 0) { |
1379
|
6
|
|
|
|
|
7
|
$substr = substr($data, 0, 4); |
1380
|
6
|
50
|
|
|
|
13
|
if (pack('H*', '137A2950') eq $substr ) { |
1381
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1382
|
|
|
|
|
|
|
} |
1383
|
|
|
|
|
|
|
} |
1384
|
6
|
50
|
|
|
|
11
|
if (length $data > 0) { |
1385
|
6
|
|
|
|
|
6
|
$substr = substr($data, 0, 4); |
1386
|
6
|
50
|
|
|
|
13
|
if (pack('H*', '137A2951') eq $substr ) { |
1387
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1388
|
|
|
|
|
|
|
} |
1389
|
|
|
|
|
|
|
} |
1390
|
6
|
50
|
|
|
|
11
|
if (length $data > 8) { |
1391
|
6
|
|
|
|
|
7
|
$substr = substr($data, 8, 4); |
1392
|
6
|
50
|
|
|
|
14
|
if (pack('H*', '137A2B45') eq $substr ) { |
1393
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1394
|
|
|
|
|
|
|
} |
1395
|
|
|
|
|
|
|
} |
1396
|
6
|
50
|
|
|
|
42
|
if (length $data > 8) { |
1397
|
6
|
|
|
|
|
6
|
$substr = substr($data, 8, 4); |
1398
|
6
|
50
|
|
|
|
53
|
if (pack('H*', '137A2B48') eq $substr ) { |
1399
|
0
|
|
|
|
|
0
|
return q{font/x-sunos-news}; |
1400
|
|
|
|
|
|
|
} |
1401
|
|
|
|
|
|
|
} |
1402
|
6
|
50
|
|
|
|
12
|
if (length $data > 0) { |
1403
|
6
|
|
|
|
|
7
|
$substr = substr($data, 0, 2); |
1404
|
6
|
50
|
|
|
|
15
|
if (pack('H*', '87CD') eq $substr ) { |
1405
|
0
|
|
|
|
|
0
|
return q{OS9/6809 module:}; |
1406
|
|
|
|
|
|
|
} |
1407
|
|
|
|
|
|
|
} |
1408
|
6
|
50
|
|
|
|
21
|
if (length $data > 0) { |
1409
|
6
|
|
|
|
|
7
|
$substr = substr($data, 0, 2); |
1410
|
6
|
50
|
|
|
|
15
|
if (pack('H*', '4AFC') eq $substr ) { |
1411
|
0
|
|
|
|
|
0
|
return q{OS9/68K module:}; |
1412
|
|
|
|
|
|
|
} |
1413
|
|
|
|
|
|
|
} |
1414
|
6
|
100
|
|
|
|
22
|
if ($data =~ m[^\%PDF\-]) { |
1415
|
3
|
|
|
|
|
26
|
return q{application/pdf}; |
1416
|
|
|
|
|
|
|
} |
1417
|
3
|
50
|
|
|
|
8
|
if ($data =~ m[^\%\!]) { |
1418
|
0
|
|
|
|
|
0
|
return q{application/postscript}; |
1419
|
|
|
|
|
|
|
} |
1420
|
3
|
50
|
|
|
|
9
|
if ($data =~ m[^\004\%\!]) { |
1421
|
0
|
|
|
|
|
0
|
return q{application/postscript}; |
1422
|
|
|
|
|
|
|
} |
1423
|
3
|
50
|
|
|
|
6
|
if ($data =~ m[^\033E\033]) { |
1424
|
0
|
|
|
|
|
0
|
return q{image/x-pcl-hp}; |
1425
|
|
|
|
|
|
|
} |
1426
|
3
|
50
|
|
|
|
16
|
if ($data =~ m[^\<\!DOCTYPE\ HTML]) { |
1427
|
3
|
|
|
|
|
25
|
return q{text/html}; |
1428
|
|
|
|
|
|
|
} |
1429
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\<\!doctype\ html]) { |
1430
|
0
|
|
|
|
|
|
return q{text/html}; |
1431
|
|
|
|
|
|
|
} |
1432
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\
|
1433
|
0
|
|
|
|
|
|
return q{text/html}; |
1434
|
|
|
|
|
|
|
} |
1435
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\
|
1436
|
0
|
|
|
|
|
|
return q{text/html}; |
1437
|
|
|
|
|
|
|
} |
1438
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\
|
1439
|
0
|
|
|
|
|
|
return q{text/html}; |
1440
|
|
|
|
|
|
|
} |
1441
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\
|
1442
|
0
|
|
|
|
|
|
return q{text/html}; |
1443
|
|
|
|
|
|
|
} |
1444
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\
|
1445
|
0
|
|
|
|
|
|
return q{text/html}; |
1446
|
|
|
|
|
|
|
} |
1447
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\
|
1448
|
0
|
|
|
|
|
|
return q{text/html}; |
1449
|
|
|
|
|
|
|
} |
1450
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\<\!SQ\ A\/E\>]) { |
1451
|
0
|
|
|
|
|
|
return q{A/E SGML Document binary}; |
1452
|
|
|
|
|
|
|
} |
1453
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\<\!SQ\ STS\>]) { |
1454
|
0
|
|
|
|
|
|
return q{A/E SGML binary styles file}; |
1455
|
|
|
|
|
|
|
} |
1456
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\367\203]) { |
1457
|
0
|
|
|
|
|
|
return q{font/x-tex}; |
1458
|
|
|
|
|
|
|
} |
1459
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\367\131]) { |
1460
|
0
|
|
|
|
|
|
return q{font/x-tex}; |
1461
|
|
|
|
|
|
|
} |
1462
|
0
|
0
|
|
|
|
|
if ($data =~ m[^\367\312]) { |
1463
|
0
|
|
|
|
|
|
return q{font/x-tex}; |
1464
|
|
|
|
|
|
|
} |
1465
|
0
|
0
|
|
|
|
|
if (length $data > 2) { |
1466
|
0
|
|
|
|
|
|
$substr = substr($data, 2, 1024); |
1467
|
0
|
0
|
0
|
|
|
|
if (defined $substr && $substr =~ m[^\000\021]) { |
1468
|
0
|
|
|
|
|
|
return q{font/x-tex-tfm}; |
1469
|
|
|
|
|
|
|
} |
1470
|
|
|
|
|
|
|
} |
1471
|
0
|
0
|
|
|
|
|
if (length $data > 2) { |
1472
|
0
|
|
|
|
|
|
$substr = substr($data, 2, 1024); |
1473
|
0
|
0
|
0
|
|
|
|
if (defined $substr && $substr =~ m[^\000\022]) { |
1474
|
0
|
|
|
|
|
|
return q{font/x-tex-tfm}; |
1475
|
|
|
|
|
|
|
} |
1476
|
|
|
|
|
|
|
} |
1477
|
0
|
0
|
|
|
|
|
if (length $data > 1) { |
1478
|
0
|
|
|
|
|
|
$substr = substr($data, 1, 1024); |
1479
|
0
|
0
|
0
|
|
|
|
if (defined $substr && $substr =~ m[^WPC]) { |
1480
|
0
|
|
|
|
|
|
return q{(Corel/WP)}; |
1481
|
|
|
|
|
|
|
} |
1482
|
|
|
|
|
|
|
} |
1483
|
0
|
0
|
|
|
|
|
if ($data =~ m[^BLENDER]) { |
1484
|
0
|
|
|
|
|
|
return q{application/x-blender}; |
1485
|
|
|
|
|
|
|
} |
1486
|
|
|
|
|
|
|
|
1487
|
|
|
|
|
|
|
# autogerated code ends |
1488
|
|
|
|
|
|
|
|
1489
|
|
|
|
|
|
|
# fallback case |
1490
|
|
|
|
|
|
|
{ |
1491
|
0
|
|
|
|
|
|
return 'application/octet-stream'; |
|
0
|
|
|
|
|
|
|
1492
|
|
|
|
|
|
|
} |
1493
|
|
|
|
|
|
|
} |
1494
|
|
|
|
|
|
|
|
1495
|
|
|
|
|
|
|
1; |
1496
|
|
|
|
|
|
|
|
1497
|
|
|
|
|
|
|
__END__ |