MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / errorThread

Function errorThread

lib/techniques/error/use.py:410–440  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

408
409 try:
410 def errorThread():
411 threadData = getCurrentThreadData()
412
413 while kb.threadContinue:
414 with kb.locks.limit:
415 try:
416 threadData.shared.counter += 1
417 num = next(threadData.shared.limits)
418 except StopIteration:
419 break
420
421 output = _errorFields(expression, expressionFields, expressionFieldsList, num, emptyFields, threadData.shared.showEta)
422
423 if not kb.threadContinue:
424 break
425
426 if output and isListLike(output) and len(output) == 1:
427 output = unArrayizeValue(output)
428
429 with kb.locks.value:
430 index = None
431 if threadData.shared.showEta:
432 threadData.shared.progress.progress(threadData.shared.counter)
433 for index in xrange(1 + len(threadData.shared.buffered)):
434 if index < len(threadData.shared.buffered) and threadData.shared.buffered[index][0] >= num:
435 break
436 threadData.shared.buffered.insert(index or 0, (num, output))
437 while threadData.shared.buffered and threadData.shared.lastFlushed + 1 == threadData.shared.buffered[0][0]:
438 threadData.shared.lastFlushed += 1
439 threadData.shared.value.append(threadData.shared.buffered[0][1])
440 del threadData.shared.buffered[0]
441
442 runThreads(numThreads, errorThread)
443

Callers

nothing calls this directly

Calls 8

getCurrentThreadDataFunction · 0.90
isListLikeFunction · 0.90
unArrayizeValueFunction · 0.90
_errorFieldsFunction · 0.85
xrangeClass · 0.85
progressMethod · 0.80
insertMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…