From 4e65ff4689ede777d31977f2497b475c8910f906 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 8 Mar 2021 15:40:05 +0100 Subject: [PATCH] Proper patch for #4591 --- lib/core/settings.py | 2 +- lib/request/comparison.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 2b5096d74..e156c9112 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.5.3.6" +VERSION = "1.5.3.7" 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 9a32b476c..8f973a646 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -151,14 +151,13 @@ def _comparison(page, headers, code, getRatioValue, pageLength): seq1 = seq1.split("\n") seq2 = seq2.split("\n") + key = None + else: + key = (hash(seq1), hash(seq2)) + seqMatcher.set_seq1(seq1) seqMatcher.set_seq2(seq2) - try: - key = (hash(seq1), hash(seq2)) - except: - key = None - if key in kb.cache.comparison: ratio = kb.cache.comparison[key] else: