From b6d7b367dc41bbb602cbe39cfa7eda707a63e54d Mon Sep 17 00:00:00 2001 From: Rev3rseSecurity <36775664+Rev3rseSecurity@users.noreply.github.com> Date: Thu, 25 Oct 2018 13:54:15 +0000 Subject: [PATCH] fix but xmlparse not xml file --- views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views.py b/views.py index 4554f7f..6e2a829 100644 --- a/views.py +++ b/views.py @@ -301,6 +301,8 @@ def index(request, filterservice="", filterportid=""): r['trhead'] = 'FilenameScan Start TimeHosts ' for i in xmlfiles: + if re.search('\.xml$', i) is None: + continue oo = xmltodict.parse(open('/opt/xml/'+i, 'r').read()) r['out2'] = json.dumps(oo['nmaprun'], indent=4) o = json.loads(r['out2'])