Skip to content

Commit 1c47b33

Browse files
committed
Few bug fixes in -d (there were late values in payloads in some cases; sqlalchemy returns RowProxy for tuple)
1 parent f936746 commit 1c47b33

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lib/core/agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class Agent(object):
4242
"""
4343

4444
def payloadDirect(self, query):
45+
query = self.cleanupPayload(query)
46+
4547
if query.startswith("AND "):
4648
query = query.replace("AND ", "SELECT ", 1)
4749
elif query.startswith(" UNION ALL "):

lib/utils/sqlalchemy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def connect(self):
4545

4646
def fetchall(self):
4747
try:
48-
return self.cursor.fetchall()
48+
retVal = []
49+
for row in self.cursor.fetchall():
50+
retVal.append(tuple(row))
51+
return retVal
4952
except _sqlalchemy.exc.ProgrammingError, msg:
5053
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
5154
return None

plugins/dbms/mysql/fingerprint.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ def checkDbms(self):
224224
else:
225225
Backend.setVersionList([">= 5.0.0", "< 5.0.3"])
226226

227-
# For cases when information_schema is missing
228227
elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"):
229228
Backend.setVersion(">= 5.0.2")
230229
setDbms("%s 5" % DBMS.MYSQL)

0 commit comments

Comments
 (0)