mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +03:00
some fixes
This commit is contained in:
parent
5be9c04e44
commit
c89021f0bb
|
@ -749,10 +749,22 @@ class Enumeration:
|
||||||
|
|
||||||
rootQuery = queries[kb.dbms].tables
|
rootQuery = queries[kb.dbms].tables
|
||||||
|
|
||||||
|
if conf.db:
|
||||||
|
if "," in conf.db:
|
||||||
|
dbs = conf.db.split(",")
|
||||||
|
else:
|
||||||
|
dbs = [conf.db]
|
||||||
|
else:
|
||||||
|
if not len(kb.data.cachedDbs):
|
||||||
|
dbs = self.getDbs()
|
||||||
|
else:
|
||||||
|
dbs = kb.data.cachedDbs
|
||||||
|
|
||||||
if kb.unionPosition is not None or conf.direct:
|
if kb.unionPosition is not None or conf.direct:
|
||||||
query = rootQuery.inband.query
|
query = rootQuery.inband.query
|
||||||
condition = rootQuery.inband.condition
|
condition = rootQuery.inband.condition if 'condition' in rootQuery.inband else None
|
||||||
|
|
||||||
|
if condition:
|
||||||
if conf.db and kb.dbms != DBMS.SQLITE:
|
if conf.db and kb.dbms != DBMS.SQLITE:
|
||||||
if "," in conf.db:
|
if "," in conf.db:
|
||||||
dbs = conf.db.split(",")
|
dbs = conf.db.split(",")
|
||||||
|
@ -766,6 +778,8 @@ class Enumeration:
|
||||||
infoMsg = "skipping system databases '%s'" % ", ".join(db for db in self.excludeDbsList)
|
infoMsg = "skipping system databases '%s'" % ", ".join(db for db in self.excludeDbsList)
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
if kb.dbms in (DBMS.MSSQL, DBMS.SYBASE):
|
||||||
|
query = safeStringFormat(query, conf.db)
|
||||||
value = inject.getValue(query, blind=False, error=False)
|
value = inject.getValue(query, blind=False, error=False)
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
|
@ -787,17 +801,6 @@ class Enumeration:
|
||||||
kb.data.cachedTables[db].append(table)
|
kb.data.cachedTables[db].append(table)
|
||||||
|
|
||||||
if not kb.data.cachedTables and not conf.direct:
|
if not kb.data.cachedTables and not conf.direct:
|
||||||
if conf.db:
|
|
||||||
if "," in conf.db:
|
|
||||||
dbs = conf.db.split(",")
|
|
||||||
else:
|
|
||||||
dbs = [conf.db]
|
|
||||||
else:
|
|
||||||
if not len(kb.data.cachedDbs):
|
|
||||||
dbs = self.getDbs()
|
|
||||||
else:
|
|
||||||
dbs = kb.data.cachedDbs
|
|
||||||
|
|
||||||
for db in dbs:
|
for db in dbs:
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user