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

Method enable

windows/hooks.py:82–87  ·  view source on GitHub ↗

Enable the IAT hook: you MUST keep a reference to the IATHook while the hook is enabled

(self)

Source from the content-addressed store, hash-verified

80 return res
81
82 def enable(self):
83 """Enable the IAT hook: you MUST keep a reference to the IATHook while the hook is enabled"""
84 with utils.VirtualProtected(self.entry.addr, ctypes.sizeof(PVOID), PAGE_EXECUTE_READWRITE):
85 self.entry.value = self.stub_addr
86 self.is_enable = True
87 self.entry.enabled = True
88
89 def disable(self):
90 """Disable the IAT hook"""

Callers 1

set_hookMethod · 0.95

Calls 1

sizeofMethod · 0.45

Tested by

no test coverage detected