From ed1320491c71c72adeb3d64148dfdf04492c3e9f Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Fri, 4 Jun 2021 22:19:12 +0100 Subject: [PATCH] Poolscan: Further python 3.6 efficiencies --- volatility3/framework/plugins/windows/poolscanner.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/volatility3/framework/plugins/windows/poolscanner.py b/volatility3/framework/plugins/windows/poolscanner.py index b2ea449ea..297a99412 100644 --- a/volatility3/framework/plugins/windows/poolscanner.py +++ b/volatility3/framework/plugins/windows/poolscanner.py @@ -18,9 +18,7 @@ from volatility3.plugins.windows import handles vollog = logging.getLogger(__name__) -# TODO: When python3.5 is no longer supported, make this enum.IntFlag -# Revisit the page_type signature of PoolConstraint once using enum.IntFlag -class PoolType(enum.IntEnum): +class PoolType(enum.IntFlag): """Class to maintain the different possible PoolTypes The values must be integer powers of 2.""" @@ -37,7 +35,7 @@ class PoolConstraint: tag: bytes, type_name: str, object_type: Optional[str] = None, - page_type: Optional[int] = None, + page_type: Optional[PoolType] = None, size: Optional[Tuple[Optional[int], Optional[int]]] = None, index: Optional[Tuple[Optional[int], Optional[int]]] = None, alignment: Optional[int] = 1,