diff --git a/volatility/framework/configuration/depresolver.py b/volatility/framework/configuration/depresolver.py index 83476b88e..e7fd902ca 100644 --- a/volatility/framework/configuration/depresolver.py +++ b/volatility/framework/configuration/depresolver.py @@ -63,7 +63,7 @@ class DependencyResolver(validity.ValidityRoutines): break else: logging.debug( - "Unable to fulfill requirement " + repr(node.requirement) + " - no fulfillable candidates") + "Unable to fulfill requirement " + repr(node.requirement) + " - no fulfillable candidates") return False try: value = context.config[node_path] diff --git a/volatility/framework/configuration/requirements.py b/volatility/framework/configuration/requirements.py index 79926b46a..6b1f7e6c7 100644 --- a/volatility/framework/configuration/requirements.py +++ b/volatility/framework/configuration/requirements.py @@ -18,6 +18,10 @@ class StringRequirement(InstanceRequirement): instance_type = str +class BytesRequirement(InstanceRequirement): + instance_type = bytes + + class TranslationLayerRequirement(config_interface.ConstraintInterface): """Class maintaining the limitations on what sort of address spaces are acceptable""" diff --git a/volatility/framework/layers/physical.py b/volatility/framework/layers/physical.py index 4eae84c0d..ec186d838 100644 --- a/volatility/framework/layers/physical.py +++ b/volatility/framework/layers/physical.py @@ -6,8 +6,8 @@ Created on 6 May 2013 import os.path -import volatility.framework.configuration.requirements -from volatility.framework import interfaces, exceptions, configuration +from volatility.framework import interfaces, exceptions +from volatility.framework.configuration import requirements class BufferDataLayer(interfaces.layers.DataLayerInterface): @@ -48,7 +48,8 @@ class BufferDataLayer(interfaces.layers.DataLayerInterface): @classmethod def get_schema(cls): # No real requirements (only the buffer). Need to figure out if there's a better way of representing this - return [] + return [requirements.BytesRequirement(name = 'buffer', description = "The direct bytes to interact with", + optional = False)] class FileLayer(interfaces.layers.DataLayerInterface): @@ -110,4 +111,4 @@ class FileLayer(interfaces.layers.DataLayerInterface): @classmethod def get_schema(cls): - return [volatility.framework.configuration.requirements.StringRequirement(name = 'filename', optional = False)] + return [requirements.StringRequirement(name = 'filename', optional = False)]