parameterize generate_pool_scan() - let plugins choose which contraints to use

plugins can choose from a list of built-ins or they can create their own and pass them into generate_pool_scan()
This commit is contained in:
Michael Ligh
2019-02-07 09:08:32 +00:00
committed by ikelos
parent c1341e6278
commit 33f3f4372c
2 changed files with 33 additions and 10 deletions
@@ -47,9 +47,13 @@ class PsScan(plugins.PluginInterface, timeliner.TimeLinerInterface):
Iterable[interfaces.objects.ObjectInterface]:
"""Scans for processes using the poolscanner module and constraints"""
constraints = poolscanner.PoolScanner.builtin_constraints(symbol_table,
[b'Pro\xe3', b'Proc',])
for result in poolscanner.PoolScanner.generate_pool_scan(context,
layer_name,
symbol_table):
symbol_table,
constraints):
constraint, mem_object, _header = result
if constraint.object_type == "Process":