You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How To Reproduce the bug
Extract macros with olevba: vbaparser = VBA_Parser(file_path) if vbaparser: if vbaparser.detect_vba_macros(): vbaparser.analyze_macros()
Version information:
Ubuntu 16.04 64 bits
Python 3.8 64 bits
oletools version: 0.55.1
Additional context
I've solved the error decoding bytes to string if it's instance of bytes in line 3359.
Affected tool:
olevba
Describe the bug
With a specific document the olevba.analyze_macros() raise a exception in line 3413 and/or 3735 because vba_code is bytes.
oletools/oletools/olevba.py
Line 3413 in 0286347
oletools/oletools/olevba.py
Line 3735 in 0286347
File/Malware sample to reproduce the bug
https://www.virustotal.com/gui/file/1e6d72e0cbe34cf8e016857317b9f98050f492c3098971644ccef8b6c7db77c8/details
It's malware. If you want the file you can contact me.
(https://github.com/decalage2/oletools/files/4846132/1e6d72e0cbe34cf8e016857317b9f98050f492c3098971644ccef8b6c7db77c8.docx)
How To Reproduce the bug
Extract macros with olevba:
vbaparser = VBA_Parser(file_path) if vbaparser: if vbaparser.detect_vba_macros(): vbaparser.analyze_macros()
Version information:
Additional context
I've solved the error decoding bytes to string if it's instance of bytes in line 3359.
oletools/oletools/olevba.py
Line 3359 in 0286347
Solved with:
if isinstance(vba_code, bytes): vba_code = bytes2str(vba_code)
The text was updated successfully, but these errors were encountered: