From 3337c7a37351fa78e301d9f7136e93a01e34ef39 Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Wed, 21 Aug 2019 14:52:54 +0200 Subject: [PATCH] changed reading mode in ooxml.XMLParser.iter_files() for single xml to rb. With the 'r' mode, it's impossible to parse excel-xml 2003 and 2007 --- oletools/ooxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oletools/ooxml.py b/oletools/ooxml.py index a36c99d..a1ae7be 100644 --- a/oletools/ooxml.py +++ b/oletools/ooxml.py @@ -428,7 +428,7 @@ class XmlParser(object): if self.is_single_xml(): if args: raise BadOOXML(self.filename, 'xml has no subfiles') - with open(self.filename, 'r') as handle: + with open(self.filename, 'rb') as handle: yield None, handle # the subfile=None is needed in iter_xml self.did_iter_all = True else: -- libgit2 0.21.4