Browse code

Add more machine types

git-svn: trunk@1487

Tomasz Kojm authored on 2005/04/20 08:52:13
Showing 2 changed files
... ...
@@ -1,4 +1,9 @@
1
+Wed Apr 20 01:50:36 CEST 2005 (tk)
2
+----------------------------------
3
+  * libclamav/pe.c: Add more machine types (thanks to Christoph)
4
+
1 5
 Tue Apr 19 15:11:19 CEST 2005 (acab)
6
+------------------------------------
2 7
   * libclamav/pe.c: Fixed a typo in FSG detection
3 8
                   (reported by Didi Rieder <adrieder*sbox.tugraz.at>)
4 9
 
... ...
@@ -220,15 +220,20 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c
220 220
     }
221 221
 
222 222
     switch(EC16(file_hdr.Machine)) {
223
+	case 0x0:
224
+	    cli_dbgmsg("Machine type: Unknown\n");
223 225
 	case 0x14c:
224 226
 	    cli_dbgmsg("Machine type: 80386\n");
225 227
 	    break;
226
-	case 0x014d:
228
+	case 0x14d:
227 229
 	    cli_dbgmsg("Machine type: 80486\n");
228 230
 	    break;
229
-	case 0x014e:
231
+	case 0x14e:
230 232
 	    cli_dbgmsg("Machine type: 80586\n");
231 233
 	    break;
234
+	case 0x160:
235
+	    cli_dbgmsg("Machine type: R30000 (big-endian)\n");
236
+	    break;
232 237
 	case 0x162:
233 238
 	    cli_dbgmsg("Machine type: R3000\n");
234 239
 	    break;
... ...
@@ -265,15 +270,45 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c
265 265
 	case 0x1a2:
266 266
 	    cli_dbgmsg("Machine type: Hitachi SH3\n");
267 267
 	    break;
268
+	case 0x1a3:
269
+	    cli_dbgmsg("Machine type: Hitachi SH3-DSP\n");
270
+	    break;
271
+	case 0x1a4:
272
+	    cli_dbgmsg("Machine type: Hitachi SH3-E\n");
273
+	    break;
268 274
 	case 0x1a6:
269 275
 	    cli_dbgmsg("Machine type: Hitachi SH4\n");
270 276
 	    break;
277
+	case 0x1a8:
278
+	    cli_dbgmsg("Machine type: Hitachi SH5\n");
279
+	    break;
271 280
 	case 0x1c0:
272 281
 	    cli_dbgmsg("Machine type: ARM\n");
273 282
 	    break;
274 283
 	case 0x1c2:
275 284
 	    cli_dbgmsg("Machine type: THUMB\n");
276 285
 	    break;
286
+	case 0x1d3:
287
+	    cli_dbgmsg("Machine type: AM33\n");
288
+	    break;
289
+	case 0x520:
290
+	    cli_dbgmsg("Machine type: Infineon TriCore\n");
291
+	    break;
292
+	case 0xcef:
293
+	    cli_dbgmsg("Machine type: CEF\n");
294
+	    break;
295
+	case 0xebc:
296
+	    cli_dbgmsg("Machine type: EFI Byte Code\n");
297
+	    break;
298
+	case 0x9041:
299
+	    cli_dbgmsg("Machine type: M32R\n");
300
+	    break;
301
+	case 0xc0ee:
302
+	    cli_dbgmsg("Machine type: CEE\n");
303
+	    break;
304
+	case 0x8664:
305
+	    cli_dbgmsg("Machine type: AMD64\n");
306
+	    break;
277 307
 	default:
278 308
 	    cli_warnmsg("Unknown machine type in PE header (0x%x)\n", EC16(file_hdr.Machine));
279 309
     }