Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26c8423

Browse files
committed
Fixes #3613
1 parent 26cb07c commit 26c8423

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

lib/core/agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,8 +989,7 @@ def limitQuery(self, num, query, field=None, uniqueField=None):
989989
limitedQuery = limitedQuery.replace(" (SELECT TOP %s" % startTopNums, " (SELECT TOP %d" % num)
990990
forgeNotIn = False
991991
else:
992-
topNum = re.search(r"TOP\s+([\d]+)\s+", limitedQuery, re.I).group(1)
993-
limitedQuery = limitedQuery.replace("TOP %s " % topNum, "")
992+
limitedQuery = re.sub(r"\bTOP\s+\d+\s*", "", limitedQuery, flags=re.I)
994993

995994
if forgeNotIn:
996995
limitedQuery = limitedQuery.replace("SELECT ", (limitStr % 1), 1)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from lib.core.enums import OS
1818

1919
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
20-
VERSION = "1.3.4.50"
20+
VERSION = "1.3.4.51"
2121
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2222
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2323
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)