Browse Source

replaced a few tabs by spaces, bumped version to 0.47.dev3, updated changelog

pull/65/merge
decalage2 3 years ago
parent
commit
eea9b576f5
  1. 3
      CHANGELOG.md
  2. 18
      olefile/olefile.py

3
CHANGELOG.md

@ -3,6 +3,9 @@ Detailed CHANGELOG
olefile.py
----------
* 2019-05-08 v0.47.dev3:
- merged PR #114 by Malwrologist @DissectMalware: added methods get_userdefined_properties and
get_document_variables
* 2019-04-28 v0.47.dev2:
- merged PR #110 by Ken Peterson @TheElementalOfCreation: added exceptions OleFileError and NotOleFileError
to replace IOError

18
olefile/olefile.py

@ -86,8 +86,8 @@ from __future__ import print_function # This version of olefile requires Pytho
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
__date__ = "2019-04-28"
__version__ = '0.47.dev2'
__date__ = "2019-05-08"
__version__ = '0.47.dev3'
__author__ = "Philippe Lagadec"
__all__ = ['isOleFile', 'OleFileIO', 'OleMetadata', 'enable_logging',
@ -2251,12 +2251,11 @@ class OleFileIO:
:returns: a dictionary of values indexed by id (integer)
"""
#REFERENCE: [MS-OLEPS] https://msdn.microsoft.com/en-us/library/dd942421.aspx
#REFERENCE: https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-oshared/2ea8be67-a4a0-4e2e-b42f-49a182645562
# REFERENCE: [MS-OLEPS] https://msdn.microsoft.com/en-us/library/dd942421.aspx
# REFERENCE: https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-oshared/2ea8be67-a4a0-4e2e-b42f-49a182645562
#'D5CDD502-2E9C-101B-9397-08002B2CF9AE'
# TODO: testing the code more rigorously
# TODO: adding exception handeling
# TODO: testing the code more rigorously
# TODO: adding exception handeling
FMTID_USERDEFINED_PROPERTIES = _clsid(b'\x05\xD5\xCD\xD5\x9C\x2E\x1B\x10\x93\x97\x08\x00\x2B\x2C\xF9\xAE')
# make sure no_conversion is a list, just to simplify code below:
@ -2280,7 +2279,6 @@ class OleFileIO:
section_file_pointers = []
try:
for i in range(sections_count):
# format id
@ -2436,8 +2434,8 @@ class OleFileIO:
Extract the document variables from Microsft Word docs
:return: it returns a list of dictionaries, each of them contains var_name and value keys
"""
# TODO: testing the code more rigorously
# TODO: adding exception handeling
# TODO: testing the code more rigorously
# TODO: adding exception handeling
data = []
word_fp = self.openstream(['WordDocument'])

Loading…
Cancel
Save