mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Skipping quit exception in case of --search
This commit is contained in:
parent
e19b097ab5
commit
ea4cef9c6d
|
@ -152,7 +152,7 @@ class Enumeration(GenericEnumeration):
|
||||||
warnMsg += "for database '%s'" % db
|
warnMsg += "for database '%s'" % db
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
if not kb.data.cachedTables:
|
if not kb.data.cachedTables and not conf.search:
|
||||||
errMsg = "unable to retrieve the tables for any database"
|
errMsg = "unable to retrieve the tables for any database"
|
||||||
raise SqlmapNoneDataException(errMsg)
|
raise SqlmapNoneDataException(errMsg)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -358,7 +358,7 @@ class Databases:
|
||||||
if bruteForce is None:
|
if bruteForce is None:
|
||||||
logger.error(errMsg)
|
logger.error(errMsg)
|
||||||
return self.getTables(bruteForce=True)
|
return self.getTables(bruteForce=True)
|
||||||
else:
|
elif not conf.search:
|
||||||
raise SqlmapNoneDataException(errMsg)
|
raise SqlmapNoneDataException(errMsg)
|
||||||
else:
|
else:
|
||||||
for db, tables in kb.data.cachedTables.items():
|
for db, tables in kb.data.cachedTables.items():
|
||||||
|
@ -432,10 +432,12 @@ class Databases:
|
||||||
tblList = tblList[0]
|
tblList = tblList[0]
|
||||||
|
|
||||||
tblList = list(tblList)
|
tblList = list(tblList)
|
||||||
else:
|
elif not conf.search:
|
||||||
errMsg = "unable to retrieve the tables "
|
errMsg = "unable to retrieve the tables "
|
||||||
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||||
raise SqlmapNoneDataException(errMsg)
|
raise SqlmapNoneDataException(errMsg)
|
||||||
|
else:
|
||||||
|
return kb.data.cachedColumns
|
||||||
|
|
||||||
tblList = filter(None, (safeSQLIdentificatorNaming(_, True) for _ in tblList))
|
tblList = filter(None, (safeSQLIdentificatorNaming(_, True) for _ in tblList))
|
||||||
|
|
||||||
|
|
|
@ -89,10 +89,12 @@ class Entries:
|
||||||
|
|
||||||
if isinstance(tblList[0], (set, tuple, list)):
|
if isinstance(tblList[0], (set, tuple, list)):
|
||||||
tblList = tblList[0]
|
tblList = tblList[0]
|
||||||
else:
|
elif not conf.search:
|
||||||
errMsg = "unable to retrieve the tables "
|
errMsg = "unable to retrieve the tables "
|
||||||
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||||
raise SqlmapNoneDataException(errMsg)
|
raise SqlmapNoneDataException(errMsg)
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
for tbl in tblList:
|
for tbl in tblList:
|
||||||
tblList[tblList.index(tbl)] = safeSQLIdentificatorNaming(tbl, True)
|
tblList[tblList.index(tbl)] = safeSQLIdentificatorNaming(tbl, True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user