-
Notifications
You must be signed in to change notification settings - Fork 586
Closed
Description
Error:
...
oid = oletools.oleid.OleID(filename=self.filename, data=self.filedata)
File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/site-packages/oletools/oleid.py", line 238, in __init__
self.data_bytesio = io.BytesIO(self.data)
AttributeError: 'OleID' object has no attribute 'data'
Code:
Lines 234 to 238 in 75c0696
if data is None: | |
self.file_on_disk = True # useful for some check that don't work in memory | |
with open(filename, 'rb') as f: | |
self.data = f.read() | |
self.data_bytesio = io.BytesIO(self.data) |
Fix:
if data is None:
self.file_on_disk = True # useful for some check that don't work in memory
with open(filename, 'rb') as f:
self.data = f.read()
else:
self.data = data
self.data_bytesio = io.BytesIO(self.data)