Skip to content

Commit

Permalink
catch the KeyError so we can iterate over all hives for a key path
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Lassalle authored and ikelos committed Jun 16, 2018
1 parent 6cfd3b6 commit 481ea01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion volatility/plugins/windows/printkey.py
Expand Up @@ -103,7 +103,11 @@ def registry_walker(self):

# Walk it
if 'key' in self.config:
node_path = hive.get_key(self.config['key'], return_list = True)
try:
node_path = hive.get_key(self.config['key'], return_list=True)
except KeyError:
vollog.debug("Key {} not found in Hive at offset {}.".format(self.config['key'], hex(hive_offset)))
continue
else:
node_path = [hive.get_node(hive.root_cell_offset)]
yield from self.hive_walker(hive, node_path)
Expand Down

0 comments on commit 481ea01

Please sign in to comment.