Enable the IAT hook: you MUST keep a reference to the IATHook while the hook is enabled
(self)
| 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""" |