From fdf415c7f32aa92d73ba2184a0be7d4592dc0005 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Mon, 30 May 2016 12:56:38 +0200 Subject: [PATCH] add field to_deobfuscate to json_result; ensure that json always has same fields independent of options --- oletools/olevba.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/oletools/olevba.py b/oletools/olevba.py index 5a42ae8..aa87148 100755 --- a/oletools/olevba.py +++ b/oletools/olevba.py @@ -2889,6 +2889,7 @@ class VBA_Parser_CLI(VBA_Parser): result['json_conversion_successful'] = False result['analysis'] = None result['code_deobfuscated'] = None + result['do_deobfuscate'] = deobfuscate try: #TODO: handle olefile errors, when an OLE file is malformed @@ -2908,6 +2909,8 @@ class VBA_Parser_CLI(VBA_Parser): curr_macro['ole_stream'] = stream_path if display_code: curr_macro['code'] = vba_code_filtered.strip() + else: + curr_macro['code'] = None macros.append(curr_macro) if not vba_code_only: # analyse the code from all modules at once: -- libgit2 0.21.4