Linux: update sockscan to add docstring to _find_file_ops_needles

This commit is contained in:
eve
2025-12-31 12:54:41 +00:00
parent 66ec4f4372
commit 94f989be7a
@@ -151,6 +151,16 @@ class Sockscan(plugins.PluginInterface):
return memory_layer_name
def _find_file_ops_needles(self, kernel_module_name: str):
"""Retrieves socket file symbols and the offset to the 'f_op' pointer.
Args:
kernel_module_name (str): The name of the kernel module to search.
Returns:
Tuple[List[int], int]: A list of file symbol addresses and,
the offset to the 'f_op' pointer.
"""
# get vmlinux module from context in order to read symbols
vmlinux = self.context.modules[kernel_module_name]