Method: #rex

Defined in:
lib/rex/ole.rb

#rexObject

Rex::OLE - an OLE implementation written in 2010 by Joshua J. Drake <jduck [at] metasploit.com>

License: MSF_LICENSE

This module implements Object-Linking-and-Embedding otherwise known as Compound File Binary File Format or Windows Compound Binary File Format. OLE is the container format for modern Excel, Word, PowerPoint, and many other file formats.

NOTE: This implementation is almost fully compliant with [MS-CFB] v1.1

SUPPORTS:

1. R/W v3 OLE files (v4 may work, but wasn't tested)
2. RO double-indirect fat sectors
3. RO fat sectors (including those in double-indirect parts)
4. WO support for less than 109 fat sectors :)
5. R/W minifat sectors
6. R/W ministream
7. R/W normal streams
8. R/W substorages (including nesting)
9. full directory support (hierarchal and flattened access)
  1. big and little endian files (although only little endian was tested)

  2. PropertySet streams (except .to_s)

TODO (in order of priority):

1. support deleting storages/streams
2. create copyto and other typical interface functions
3. support writing DIF sectors > 109
   - may lead to allocating more fat sectors :-/
4. properly support mode params for open_stream/open_storage/etc
5. optimize to prevent unecessary loading/writing
6. support non-committal editing (open, change, close w/o save)
7. support timestamps
8. provide interface to change paramters (endian, etc)

TO INVESTIGATE:

1. moving storage interface functions into something used by both
   the main storage and substorages (unifying the code) (mixin?)
2. eliminating flattening the directory prior to writing it out


54
# File 'lib/rex/ole.rb', line 54

require 'rex'