mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-23 03:02:47 -10:00
Adding warning for (unsupported) DISTINCT in provided SQL queries
This commit is contained in:
1 parent
f4a4ae5027
commit
f84b7fb70a
2 files changed
+3
-1
No files matched your search
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.86"
|
||||
VERSION = "1.10.11.87"
|
||||
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)
|
||||
|
||||
@@ -677,6 +677,8 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser
|
||||
count = 0
|
||||
|
||||
if query and not re.search(r"COUNT.*FROM.*\(.*DISTINCT", query, re.I):
|
||||
if fromUser and re.search(r"(?i)\bDISTINCT\b", query):
|
||||
singleTimeWarnMessage("DISTINCT is not supported in provided SQL queries (results can contain duplicates)")
|
||||
query = query.replace("DISTINCT ", "")
|
||||
|
||||
if not conf.forceDns:
|
||||
|
||||
Reference in new issue
Block a user