Minor patch

This commit is contained in:
Miroslav Stampar
2026-02-01 23:32:45 +01:00
parent 5640ba7795
commit f08f860bd7
3 changed files with 20 additions and 3 deletions

View File

@@ -160,6 +160,23 @@ def dirtyPatches():
logging._releaseLock = _releaseLock
from xml.etree import ElementTree as et
if not getattr(et, "_patched", False):
_real_parse = et.parse
def _safe_parse(source, parser=None):
if parser is None:
parser = et.XMLParser()
if hasattr(parser, "parser"):
def reject(*args): raise ValueError("XML entities are forbidden")
parser.parser.EntityDeclHandler = reject
parser.parser.UnparsedEntityDeclHandler = reject
return _real_parse(source, parser=parser)
et.parse = _safe_parse
et._patched = True
def resolveCrossReferences():
"""
Place for cross-reference resolution

View File

@@ -20,7 +20,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.2.1"
VERSION = "1.10.2.2"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)