|
11 | 11 | import time |
12 | 12 |
|
13 | 13 | from lib.core.common import clearConsoleLine |
14 | | -from lib.core.common import dataToSessionFile |
15 | 14 | from lib.core.common import dataToStdout |
16 | 15 | from lib.core.common import filterListValue |
17 | 16 | from lib.core.common import getFileItems |
|
28 | 27 | from lib.core.data import kb |
29 | 28 | from lib.core.data import logger |
30 | 29 | from lib.core.enums import DBMS |
| 30 | +from lib.core.enums import HASHDB_KEYS |
31 | 31 | from lib.core.exception import sqlmapDataException |
32 | 32 | from lib.core.exception import sqlmapMissingMandatoryOptionException |
33 | 33 | from lib.core.exception import sqlmapThreadException |
@@ -103,10 +103,6 @@ def tableExistsThread(): |
103 | 103 | threadData.shared.outputs.append(table) |
104 | 104 | threadData.shared.unique.add(table.lower()) |
105 | 105 |
|
106 | | - dataToSessionFile("[%s][%s][%s][TABLE_EXISTS][%s]\n" % (conf.url,\ |
107 | | - kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]),\ |
108 | | - safeFormatString(fullTableName))) |
109 | | - |
110 | 106 | if conf.verbose in (1, 2): |
111 | 107 | clearConsoleLine(True) |
112 | 108 | infoMsg = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), table) |
@@ -139,6 +135,12 @@ def tableExistsThread(): |
139 | 135 | else: |
140 | 136 | kb.data.cachedTables[conf.db].append(item) |
141 | 137 |
|
| 138 | + for _ in map(lambda x: (conf.db, x), threadData.shared.outputs): |
| 139 | + if _ not in kb.brute.tables: |
| 140 | + kb.brute.tables.append(_) |
| 141 | + |
| 142 | + conf.hashDB.write(HASHDB_KEYS.KB_BRUTE_TABLES, kb.brute.tables, True) |
| 143 | + |
142 | 144 | return kb.data.cachedTables |
143 | 145 |
|
144 | 146 | def columnExists(columnFile, regex=None): |
@@ -230,10 +232,12 @@ def columnExistsThread(): |
230 | 232 | else: |
231 | 233 | columns[column] = 'non-numeric' |
232 | 234 |
|
233 | | - dataToSessionFile("[%s][%s][%s][COLUMN_EXISTS][%s|%s %s]\n" % (conf.url, kb.injection.place,\ |
234 | | - safeFormatString(conf.parameters[kb.injection.place]), safeFormatString(table),\ |
235 | | - safeFormatString(column), safeFormatString(columns[column]))) |
236 | | - |
237 | 235 | kb.data.cachedColumns[conf.db] = {conf.tbl: columns} |
238 | 236 |
|
| 237 | + for _ in map(lambda x: (conf.db, conf.tbl, x[0], x[1]), columns.items()): |
| 238 | + if _ not in kb.brute.columns: |
| 239 | + kb.brute.columns.append(_) |
| 240 | + |
| 241 | + conf.hashDB.write(HASHDB_KEYS.KB_BRUTE_COLUMNS, kb.brute.columns, True) |
| 242 | + |
239 | 243 | return kb.data.cachedColumns |
0 commit comments