Few bug fixes in -d (there were late values in payloads in some cases; sqlalchemy returns RowProxy for tuple)

This commit is contained in:
stamparm 2013-04-15 15:23:45 +02:00
parent f936746423
commit 1c47b33020
3 changed files with 6 additions and 2 deletions

View File

@ -42,6 +42,8 @@ class Agent(object):
"""
def payloadDirect(self, query):
query = self.cleanupPayload(query)
if query.startswith("AND "):
query = query.replace("AND ", "SELECT ", 1)
elif query.startswith(" UNION ALL "):

View File

@ -45,7 +45,10 @@ class SQLAlchemy(GenericConnector):
def fetchall(self):
try:
return self.cursor.fetchall()
retVal = []
for row in self.cursor.fetchall():
retVal.append(tuple(row))
return retVal
except _sqlalchemy.exc.ProgrammingError, msg:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
return None

View File

@ -224,7 +224,6 @@ class Fingerprint(GenericFingerprint):
else:
Backend.setVersionList([">= 5.0.0", "< 5.0.3"])
# For cases when information_schema is missing
elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"):
Backend.setVersion(">= 5.0.2")
setDbms("%s 5" % DBMS.MYSQL)