From ef28a9b733b082465b7a4937d5967640bb9851d9 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Fri, 28 Jun 2019 15:31:59 +0100 Subject: [PATCH] Apparently, it wasn't in 3.5, but it throws type-checking errors Python3.6 introduced it, but annoying the type-checker realizes that we're using it like any int (ie, A | B) and throws a wobbly. Really want to see the back of python3.5... Revert "IntFlag is in python-3.5 by default, it's just if the enum34 package is installed that problems happen." This reverts commit 17a0e1eac8144c929047448d673c552b8715366b. --- volatility/framework/plugins/windows/poolscanner.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/volatility/framework/plugins/windows/poolscanner.py b/volatility/framework/plugins/windows/poolscanner.py index 6367ecbfa..50f931d6a 100644 --- a/volatility/framework/plugins/windows/poolscanner.py +++ b/volatility/framework/plugins/windows/poolscanner.py @@ -35,7 +35,8 @@ from volatility.framework.symbols.windows import extensions vollog = logging.getLogger(__name__) -class PoolType(enum.IntFlag): +# TODO: When python3.5 is no longer supported, make this enum.IntFlag +class PoolType(enum.IntEnum): """Class to maintain the different possible PoolTypes The values must be integer powers of 2""" @@ -259,9 +260,9 @@ class PoolScanner(plugins.PluginInterface): # registry hives PoolConstraint( b'CM10', - type_name = symbol_table + constants.BANG + "_CMHIVE", - size = (800, None), - page_type = PoolType.PAGED | PoolType.NONPAGED | PoolType.FREE), + type_name=symbol_table + constants.BANG + "_CMHIVE", + size=(800, None), + page_type=PoolType.PAGED | PoolType.NONPAGED | PoolType.FREE), ] if not tags_filter: