More code refactoring of Backend class methods used

This commit is contained in:
Bernardo Damele
2011-04-30 14:54:29 +00:00
parent 2f2758b033
commit 9a4ae7d9e2
16 changed files with 146 additions and 146 deletions

View File

@@ -57,7 +57,7 @@ def __oneShotErrorUse(expression, field):
nulledCastedField = agent.nullAndCastField(field)
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
if Backend.isDbms(DBMS.MYSQL):
nulledCastedField = queries[DBMS.MYSQL].substring.query % (nulledCastedField, offset, MYSQL_ERROR_CHUNK_LENGTH)
# Forge the error-based SQL injection request
@@ -101,7 +101,7 @@ def __oneShotErrorUse(expression, field):
if isinstance(output, basestring):
output = htmlunescape(output).replace("<br>", "\n")
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
if Backend.isDbms(DBMS.MYSQL):
if offset == 1:
retVal = output
else:
@@ -243,7 +243,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
stopLimit = int(topLimit.group(1))
limitCond = int(stopLimit) > 1
elif Backend.getIdentifiedDbms() == DBMS.ORACLE:
elif Backend.isDbms(DBMS.ORACLE):
limitCond = False
else:
limitCond = True

View File

@@ -184,7 +184,7 @@ def unionUse(expression, unpack=True, dump=False):
stopLimit = int(topLimit.group(1))
limitCond = int(stopLimit) > 1
elif Backend.getIdentifiedDbms() == DBMS.ORACLE:
elif Backend.isDbms(DBMS.ORACLE):
limitCond = False
else:
limitCond = True
@@ -256,7 +256,7 @@ def unionUse(expression, unpack=True, dump=False):
for num in xrange(startLimit, stopLimit):
if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE):
field = expressionFieldsList[0]
elif Backend.getIdentifiedDbms() == DBMS.ORACLE:
elif Backend.isDbms(DBMS.ORACLE):
field = expressionFieldsList
else:
field = None