diff --git a/oletools/oleobj.py b/oletools/oleobj.py index 876d363..22777fc 100755 --- a/oletools/oleobj.py +++ b/oletools/oleobj.py @@ -45,8 +45,9 @@ http://www.decalage.info/python/oletools # 2016-06 PL: - added main and process_file (not working yet) # 2016-07-18 v0.48 SL: - added Python 3.5 support # 2016-07-19 PL: - fixed Python 2.6-7 support +# 2016-11-17 v0.51 PL: - fixed OLE native object extraction -__version__ = '0.48' +__version__ = '0.51' #------------------------------------------------------------------------------ # TODO: @@ -198,12 +199,13 @@ class OleNativeStream (object): TYPE_EMBEDDED = 0x02 - def __init__(self, bindata=None): + def __init__(self, bindata=None, package=False): """ Constructor for OleNativeStream. If bindata is provided, it will be parsed using the parse() method. :param bindata: bytes, OLENativeStream structure containing an OLE object + :param package: bool, set to True when extracting from an OLE Package object """ self.filename = None self.src_path = None @@ -213,6 +215,7 @@ class OleNativeStream (object): self.temp_path = None self.actual_size = None self.data = None + self.package = package if bindata is not None: self.parse(data=bindata) @@ -227,9 +230,11 @@ class OleNativeStream (object): """ # TODO: strict mode to raise exceptions when values are incorrect # (permissive mode by default) - # self.native_data_size = struct.unpack('