From 5f117d4587b4de95b280247bb62a90bc1c9e349c Mon Sep 17 00:00:00 2001 From: Leonardo Amaral Date: Wed, 10 Dec 2014 11:41:37 -0200 Subject: [PATCH] * Support for huge files --- sslrate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sslrate.py b/sslrate.py index 8a646bc..2df89b0 100644 --- a/sslrate.py +++ b/sslrate.py @@ -200,9 +200,8 @@ def is_insecure_signature(self): ### Process def process_report(path, hostname=None): - with open(path) as f: - data = f.read() - tree = ET.fromstring(data) + xmlfile = open(path,'r') + tree = ET.parse(xmlfile, parser=ET.XMLParser(huge_tree=True)) error = tree.find('.//invalidTarget') if error is not None: return (error.text, None, error.attrib['error'])