From 87d0f97f52d74521f2100410b01ac3a1f6a4a9c3 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Wed, 23 May 2018 19:41:40 +0100 Subject: [PATCH] Remove the unnecessary exception and add in a better one. --- volatility/plugins/windows/printkey.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/volatility/plugins/windows/printkey.py b/volatility/plugins/windows/printkey.py index ed6b2d6a9..7dfd0b893 100644 --- a/volatility/plugins/windows/printkey.py +++ b/volatility/plugins/windows/printkey.py @@ -108,9 +108,8 @@ class PrintKey(plugins.PluginInterface): else: node_path = [hive.get_node(hive.root_cell_offset)] yield from self.hive_walker(hive, node_path) - except exceptions.StructureException: - # This is caused when the RegistryHive has no size (BaseBlock.Length <= 0) - pass + except exceptions.PagedInvalidAddressException as excp: + vollog.debug("Invalid address identified in Hive: {}".format(hex(excp.invalid_address))) def run(self):