1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Prevent PyXML from importing, causing crashes

http://seclists.org/nmap-dev/2014/q2/318

Essentially, we import the xml name, then override its search path,
stripping out the _xmlplus paths that PyXML uses. This leaves only the
Python 2 standard library path, which is what Zenmap was written for.
This commit is contained in:
dmiller
2014-05-21 03:53:58 +00:00
parent 3f73a22db0
commit 2f23d996bd
14 changed files with 68 additions and 0 deletions

View File

@@ -127,6 +127,11 @@ from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapCore.Name import APP_DISPLAY_NAME, NMAP_DISPLAY_NAME, NMAP_WEB_SITE
import zenmapCore.I18N
# Prevent loading PyXML
import xml
xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
# For escaping text in marked-up labels.
from xml.sax.saxutils import escape