(self)
| 990 | kb.data.cachedCounts[safeSQLIdentificatorNaming(db)][int(count)] = [safeSQLIdentificatorNaming(table, True)] |
| 991 | |
| 992 | def getCount(self): |
| 993 | if not conf.tbl: |
| 994 | warnMsg = "missing table parameter, sqlmap will retrieve " |
| 995 | warnMsg += "the number of entries for all database " |
| 996 | warnMsg += "management system databases' tables" |
| 997 | logger.warning(warnMsg) |
| 998 | |
| 999 | elif "." in conf.tbl: |
| 1000 | if not conf.db: |
| 1001 | conf.db, conf.tbl = conf.tbl.split('.', 1) |
| 1002 | |
| 1003 | if conf.tbl is not None and conf.db is None and Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.ACCESS, DBMS.FIREBIRD, DBMS.MCKOI, DBMS.EXTREMEDB): |
| 1004 | warnMsg = "missing database parameter. sqlmap is going to " |
| 1005 | warnMsg += "use the current database to retrieve the " |
| 1006 | warnMsg += "number of entries for table '%s'" % unsafeSQLIdentificatorNaming(conf.tbl) |
| 1007 | logger.warning(warnMsg) |
| 1008 | |
| 1009 | conf.db = self.getCurrentDb() |
| 1010 | |
| 1011 | self.forceDbmsEnum() |
| 1012 | |
| 1013 | if conf.tbl: |
| 1014 | for table in conf.tbl.split(','): |
| 1015 | self._tableGetCount(conf.db, table) |
| 1016 | else: |
| 1017 | self.getTables() |
| 1018 | |
| 1019 | for db, tables in kb.data.cachedTables.items(): |
| 1020 | for table in tables: |
| 1021 | self._tableGetCount(db, table) |
| 1022 | |
| 1023 | return kb.data.cachedCounts |
| 1024 | |
| 1025 | def getStatements(self): |
| 1026 | infoMsg = "fetching SQL statements" |
no test coverage detected