From 26c8423806e7e7af811c8f726526c4e64047f87b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 30 Apr 2019 14:23:28 +0200 Subject: [PATCH] Fixes #3613 --- lib/core/agent.py | 3 +-- lib/core/settings.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 4121cdfbd..733b38c4a 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -989,8 +989,7 @@ class Agent(object): limitedQuery = limitedQuery.replace(" (SELECT TOP %s" % startTopNums, " (SELECT TOP %d" % num) forgeNotIn = False else: - topNum = re.search(r"TOP\s+([\d]+)\s+", limitedQuery, re.I).group(1) - limitedQuery = limitedQuery.replace("TOP %s " % topNum, "") + limitedQuery = re.sub(r"\bTOP\s+\d+\s*", "", limitedQuery, flags=re.I) if forgeNotIn: limitedQuery = limitedQuery.replace("SELECT ", (limitStr % 1), 1) diff --git a/lib/core/settings.py b/lib/core/settings.py index 33883d367..bf95652e9 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.3.4.50" +VERSION = "1.3.4.51" 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)