MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / modules

Method modules

windows/winobject/process.py:1307–1319  ·  view source on GitHub ↗

The loaded modules present in the PEB :type: [:class:`LoadedModule`] -- List of loaded modules

(self)

Source from the content-addressed store, hash-verified

1305
1306 @property
1307 def modules(self):
1308 """The loaded modules present in the PEB
1309
1310 :type: [:class:`LoadedModule`] -- List of loaded modules
1311 """
1312 res = []
1313 list_entry_ptr = ctypes.cast(self.Ldr.contents.InMemoryOrderModuleList.Flink, LIST_ENTRY_PTR)
1314 current_dll = list_entry_ptr.TO_LDR_ENTRY()
1315 while current_dll.DllBase:
1316 res.append(current_dll)
1317 list_entry_ptr = ctypes.cast(current_dll.InMemoryOrderLinks.Flink, LIST_ENTRY_PTR)
1318 current_dll = list_entry_ptr.TO_LDR_ENTRY()
1319 return [LoadedModule.from_address(addressof(LDR)) for LDR in res]
1320
1321 @staticmethod
1322 def _extract_environment(env_block_addr, target):

Callers

nothing calls this directly

Calls 2

castMethod · 0.80
TO_LDR_ENTRYMethod · 0.80

Tested by

no test coverage detected