Exemplo n.º 1
0
 def enable(self):
     """Enable the IAT hook: you MUST keep a reference to the IATHook while the hook is enabled"""
     with utils.VirtualProtected(self.entry.addr, ctypes.sizeof(PVOID),
                                 PAGE_EXECUTE_READWRITE):
         self.entry.value = self.stub_addr
     self.is_enable = True
     self.entry.enabled = True
Exemplo n.º 2
0
 def disable(self):
     """Disable the IAT hook"""
     with utils.VirtualProtected(self.entry.addr, ctypes.sizeof(PVOID),
                                 PAGE_EXECUTE_READWRITE):
         self.entry.value = self.entry.nonhookvalue
     self.is_enable = False
     self.entry.enabled = True
Exemplo n.º 3
0
 def enable(self):
     with utils.VirtualProtected(self.entry.addr, ctypes.sizeof(PVOID), PAGE_EXECUTE_READWRITE):
         self.entry.value = self.stub
     self.is_enable = True