Browse code

recognize more subsystem/machine types

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1104 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/11/18 08:08:16
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Nov 18 00:05:37 CET 2004 (tk)
2
+---------------------------------
3
+  * libclamav/pe.c: recognize more subsystem/machine types
4
+
1 5
 Wed Nov 17 17:35:26 GMT 2004 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/message.c:	Scan some more bounce messages
... ...
@@ -228,11 +228,41 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c
228 228
 	case 0x184:
229 229
 	    cli_dbgmsg("Machine type: DEC Alpha AXP\n");
230 230
 	    break;
231
+	case 0x284:
232
+	    cli_dbgmsg("Machine type: DEC Alpha AXP 64bit\n");
233
+	    break;
231 234
 	case 0x1f0:
232 235
 	    cli_dbgmsg("Machine type: PowerPC\n");
233 236
 	    break;
237
+	case 0x200:
238
+	    cli_dbgmsg("Machine type: IA64\n");
239
+	    break;
240
+	case 0x268:
241
+	    cli_dbgmsg("Machine type: M68k\n");
242
+	    break;
243
+	case 0x266:
244
+	    cli_dbgmsg("Machine type: MIPS16\n");
245
+	    break;
246
+	case 0x366:
247
+	    cli_dbgmsg("Machine type: MIPS+FPU\n");
248
+	    break;
249
+	case 0x466:
250
+	    cli_dbgmsg("Machine type: MIPS16+FPU\n");
251
+	    break;
252
+	case 0x1a2:
253
+	    cli_dbgmsg("Machine type: Hitachi SH3\n");
254
+	    break;
255
+	case 0x1a6:
256
+	    cli_dbgmsg("Machine type: Hitachi SH4\n");
257
+	    break;
258
+	case 0x1c0:
259
+	    cli_dbgmsg("Machine type: ARM\n");
260
+	    break;
261
+	case 0x1c2:
262
+	    cli_dbgmsg("Machine type: THUMB\n");
263
+	    break;
234 264
 	default:
235
-	    cli_warnmsg("Unknown machine type in PE header\n");
265
+	    cli_warnmsg("Unknown machine type in PE header (0x%x)\n", EC16(file_hdr.Machine));
236 266
     }
237 267
 
238 268
     nsections = EC16(file_hdr.NumberOfSections);
... ...
@@ -292,6 +322,21 @@ int cli_scanpe(int desc, const char **virname, long int *scanned, const struct c
292 292
 	case 7:
293 293
 	    cli_dbgmsg("Subsystem: POSIX console\n");
294 294
 	    break;
295
+	case 8:
296
+	    cli_dbgmsg("Subsystem: Native Win9x driver\n");
297
+	    break;
298
+	case 9:
299
+	    cli_dbgmsg("Subsystem: WinCE GUI\n");
300
+	    break;
301
+	case 10:
302
+	    cli_dbgmsg("Subsystem: EFI application\n");
303
+	    break;
304
+	case 11:
305
+	    cli_dbgmsg("Subsystem: EFI driver\n");
306
+	    break;
307
+	case 12:
308
+	    cli_dbgmsg("Subsystem: EFI runtime driver\n");
309
+	    break;
295 310
 	default:
296 311
 	    cli_warnmsg("Unknown subsystem in PE header\n");
297 312
     }