|
Posted by Toby A Inkster on 06/17/07 16:22
Michael Fesser wrote:
> I'm surprised you see anything at all. From Word's point of view you're
> sending an invalid document. It's like taking an image file, appending
> some random bytes to it and then expecting the image viewer to still
> recognize it as an image.
If you're using GIF, then this will work flawlessly. The GIF spec states
that any additional data found at the end of a file must be ignored.
Interestingly the ZIP spec says the inverse: any extra data found at the
*beginning* of a file must be ignored. ("Header" data for ZIP files is
stored at the *end* of the file rather than what is common for most file
formats: the beginning of the file. This is because ZIP files would often
span multiple floppy disks, and the header would need to be the last bit
of data to be written.) Thus it is possible to create a file which is both
a perfectly valid GIF *and* a perfectly valid ZIP -- nice way of hiding
arbitrary data in an image file, though it swells the size of the file
significantly.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 114 days, 1 min.]
You're Not Allowed to Take Pictures of the US Embassy in Rome
http://tobyinkster.co.uk/blog/2007/06/16/us-embassy/
Navigation:
[Reply to this message]
|