From a05a470347a41bf66fee47ddd2a6e87f620545ab Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Wed, 10 May 2017 17:30:45 +0100 Subject: [PATCH] Fix up some complete and utter daftness, tactfully pointed out by npetroni. --- volatility/framework/automagic/nlpdtbfinder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volatility/framework/automagic/nlpdtbfinder.py b/volatility/framework/automagic/nlpdtbfinder.py index e84bdb167..bd53afe80 100644 --- a/volatility/framework/automagic/nlpdtbfinder.py +++ b/volatility/framework/automagic/nlpdtbfinder.py @@ -67,8 +67,8 @@ class NlpDtbScanner(interfaces.layers.ScannerInterface): # We're going to check all entries, so we don't need to figure out indexes # or cut up any addresses - maxvirtaddr_bits = math.ceil(math.log2(self._layer_class.maximum_address + 1)) - next_table_offset = (entry & ((2 ** (maxvirtaddr_bits + 1)) - 1)) >> self._layer_class.page_size + page_bits = math.ceil(math.log2(self._layer_class.page_size)) + next_table_offset = (entry & self._layer_class.maximum_address) >> page_bits try: next_table = self._physical_layer.read(next_table_offset, self._layer_class.page_size)