Skip to content

Commit

Permalink
fix but xmlparse not xml file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rev3rseSecurity committed Oct 25, 2018
1 parent eafff48 commit b6d7b36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions views.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ def index(request, filterservice="", filterportid=""):
r['trhead'] = '<tr><th>Filename</th><th>Scan Start Time</th><th>Hosts</th><th>&nbsp;</th></tr>'

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'])
Expand Down

0 comments on commit b6d7b36

Please sign in to comment.