From aa95f26a753d93e4c89b7790a9543da27017e197 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Fri, 12 Jan 2018 09:57:46 +0100 Subject: [PATCH] oleobj: parse OleNativeStream and OleObject from stream --- oletools/oleobj.py | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/oletools/oleobj.py b/oletools/oleobj.py index f5a4e6f..167dab3 100644 --- a/oletools/oleobj.py +++ b/oletools/oleobj.py @@ -159,6 +159,8 @@ assert struct_uint32.size == 4 # make sure it matches 4 bytes struct_uint16 = struct.Struct(' remaining data # TODO: SLACK DATA - except IOError: # data is not embedded but only linked to + except IOError, struct.error: # no data to read actual_size logging.debug('data is not embedded but only a link') self.actual_size = 0 self.data = None -- libgit2 0.21.4