Books and toys for geeks and other kids (Amazon "top sellers")
O'Reilly
Linux
Unix shell
C / C++
Perl
PHP
Python
Java
JavaScript
TCP/IP
HTML
XML
.NET
PhotoShop
Dreamweaver
DirectX
Excel
Windows 2000
Windows XP
VBScript
MCSE
Security
Tops
BigRead
Dilbert
Far Side
Low Carb Diet
PDAs/Handhelds
Digital Cameras
Flash Sticks

Lowth.com Home | Protector Home | LinWiz Home | My Bookshelf | Topic Index | Changes | Search

check_msword

Part of protector (http://protector.sourceforge.net)
By Chris Lowth, (protector@lowth.com)

Synopsis

   check_msword filename

Description

This program checks that the file named as it's argument is an old-style (pre-OLE) Msword document, and that it contains no macros or embedded objects. It does this by searching the file for a set of strings, and confirming that these stings either exist or don't in fixed combinations. Note that the "check_msole" program is capable of performing checks much more reliably on OLE formatted MS Office documents. This program (check_msword) is only used for legacy MS Word document formats that don't adhere to the OLE format.

The result of the program's deliberations are output on stdout as commands that can be understood by the "part_filter" script that is also part of the protector suite.

The program does not actually understand the format of MSWord documents. The logic for performing the checks described above has been derived by inspecting a number of document files - and is probably rather too naive for long term use. Consider this to be an over-simple prototype for future improvement.

Output

The program displays the results of it's simple investigations using one of the following messages..

Message Description
allow_unchanged The file is safe for delivery.
replace_with wrong_type The file is not a legacy MS-Word document.
replace_with msword_has_macros The document contains one or more macros (or at least: appears to).
replace_with msword_has_embedded_objects The document contains one or more embedded objects which the program is not capable of extracting or checking.


  All material on this page, and the "protector" software to which it relates is Copyright (C) 2002 by Lowth.com. "Protector" is free, open source software, licensed according to the terms of the GNU Public License