mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-30 21:44:52 +02:00
Add in an appropriate requirement for BufferLayers.
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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"""
|
||||
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user