[Mimedefang] survey: dropping password protected file

Dave O'Neill dmo at roaringpenguin.com
Wed Mar 3 17:26:34 EST 2004


Cormack, Ken wrote:

> Something like the following would probably serve as a basis for inspecting
> "the magic" of a zip archive, regardless of filename extension.  This
> particular example looks to see if the first 2 bytes are "MZ", but this
> could be changed to look for "PK", instead...

You might want to be careful doing this for zip files.  Java .jar files 
and OpenOffice documents both use the zip format as a container and have 
"PK" as their "magic".

Cheers,
Dave
-- 
Dave O'Neill <dmo at roaringpenguin.com>    Roaring Penguin Software Inc.
+1 (613) 231-6599 ext. 104               http://www.roaringpenguin.com/



More information about the MIMEDefang mailing list