Skip to content

Instantly share code, notes, and snippets.

@tahaconfiant
Created December 10, 2019 09:03
Show Gist options
  • Save tahaconfiant/2e042d795ade2835ee105720b9d58dc5 to your computer and use it in GitHub Desktop.
Save tahaconfiant/2e042d795ade2835ee105720b9d58dc5 to your computer and use it in GitHub Desktop.
fork-breakpoint
# global variables
# this variable stores original bytes of the child process before the patch
backup_bytes = 0
# this is the "child entry-point"
patch_address = 0x10000ac87
def custom_breakpoints(debugger, command, result, internal_dict):
target = debugger.GetSelectedTarget()
breakpoint = target.BreakpointCreateByName("fork")
breakpoint.SetScriptCallbackFunction('follow_fork_child.fork_callback')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment