From b23bfde7a739537905b7b1603581a2da6ad6d2ee Mon Sep 17 00:00:00 2001 From: Philippe Lagadec Date: Tue, 8 Mar 2016 20:29:43 +0100 Subject: [PATCH] mraptor: collapse long lines before analysis --- oletools/mraptor.py | 11 ++++++----- oletools/oleobj.py | 0 2 files changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 oletools/oleobj.py diff --git a/oletools/mraptor.py b/oletools/mraptor.py index 0a63538..569f1bb 100755 --- a/oletools/mraptor.py +++ b/oletools/mraptor.py @@ -2,8 +2,8 @@ """ mraptor.py - MacroRaptor -MacroRaptor is a script to parse OLE and OpenXML files such as MS Office documents -(e.g. Word, Excel), to detect malicious macros. +MacroRaptor is a script to parse OLE and OpenXML files such as MS Office +documents (e.g. Word, Excel), to detect malicious macros. Supported formats: - Word 97-2003 (.doc, .dot), Word 2007+ (.docm, .dotm) @@ -49,8 +49,9 @@ http://www.decalage.info/python/oletools # 2016-02-23 v0.01 PL: - first version # 2016-02-29 v0.02 PL: - added Workbook_Activate, FileSaveAs # 2016-03-04 v0.03 PL: - returns an exit code based on the overall result +# 2016-03-08 v0.04 PL: - collapse long lines before analysis -__version__ = '0.03' +__version__ = '0.04' #------------------------------------------------------------------------------ # TODO: @@ -153,8 +154,8 @@ class MacroRaptor(object): MacroRaptor constructor :param vba_code: string containing the VBA macro code """ - # TODO: collapse long lines first - self.vba_code = vba_code + # collapse long lines first + self.vba_code = olevba.vba_collapse_long_lines(vba_code) self.autoexec = False self.write = False self.execute = False diff --git a/oletools/oleobj.py b/oletools/oleobj.py old mode 100644 new mode 100755 index 6424649..6424649 --- a/oletools/oleobj.py +++ b/oletools/oleobj.py -- libgit2 0.21.4