mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-28 04:24:53 +02:00
Core: Change all 3.5 type hints to variable annotations
This commit is contained in:
@@ -57,7 +57,7 @@ class Lsmod(plugins.PluginInterface):
|
||||
except exceptions.InvalidAddressException:
|
||||
return []
|
||||
|
||||
seen = set() # type: Set
|
||||
seen: Set = set()
|
||||
|
||||
while kmod != 0 and \
|
||||
kmod not in seen and \
|
||||
|
||||
@@ -52,7 +52,7 @@ class Psaux(plugins.PluginInterface):
|
||||
|
||||
task_name = utility.array_to_string(task.p_comm)
|
||||
|
||||
args = [] # type: List[bytes]
|
||||
args: List[bytes] = []
|
||||
|
||||
while argc > 0:
|
||||
try:
|
||||
|
||||
@@ -124,7 +124,7 @@ class PsList(interfaces.plugins.PluginInterface):
|
||||
|
||||
proc = kernel.object_from_symbol(symbol_name = "allproc").lh_first
|
||||
|
||||
seen = {} # type: Dict[int, int]
|
||||
seen: Dict[int, int] = {}
|
||||
while proc is not None and proc.vol.offset != 0:
|
||||
if proc.vol.offset in seen:
|
||||
vollog.log(logging.INFO, "Recursive process list detected (a result of non-atomic acquisition).")
|
||||
@@ -165,7 +165,7 @@ class PsList(interfaces.plugins.PluginInterface):
|
||||
|
||||
queue_entry = kernel.object_from_symbol(symbol_name = "tasks")
|
||||
|
||||
seen = {} # type: Dict[int, int]
|
||||
seen: Dict[int, int] = {}
|
||||
for task in queue_entry.walk_list(queue_entry, "tasks", "task"):
|
||||
if task.vol.offset in seen:
|
||||
vollog.log(logging.INFO, "Recursive process list detected (a result of non-atomic acquisition).")
|
||||
|
||||
Reference in New Issue
Block a user