-
Notifications
You must be signed in to change notification settings - Fork 568
rtfobj
decalage2 edited this page May 29, 2016
·
5 revisions
rtfobj is a Python module to extract embedded objects from RTF files, such as OLE ojects. It can be used as a Python library or a command-line tool.
It is part of the python-oletools package.
:::text
rtfobj.py <file.rtf>
It extracts and decodes all the data blocks encoded as hexadecimal in the RTF document, and saves them as files named "object_xxxx.bin", xxxx being the location of the object in the RTF file.
Usage as a python module:
rtf_iter_objects(filename) is an iterator which yields a tuple (index, object) providing the index of each hexadecimal stream in the RTF file, and the corresponding decoded object.
Example:
:::python
import rtfobj
for index, data in rtfobj.rtf_iter_objects("myfile.rtf"):
print 'found object size %d at index %08X' % (len(data), index)