Prevent duplicate processing of the same file object

This commit is contained in:
atcuno
2024-05-08 11:23:01 -05:00
parent 1c5c57e155
commit 3f3f1a9c0d
@@ -244,6 +244,8 @@ class DumpFiles(interfaces.plugins.PluginInterface):
symbol_table=kernel.symbol_table_name,
)
dumped_files = set()
for proc in procs:
try:
object_table = proc.ObjectTable
@@ -267,6 +269,10 @@ class DumpFiles(interfaces.plugins.PluginInterface):
if not file_re.search(name):
continue
if file_obj.vol.offset in dumped_files:
continue
dumped_files.add(file_obj.vol.offset)
for result in self.process_file_object(
self.context, kernel.layer_name, self.open, file_obj
):
@@ -303,6 +309,10 @@ class DumpFiles(interfaces.plugins.PluginInterface):
if not file_re.search(name):
continue
if file_obj.vol.offset in dumped_files:
continue
dumped_files.add(file_obj.vol.offset)
for result in self.process_file_object(
self.context, kernel.layer_name, self.open, file_obj
):