def unhotpatch(source):
source = cast(source, c_void_p).value
old = DWORD()
if windll.kernel32.VirtualProtect(source, 2, PAGE_EXECUTE_READWRITE, byref(old)):
try:
written = c_size_t()
windll.kernel32.WriteProcessMemory(-1, source, cast(b'\x8B\xFF', c_char_p), 2, byref(written))
finally:
windll.kernel32.VirtualProtect(source, 2, old, byref(old))
评论列表
文章目录