Skip to content

Commit 7ee21bb

Browse files
committed
Fixes CI/CD errors
1 parent 0338c13 commit 7ee21bb

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

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

plugins/generic/users.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ def getPasswordHashes(self):
204204
condition = rootQuery.inband.condition
205205

206206
if conf.user:
207-
query += " WHERE "
208-
query += " OR ".join("%s = '%s'" % (condition, user) for user in sorted(users))
207+
userCondition = " OR ".join("%s = '%s'" % (condition, user) for user in sorted(users))
208+
query += " %s (%s)" % ("AND" if re.search(r"(?i)\bWHERE\b", query) else "WHERE", userCondition)
209209

210210
if Backend.isDbms(DBMS.SYBASE):
211211
getCurrentThreadData().disableStdOut = True
@@ -417,12 +417,12 @@ def getPrivileges(self, query2=False):
417417
condition = rootQuery.inband.condition
418418

419419
if conf.user:
420-
query += " WHERE "
421-
422420
if Backend.isDbms(DBMS.MYSQL) and kb.data.has_information_schema:
423-
query += " OR ".join("%s LIKE '%%%s%%'" % (condition, user) for user in sorted(users))
421+
userCondition = " OR ".join("%s LIKE '%%%s%%'" % (condition, user) for user in sorted(users))
424422
else:
425-
query += " OR ".join("%s = '%s'" % (condition, user) for user in sorted(users))
423+
userCondition = " OR ".join("%s = '%s'" % (condition, user) for user in sorted(users))
424+
425+
query += " %s (%s)" % ("AND" if re.search(r"(?i)\bWHERE\b", query) else "WHERE", userCondition)
426426

427427
values = inject.getValue(query, blind=False, time=False)
428428

0 commit comments

Comments
 (0)