diff --git a/lib/core/threads.py b/lib/core/threads.py index b2e4374a6..92da90d24 100644 --- a/lib/core/threads.py +++ b/lib/core/threads.py @@ -41,6 +41,7 @@ class _ThreadData(threading.local): self.lastQueryDuration = 0 self.lastRequestMsg = None self.lastRequestUID = 0 + self.resumed = False self.retriesCount = 0 self.seqMatcher = difflib.SequenceMatcher(None) self.shared = shared diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 07b13e7cb..8a9e9bdf7 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -51,10 +51,11 @@ reqCount = 0 def __oneShotErrorUse(expression, field): global reqCount - threadData = getCurrentThreadData() - retVal = conf.hashDB.retrieve(expression) if not any([conf.flushSession, conf.freshQueries]) else None + threadData = getCurrentThreadData() + threadData.resumed = retVal is not None + offset = 1 chunk_length = None @@ -140,6 +141,8 @@ def __errorFields(expression, expressionFields, expressionFieldsList, expected=N outputs = [] origExpr = None + threadData = getCurrentThreadData() + for field in expressionFieldsList: output = None @@ -171,7 +174,7 @@ def __errorFields(expression, expressionFields, expressionFieldsList, expected=N if output is not None: kb.locks.ioLock.acquire() - dataToStdout("[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), safecharencode(output))) + dataToStdout("[%s] [INFO] %s: %s\r\n" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", safecharencode(output))) kb.locks.ioLock.release() if isinstance(num, int): diff --git a/lib/techniques/union/use.py b/lib/techniques/union/use.py index bf30e2957..2472351a8 100644 --- a/lib/techniques/union/use.py +++ b/lib/techniques/union/use.py @@ -46,13 +46,15 @@ from lib.request.connect import Connect as Request from lib.utils.resume import resume reqCount = 0 -resumed = False def __oneShotUnionUse(expression, unpack=True, limited=False): global reqCount retVal = conf.hashDB.retrieve(expression) if not any([conf.flushSession, conf.freshQueries]) else None + threadData = getCurrentThreadData() + threadData.resumed = retVal is not None + if retVal is None: check = "(?P%s.*%s)" % (kb.chars.start, kb.chars.stop) trimcheck = "%s(?P.*?) width: status = "%s..." % status[:width - 3]