Commit 3f526ce406b551569ea69791e15caa1a377727af

Authored by idiom
1 parent e9dca546

Update rtfobj to use the extension from the temp path of an embedded Package object.

Showing 1 changed file with 1 additions and 1 deletions
oletools/rtfobj.py
... ... @@ -880,7 +880,7 @@ def process_file(container, filename, data, output_dir=None, save_object=False):
880 880 ole_column += '\nTemp path = %r' % rtfobj.temp_path
881 881 ole_color = 'yellow'
882 882 # check if the file extension is executable:
883   - _, ext = os.path.splitext(rtfobj.filename)
  883 + _, ext = os.path.splitext(rtfobj.temp_path)
884 884 log.debug('File extension: %r' % ext)
885 885 if re_executable_extensions.match(ext):
886 886 ole_color = 'red'
... ...