(self, foundData=None)
| 61 | pass |
| 62 | |
| 63 | def dumpTable(self, foundData=None): |
| 64 | self.forceDbmsEnum() |
| 65 | |
| 66 | if conf.db is None or conf.db == CURRENT_DB: |
| 67 | if conf.db is None: |
| 68 | warnMsg = "missing database parameter. sqlmap is going " |
| 69 | warnMsg += "to use the current database to enumerate " |
| 70 | warnMsg += "table(s) entries" |
| 71 | logger.warning(warnMsg) |
| 72 | |
| 73 | conf.db = self.getCurrentDb() |
| 74 | |
| 75 | elif conf.db is not None: |
| 76 | if Backend.getIdentifiedDbms() in UPPER_CASE_DBMSES: |
| 77 | conf.db = conf.db.upper() |
| 78 | |
| 79 | if ',' in conf.db: |
| 80 | errMsg = "only one database name is allowed when enumerating " |
| 81 | errMsg += "the tables' columns" |
| 82 | raise SqlmapMissingMandatoryOptionException(errMsg) |
| 83 | |
| 84 | if conf.exclude and re.search(conf.exclude, conf.db, re.I) is not None: |
| 85 | infoMsg = "skipping database '%s'" % unsafeSQLIdentificatorNaming(conf.db) |
| 86 | singleTimeLogMessage(infoMsg) |
| 87 | return |
| 88 | |
| 89 | conf.db = safeSQLIdentificatorNaming(conf.db) or "" |
| 90 | |
| 91 | if conf.tbl: |
| 92 | if Backend.getIdentifiedDbms() in UPPER_CASE_DBMSES: |
| 93 | conf.tbl = conf.tbl.upper() |
| 94 | |
| 95 | tblList = conf.tbl.split(',') |
| 96 | else: |
| 97 | self.getTables() |
| 98 | |
| 99 | if len(kb.data.cachedTables) > 0: |
| 100 | tblList = list(six.itervalues(kb.data.cachedTables)) |
| 101 | |
| 102 | if tblList and isListLike(tblList[0]): |
| 103 | tblList = tblList[0] |
| 104 | elif conf.db and not conf.search: |
| 105 | errMsg = "unable to retrieve the tables " |
| 106 | errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db) |
| 107 | raise SqlmapNoneDataException(errMsg) |
| 108 | else: |
| 109 | return |
| 110 | |
| 111 | for tbl in tblList: |
| 112 | tblList[tblList.index(tbl)] = safeSQLIdentificatorNaming(tbl, True) |
| 113 | |
| 114 | for tbl in tblList: |
| 115 | if kb.dumpKeyboardInterrupt: |
| 116 | break |
| 117 | |
| 118 | if conf.exclude and re.search(conf.exclude, unsafeSQLIdentificatorNaming(tbl), re.I) is not None: |
| 119 | infoMsg = "skipping table '%s'" % unsafeSQLIdentificatorNaming(tbl) |
| 120 | singleTimeLogMessage(infoMsg) |
no test coverage detected