Add in flag to forcibly disable all multithreaded scanning.

This commit is contained in:
Mike Auty
2017-06-03 17:48:32 +01:00
parent 9a2bfe7c92
commit c862f38917
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -9,6 +9,7 @@ import sys
PLUGINS_PATH = [os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "plugins"))]
BANG = "!"
PACKAGE_VERSION = "3.0.0_alpha1"
DISABLE_MULTITHREADED_SCANNING = False
LOGLEVEL_V = 9
LOGLEVEL_VV = 8
+2 -2
View File
@@ -8,7 +8,7 @@ import math
import multiprocessing
from abc import ABCMeta, abstractmethod, abstractproperty
from volatility.framework import exceptions, validity
from volatility.framework import constants, exceptions, validity
from volatility.framework.interfaces import configuration, context
vollog = logging.getLogger(__name__)
@@ -186,7 +186,7 @@ class DataLayerInterface(configuration.ConfigurableInterface, validity.ValidityR
scan_iterator = functools.partial(self._scan_iterator, scanner, min_address, max_address)
scan_chunk = functools.partial(self._scan_chunk, scanner, min_address, max_address, progress)
scan_metric = functools.partial(self._scan_metric, scanner, min_address, max_address)
if scanner.thread_safe:
if scanner.thread_safe and constants.DISABLE_MULTITHREADED_SCANNING:
with multiprocessing.Pool() as pool:
result = pool.map_async(scan_chunk, scan_iterator())
while not result.ready():