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

Skip to content

Commit 69c679c

Browse files
committed
Fixes #4728
1 parent 5ea08b3 commit 69c679c

3 files changed

Lines changed: 9 additions & 9 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.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.5.6.5"
23+
VERSION = "1.5.7.0"
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/databases.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ def getColumns(self, onlyColNames=False, colTuple=None, bruteForce=None, dumpMod
618618
query = rootQuery.inband.query % (unsafeSQLIdentificatorNaming(tbl), unsafeSQLIdentificatorNaming(conf.db))
619619
query += condQuery
620620

621-
if Backend.isFork(FORK.DRIZZLE):
621+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
622622
query = re.sub("column_type", "data_type", query, flags=re.I)
623623

624624
elif Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2, DBMS.DERBY, DBMS.ALTIBASE, DBMS.MIMERSQL):
@@ -1022,7 +1022,7 @@ def getStatements(self):
10221022
rootQuery = queries[Backend.getIdentifiedDbms()].statements
10231023

10241024
if any(isTechniqueAvailable(_) for _ in (PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.QUERY)) or conf.direct:
1025-
if Backend.isFork(FORK.DRIZZLE):
1025+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
10261026
query = rootQuery.inband.query2
10271027
else:
10281028
query = rootQuery.inband.query
@@ -1049,7 +1049,7 @@ def getStatements(self):
10491049

10501050
query = rootQuery.blind.count
10511051

1052-
if Backend.isFork(FORK.DRIZZLE):
1052+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
10531053
query = re.sub("INFORMATION_SCHEMA", "DATA_DICTIONARY", query, flags=re.I)
10541054

10551055
count = inject.getValue(query, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
@@ -1077,7 +1077,7 @@ def getStatements(self):
10771077
if isNoneValue(value):
10781078
query = rootQuery.blind.query % index
10791079

1080-
if Backend.isFork(FORK.DRIZZLE):
1080+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
10811081
query = re.sub("INFORMATION_SCHEMA", "DATA_DICTIONARY", query, flags=re.I)
10821082

10831083
value = unArrayizeValue(inject.getValue(query, union=False, error=False))

plugins/generic/users.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def isDba(self, user=None):
8181

8282
if Backend.isDbms(DBMS.MYSQL):
8383
self.getCurrentUser()
84-
if Backend.isFork(FORK.DRIZZLE):
84+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
8585
kb.data.isDba = "root" in (kb.data.currentUser or "")
8686
elif kb.data.currentUser:
8787
query = queries[Backend.getIdentifiedDbms()].is_dba.query % kb.data.currentUser.split("@")[0]
@@ -106,7 +106,7 @@ def getUsers(self):
106106
condition |= (Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema)
107107

108108
if any(isTechniqueAvailable(_) for _ in (PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.ERROR, PAYLOAD.TECHNIQUE.QUERY)) or conf.direct:
109-
if Backend.isFork(FORK.DRIZZLE):
109+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
110110
query = rootQuery.inband.query3
111111
elif condition:
112112
query = rootQuery.inband.query2
@@ -126,7 +126,7 @@ def getUsers(self):
126126
infoMsg = "fetching number of database users"
127127
logger.info(infoMsg)
128128

129-
if Backend.isFork(FORK.DRIZZLE):
129+
if Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
130130
query = rootQuery.blind.count3
131131
elif condition:
132132
query = rootQuery.blind.count2
@@ -147,7 +147,7 @@ def getUsers(self):
147147
for index in indexRange:
148148
if Backend.getIdentifiedDbms() in (DBMS.SYBASE, DBMS.MAXDB):
149149
query = rootQuery.blind.query % (kb.data.cachedUsers[-1] if kb.data.cachedUsers else " ")
150-
elif Backend.isFork(FORK.DRIZZLE):
150+
elif Backend.isDbms(DBMS.MYSQL) and Backend.isFork(FORK.DRIZZLE):
151151
query = rootQuery.blind.query3 % index
152152
elif condition:
153153
query = rootQuery.blind.query2 % index

0 commit comments

Comments
 (0)