Skip to content

enhancement: add undo for hooks and detours #10

Description

@gynt

It could be useful to undo detours and hooka. Currently there is no interface for that yet.

The undo for detours and hooks is identical:

  1. read hookSize bytes from the new function address. These are the original bytes.
  2. copy these bytes into the original function at originalFunctionAddress. Effectively removing the jump.
  3. deallocate the new function address.
  4. dereference (lua_unref) the lua hook/detour function.

The interface would be:

rps.unhookCode(address)
rps.undetourCode(address)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions