mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-24 07:02:23 +02:00
switch enum.Enum to enum.IntEnum
This commit is contained in:
@@ -41,7 +41,7 @@ class RegValueTypes(enum.Enum):
|
||||
except ValueError:
|
||||
return cls(RegValueTypes.REG_UNKNOWN)
|
||||
|
||||
class RegKeyFlags(enum.Enum):
|
||||
class RegKeyFlags(enum.IntEnum):
|
||||
KEY_IS_VOLATILE = 0x01
|
||||
KEY_HIVE_EXIT = 0x02
|
||||
KEY_HIVE_ENTRY = 0x04
|
||||
@@ -53,20 +53,6 @@ class RegKeyFlags(enum.Enum):
|
||||
KEY_VIRT_TARGET = 0x100
|
||||
KEY_VIRTUAL_STORE= 0x200
|
||||
|
||||
def __and__(self, other):
|
||||
if self.__class__ is other.__class__:
|
||||
return self.value & other.value
|
||||
elif issubclass(other.__class__, int):
|
||||
return self.value & other
|
||||
return NotImplemented
|
||||
|
||||
def __eq__(self, other):
|
||||
if self.__class__ is other.__class__:
|
||||
return self.value == other.value
|
||||
elif issubclass(other.__class__, int):
|
||||
return self.value == other
|
||||
return NotImplemented
|
||||
|
||||
class _HMAP_ENTRY(objects.Struct):
|
||||
def get_block_offset(self) -> int:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user