diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 940a9b196..497476147 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -333,11 +333,15 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False): try: threadData = getCurrentThreadData() - while threadData.shared.limits and kb.threadContinue: + while kb.threadContinue: kb.locks.limits.acquire() - num = threadData.shared.limits[-1] - del threadData.shared.limits[-1] - kb.locks.limits.release() + if threadData.shared.limits: + num = threadData.shared.limits[-1] + del threadData.shared.limits[-1] + kb.locks.limits.release() + else: + kb.locks.limits.release() + break output = __errorFields(expression, expressionFields, expressionFieldsList, expected, num, resumeValue) diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index 5efc49a23..f77f64318 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -276,11 +276,15 @@ def unionUse(expression, unpack=True, dump=False): try: threadData = getCurrentThreadData() - while threadData.shared.limits and kb.threadContinue: + while kb.threadContinue: kb.locks.limits.acquire() - num = threadData.shared.limits[-1] - del threadData.shared.limits[-1] - kb.locks.limits.release() + if threadData.shared.limits: + num = threadData.shared.limits[-1] + del threadData.shared.limits[-1] + kb.locks.limits.release() + else: + kb.locks.limits.release() + break if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE): field = expressionFieldsList[0]