From 0b5eb377c058092b2f3cde3298173f2e7566158b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 17 Feb 2026 22:22:19 +0100 Subject: [PATCH] Fixes #6017 --- data/txt/sha256sums.txt | 6 +++--- lib/core/patch.py | 5 +++++ lib/core/settings.py | 2 +- lib/request/comparison.py | 17 ++++++++++++----- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/data/txt/sha256sums.txt b/data/txt/sha256sums.txt index 8386496df..e8a381afe 100644 --- a/data/txt/sha256sums.txt +++ b/data/txt/sha256sums.txt @@ -182,13 +182,13 @@ a033f92d136c707a25927c2383125ddb004d4283db62c004dcd67c3fc242bb1c lib/core/dump. 914a13ee21fd610a6153a37cbe50830fcbd1324c7ebc1e7fc206d5e598b0f7ad lib/core/log.py 67ea32c993cbf23cdbd5170360c020ca33363b7c516ff3f8da4124ef7cb0254d lib/core/optiondict.py 8d12a0acbc5e71a40fb19e65af49cd665b10aa313e1b81b336387edf8dd2f14b lib/core/option.py -9a213f91c8ad468466bd92e5e5805040f904055eb607fb2ed75b4c0e30b8accd lib/core/patch.py +d41ae6880991f6c9e921341bf3e1b4af84464753979eecf1d091df0afc26f008 lib/core/patch.py 49c0fa7e3814dfda610d665ee02b12df299b28bc0b6773815b4395514ddf8dec lib/core/profiling.py 03db48f02c3d07a047ddb8fe33a757b6238867352d8ddda2a83e4fec09a98d04 lib/core/readlineng.py 48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py 0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py 888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py -ecd2ed39ca4391c5ef3e6488539afff0a15d9aa51157a4e2df16b27d0aa577d9 lib/core/settings.py +d2a2e0a54e8d1edcb315c4ca72fe60f4988e7518717a064a045fa14fd1fdde92 lib/core/settings.py cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py 70ea3768f1b3062b22d20644df41c86238157ec80dd43da40545c620714273c6 lib/core/target.py @@ -210,7 +210,7 @@ d2e771cdacef25ee3fdc0e0355b92e7cd1b68f5edc2756ffc19f75d183ba2c73 lib/parse/payl 1be3da334411657461421b8a26a0f2ff28e1af1e28f1e963c6c92768f9b0847c lib/request/basicauthhandler.py 1d5972aba14e4e340e3dde4f1d39a671020187fb759f435ba8b7f522dd4498fa lib/request/basic.py bc61bc944b81a7670884f82231033a6ac703324b34b071c9834886a92e249d0e lib/request/chunkedhandler.py -2daf0ce19eacda64687f441c90ef8da51714c3e8947c993ba08fb4ecdc4f5287 lib/request/comparison.py +09c2d8786fb5280f5f14a7b4345ecb2e7c2ca836ee06a6cf9b51770df923d94c lib/request/comparison.py f3a457675d7c2b85c7d5da5e336baf2782eaf0abbcb2ecdeb3c0e88d5bb60528 lib/request/connect.py 8e06682280fce062eef6174351bfebcb6040e19976acff9dc7b3699779783498 lib/request/direct.py cf019248253a5d7edb7bc474aa020b9e8625d73008a463c56ba2b539d7f2d8ec lib/request/dns.py diff --git a/lib/core/patch.py b/lib/core/patch.py index 86a5c4e6b..4f0621673 100644 --- a/lib/core/patch.py +++ b/lib/core/patch.py @@ -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 diff --git a/lib/core/settings.py b/lib/core/settings.py index c8138a4df..a94981a48 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -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) diff --git a/lib/request/comparison.py b/lib/request/comparison.py index 4d1f3edce..0c6ab2586 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -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)