decalage2 / oletools

oletools - python tools to analyze MS OLE2 files (Structured Storage, Compound File Binary Format) and MS Office documents, for malware analysis, forensics and debugging.
http://www.decalage.info/python/oletools
Other
2.92k stars 563 forks source link

ppt_parser seems broken on Py3 #177

Closed Th4nat0s closed 4 years ago

Th4nat0s commented 7 years ago
DEBUG    closing stream 'PowerPoint Document' after iter_vba_data
ERROR    Unhandled exception in main: Can't convert 'bytes' object to str implicitly

real issue is : 

Traceback (most recent call last):
  File "./olevba3.py", line 3370, in main
    relaxed=options.relaxed)
  File "./olevba3.py", line 2982, in __init__
    super(VBA_Parser_CLI, self).__init__(*args, **kwargs)
  File "./olevba3.py", line 2286, in __init__
    self.open_ppt()
  File "./olevba3.py", line 2531, in open_ppt
    for vba_data in ppt.iter_vba_data():
  File "/usr/local/lib/python3.4/dist-packages/oletools-0.51.dev8-py3.4.egg/oletools/ppt_parser.py", line 1107, in wrapped
    for result in func(self, self._open_main_stream, *args, **kwargs):
  File "/usr/local/lib/python3.4/dist-packages/oletools-0.51.dev8-py3.4.egg/oletools/ppt_parser.py", line 1564, in iter_vba_data
    yield self.decompress_vba_storage(storage)
  File "/usr/local/lib/python3.4/dist-packages/oletools-0.51.dev8-py3.4.egg/oletools/ppt_parser.py", line 1074, in wrapped
    return func(self, self._open_main_stream, *args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/oletools-0.51.dev8-py3.4.egg/oletools/ppt_parser.py", line 1515, in decompress_vba_storage
    iterative_decompress(stream, storage.data_size)
  File "/usr/local/lib/python3.4/dist-packages/oletools-0.51.dev8-py3.4.egg/oletools/ppt_parser.py", line 1584, in iterative_decompress
    decomp += decompressor.decompress(stream.read(n_new))
TypeError: Can't convert 'bytes' object to str implicitly
GoNzCiD commented 5 years ago

I still have this exception on ppt_parser.py version 0.54 with python 3.4.