Skip to content

Commit

Permalink
exception handler for bad unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
grutz committed Oct 8, 2013
1 parent 35002b3 commit 8094b91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/skaldship/nexpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,12 @@ def process_xml(
db.t_accounts.update_or_insert(**d)
db.commit()

proof = nx_xml_to_html(StringIO(etree.tostring(test, xml_declaration=False, encoding=unicode)))
try:
proof = nx_xml_to_html(StringIO(etree.tostring(test, xml_declaration=False, encoding=unicode)))
except Exception, e:
log(" [!] Error parsing test data: %s" % str(e), logging.ERROR)
continue

proof = html_to_markmin(proof)

if vulnid == 'cifs-insecure-acct-lockout-limit':
Expand Down

0 comments on commit 8094b91

Please sign in to comment.