()
| 243 | threadData.shared.files = [] |
| 244 | |
| 245 | def columnExistsThread(): |
| 246 | threadData = getCurrentThreadData() |
| 247 | |
| 248 | while kb.threadContinue: |
| 249 | kb.locks.count.acquire() |
| 250 | |
| 251 | if threadData.shared.count < threadData.shared.limit: |
| 252 | column = safeSQLIdentificatorNaming(columns[threadData.shared.count]) |
| 253 | threadData.shared.count += 1 |
| 254 | kb.locks.count.release() |
| 255 | else: |
| 256 | kb.locks.count.release() |
| 257 | break |
| 258 | |
| 259 | if Backend.isDbms(DBMS.MCKOI): |
| 260 | result = inject.checkBooleanExpression(safeStringFormat("0<(SELECT COUNT(%s) FROM %s)", (column, table))) |
| 261 | else: |
| 262 | result = inject.checkBooleanExpression(safeStringFormat(BRUTE_COLUMN_EXISTS_TEMPLATE, (column, table))) |
| 263 | |
| 264 | kb.locks.io.acquire() |
| 265 | |
| 266 | if result: |
| 267 | threadData.shared.files.append(column) |
| 268 | |
| 269 | if conf.verbose in (1, 2) and not conf.api: |
| 270 | clearConsoleLine(True) |
| 271 | infoMsg = "[%s] [INFO] retrieved: %s\n" % (time.strftime("%X"), unsafeSQLIdentificatorNaming(column)) |
| 272 | dataToStdout(infoMsg, True) |
| 273 | |
| 274 | if conf.verbose in (1, 2): |
| 275 | status = "%d/%d items (%d%%)" % (threadData.shared.count, threadData.shared.limit, round(100.0 * threadData.shared.count / threadData.shared.limit)) |
| 276 | dataToStdout("\r[%s] [INFO] tried %s" % (time.strftime("%X"), status), True) |
| 277 | |
| 278 | kb.locks.io.release() |
| 279 | |
| 280 | try: |
| 281 | runThreads(conf.threads, columnExistsThread, threadChoice=True) |
nothing calls this directly
no test coverage detected
searching dependent graphs…