mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-28 18:20:33 +03:00
minor improvement when --dbs returns no database names (like in many cases with MySQL 4)
This commit is contained in:
parent
5eb7787fc9
commit
af39a441fa
|
@ -692,8 +692,8 @@ class Enumeration:
|
||||||
|
|
||||||
if not isNumPosStrValue(count):
|
if not isNumPosStrValue(count):
|
||||||
errMsg = "unable to retrieve the number of databases"
|
errMsg = "unable to retrieve the number of databases"
|
||||||
raise sqlmapNoneDataException, errMsg
|
logger.error(errMsg)
|
||||||
|
else:
|
||||||
if Backend.getIdentifiedDbms() == DBMS.ORACLE:
|
if Backend.getIdentifiedDbms() == DBMS.ORACLE:
|
||||||
plusOne = True
|
plusOne = True
|
||||||
else:
|
else:
|
||||||
|
@ -713,6 +713,13 @@ class Enumeration:
|
||||||
kb.data.cachedDbs.append(db)
|
kb.data.cachedDbs.append(db)
|
||||||
|
|
||||||
if not kb.data.cachedDbs:
|
if not kb.data.cachedDbs:
|
||||||
|
infoMsg = "falling back to current database"
|
||||||
|
logger.info(infoMsg)
|
||||||
|
self.getCurrentDb()
|
||||||
|
|
||||||
|
if kb.data.currentDb:
|
||||||
|
kb.data.cachedDbs = [kb.data.currentDb]
|
||||||
|
else:
|
||||||
errMsg = "unable to retrieve the database names"
|
errMsg = "unable to retrieve the database names"
|
||||||
raise sqlmapNoneDataException, errMsg
|
raise sqlmapNoneDataException, errMsg
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user