mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
refactoring
This commit is contained in:
@@ -77,8 +77,8 @@ class Enumeration(GenericEnumeration):
|
|||||||
rootQuery = queries[Backend.getIdentifiedDbms()].tables
|
rootQuery = queries[Backend.getIdentifiedDbms()].tables
|
||||||
|
|
||||||
for db in dbs:
|
for db in dbs:
|
||||||
if not isinstance(db, basestring):
|
if isinstance(db, (tuple, list)):
|
||||||
db = db[0]
|
db = db[0] if db else ""
|
||||||
|
|
||||||
randStr = randomStr()
|
randStr = randomStr()
|
||||||
query = rootQuery.inband.query % (("'%s'" % db) if db != "USER" else 'USER')
|
query = rootQuery.inband.query % (("'%s'" % db) if db != "USER" else 'USER')
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ class Enumeration(GenericEnumeration):
|
|||||||
|
|
||||||
if any(isTechniqueAvailable(_) for _ in (PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.ERROR)) or conf.direct:
|
if any(isTechniqueAvailable(_) for _ in (PAYLOAD.TECHNIQUE.UNION, PAYLOAD.TECHNIQUE.ERROR)) or conf.direct:
|
||||||
for db in dbs:
|
for db in dbs:
|
||||||
if not isinstance(db, basestring):
|
if isinstance(db, (tuple, list)):
|
||||||
db = db[0]
|
db = db[0] if db else ""
|
||||||
|
|
||||||
if conf.excludeSysDbs and db in self.excludeDbsList:
|
if conf.excludeSysDbs and db in self.excludeDbsList:
|
||||||
infoMsg = "skipping system database '%s'" % db
|
infoMsg = "skipping system database '%s'" % db
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ class Enumeration(GenericEnumeration):
|
|||||||
rootQuery = queries[Backend.getIdentifiedDbms()].tables
|
rootQuery = queries[Backend.getIdentifiedDbms()].tables
|
||||||
|
|
||||||
for db in dbs:
|
for db in dbs:
|
||||||
if not isinstance(db, basestring):
|
if isinstance(db, (tuple, list)):
|
||||||
db = db[0]
|
db = db[0] if db else ""
|
||||||
|
|
||||||
for blind in blinds:
|
for blind in blinds:
|
||||||
randStr = randomStr()
|
randStr = randomStr()
|
||||||
|
|||||||
@@ -897,8 +897,8 @@ class Enumeration:
|
|||||||
value = map(lambda x: (dbs[0], x), value)
|
value = map(lambda x: (dbs[0], x), value)
|
||||||
|
|
||||||
for db, table in filterPairValues(value):
|
for db, table in filterPairValues(value):
|
||||||
if not isinstance(db, basestring):
|
if isinstance(db, (tuple, list)):
|
||||||
db = db[0]
|
db = db[0] if db else ""
|
||||||
|
|
||||||
db = safeSQLIdentificatorNaming(db)
|
db = safeSQLIdentificatorNaming(db)
|
||||||
table = safeSQLIdentificatorNaming(table, True)
|
table = safeSQLIdentificatorNaming(table, True)
|
||||||
|
|||||||
Reference in New Issue
Block a user