This commit is contained in:
Miroslav Stampar 2026-02-17 22:22:19 +01:00
parent 5a097c74c0
commit 0b5eb377c0
4 changed files with 21 additions and 9 deletions

View file

@ -5,8 +5,10 @@ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
"""
import builtins
import codecs
import collections
import difflib
import inspect
import logging
import os
@ -177,6 +179,9 @@ def dirtyPatches():
et.parse = _safe_parse
et._patched = True
if "enumerate" in difflib.__dict__ and difflib.enumerate is not builtins.enumerate:
difflib.enumerate = builtins.enumerate
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.14"
VERSION = "1.10.2.15"
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)

View file

@ -176,16 +176,23 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
else:
key = (hash(seq1), hash(seq2))
seqMatcher.set_seq1(seq1)
seqMatcher.set_seq2(seq2)
try:
seqMatcher.set_seq1(seq1)
seqMatcher.set_seq2(seq2)
except:
seqMatcher.set_seq1(repr(seq1))
seqMatcher.set_seq2(repr(seq2))
if key in kb.cache.comparison:
ratio = kb.cache.comparison[key]
else:
try:
ratio = seqMatcher.quick_ratio() if not kb.heavilyDynamic else seqMatcher.ratio()
except (TypeError, MemoryError):
ratio = seqMatcher.ratio()
try:
ratio = seqMatcher.quick_ratio() if not kb.heavilyDynamic else seqMatcher.ratio()
except (TypeError, MemoryError, SystemError):
ratio = seqMatcher.ratio()
except:
ratio = 0.0
ratio = round(ratio, 3)