(self, bruteForce=None)
| 211 | return kb.data.cachedDbs |
| 212 | |
| 213 | def getTables(self, bruteForce=None): |
| 214 | if len(kb.data.cachedTables) > 0: |
| 215 | return kb.data.cachedTables |
| 216 | |
| 217 | self.forceDbmsEnum() |
| 218 | |
| 219 | if bruteForce is None: |
| 220 | if Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema: |
| 221 | warnMsg = "information_schema not available, " |
| 222 | warnMsg += "back-end DBMS is MySQL < 5.0" |
| 223 | logger.warning(warnMsg) |
| 224 | bruteForce = True |
| 225 | |
| 226 | elif Backend.getIdentifiedDbms() in (DBMS.MCKOI, DBMS.EXTREMEDB, DBMS.RAIMA): |
| 227 | bruteForce = True |
| 228 | |
| 229 | elif Backend.getIdentifiedDbms() in (DBMS.ACCESS,): |
| 230 | try: |
| 231 | tables = self.getTables(False) |
| 232 | except SqlmapNoneDataException: |
| 233 | tables = None |
| 234 | |
| 235 | if not tables: |
| 236 | warnMsg = "cannot retrieve table names, " |
| 237 | warnMsg += "back-end DBMS is %s" % Backend.getIdentifiedDbms() |
| 238 | logger.warning(warnMsg) |
| 239 | bruteForce = True |
| 240 | else: |
| 241 | return tables |
| 242 | |
| 243 | if conf.db == CURRENT_DB: |
| 244 | conf.db = self.getCurrentDb() |
| 245 | |
| 246 | if conf.db and Backend.getIdentifiedDbms() in UPPER_CASE_DBMSES: |
| 247 | conf.db = conf.db.upper() |
| 248 | |
| 249 | if conf.db: |
| 250 | dbs = conf.db.split(',') |
| 251 | else: |
| 252 | dbs = self.getDbs() |
| 253 | |
| 254 | dbs = [_ for _ in dbs if _ and _.strip()] |
| 255 | |
| 256 | for db in dbs: |
| 257 | dbs[dbs.index(db)] = safeSQLIdentificatorNaming(db) |
| 258 | |
| 259 | if bruteForce: |
| 260 | resumeAvailable = False |
| 261 | |
| 262 | for db, table in kb.brute.tables: |
| 263 | if db == conf.db: |
| 264 | resumeAvailable = True |
| 265 | break |
| 266 | |
| 267 | if resumeAvailable and not conf.freshQueries: |
| 268 | for db, table in kb.brute.tables: |
| 269 | if db == conf.db: |
| 270 | if conf.db not in kb.data.cachedTables: |
no test coverage detected