diff --git a/lib/core/defaults.py b/lib/core/defaults.py index fd64ee4da..9bd96fe74 100644 --- a/lib/core/defaults.py +++ b/lib/core/defaults.py @@ -12,7 +12,7 @@ from lib.core.datatype import AttribDict _defaults = { "timeSec": 5, "googlePage": 1, - "cpuThrottle": 10, + "cpuThrottle": 5, "verbose": 1, "cDel": ";", "delay": 0, diff --git a/lib/core/option.py b/lib/core/option.py index 2cf5b99ba..0ef7f5303 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1397,6 +1397,7 @@ def __setKnowledgeBaseAttributes(flushAll=True): kb.delayCandidates = TIME_DELAY_CANDIDATES * [0] kb.dep = None kb.docRoot = None + kb.dumpMode = False kb.dynamicMarkings = [] kb.dynamicParameters = False kb.endDetection = False diff --git a/lib/request/basic.py b/lib/request/basic.py index d286f3786..3669a8c19 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -209,12 +209,11 @@ def decodePage(page, contentEncoding, contentType): return page def processResponse(page, responseHeaders): - parseResponse(page, responseHeaders) + if not kb.dumpMode: + parseResponse(page, responseHeaders) if conf.parseErrors: msg = extractErrorMessage(page) if msg: logger.info("parsed error message: '%s'" % msg) - - return page diff --git a/lib/request/connect.py b/lib/request/connect.py index 716be2106..7016c265d 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -419,7 +419,7 @@ class Connect: else: debugMsg = "got HTTP error code: %d (%s)" % (code, status) logger.debug(debugMsg) - page = processResponse(page, responseHeaders) + processResponse(page, responseHeaders) return page, responseHeaders except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead), e: @@ -465,7 +465,7 @@ class Connect: finally: socket.setdefaulttimeout(conf.timeout) - page = processResponse(page, responseHeaders) + processResponse(page, responseHeaders) responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status) if responseHeaders: diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 882badde3..659b36cb6 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1549,6 +1549,8 @@ class Enumeration: kb.data.cachedColumns = foundData try: + kb.dumpMode = True + if not safeSQLIdentificatorNaming(conf.db) in kb.data.cachedColumns \ or safeSQLIdentificatorNaming(tbl, True) not in \ kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] \ @@ -1768,6 +1770,9 @@ class Enumeration: errMsg += "'%s'" % e logger.critical(errMsg) + finally: + kb.dumpMode = False + def dumpAll(self): if conf.db is not None and conf.tbl is None: self.dumpTable()