From 888bf4560d81987c8786f6ffde51bb58bbedd027 Mon Sep 17 00:00:00 2001 From: decalage2 Date: Wed, 4 Dec 2019 13:48:14 +0100 Subject: [PATCH] olevba: quick hack to avoid pcodedmp errors to appear on the console --- oletools/olevba.py | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/oletools/olevba.py b/oletools/olevba.py index 50650e1..e0c1c58 100644 --- a/oletools/olevba.py +++ b/oletools/olevba.py @@ -3611,7 +3611,11 @@ class VBA_Parser(object): try: # TODO: handle files in memory too log.debug('before pcodedmp') + # TODO: we just ignore pcodedmp errors + stderr = sys.stderr + sys.stderr = output pcodedmp.processFile(self.filename, args, output_file=output) + sys.stderr = stderr log.debug('after pcodedmp') except Exception as e: # print('Error while running pcodedmp: {}'.format(e), file=sys.stderr, flush=True) -- libgit2 0.21.4