mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-20 07:00:25 +00:00
Adding warning for (unsupported) DISTINCT in provided SQL queries
This commit is contained in:
parent
f4a4ae5027
commit
f84b7fb70a
2 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue