From 4dbfdcc9dd2929e7c431884763d155e85de14875 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 1 May 2018 21:21:12 +0100 Subject: [PATCH] Fix up typing and metadata usage. --- volatility/framework/automagic/windows.py | 2 +- volatility/framework/interfaces/configuration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/volatility/framework/automagic/windows.py b/volatility/framework/automagic/windows.py index d6ef8b126..f0b27909c 100644 --- a/volatility/framework/automagic/windows.py +++ b/volatility/framework/automagic/windows.py @@ -315,7 +315,7 @@ class WintelStacker(interfaces.automagic.StackerLayerInterface): if arch not in ['Intel32', 'Intel64']: return None # Set the layer type - layer_type = intel.WindowsIntel + layer_type = intel.WindowsIntel # type: typing.Type if arch == 'Intel64': layer_type = intel.WindowsIntel32e elif base_layer.metadata.get('pae', False): diff --git a/volatility/framework/interfaces/configuration.py b/volatility/framework/interfaces/configuration.py index 2f2761771..7fd9c125c 100644 --- a/volatility/framework/interfaces/configuration.py +++ b/volatility/framework/interfaces/configuration.py @@ -588,7 +588,7 @@ class TranslationLayerRequirement(ConstructableRequirementInterface, Configurabl if value not in context.memory: vollog.log(9, "IndexError - Layer not found in memory space: {}".format(value)) return [path_join(config_path, self.name)] - if self.oses and context.memory[value].os not in self.oses: + if self.oses and context.memory[value].metadata.get('os', None) not in self.oses: vollog.log(9, "TypeError - Layer is not the required OS: {}".format(value)) return [path_join(config_path, self.name)] if (self.architectures and