Created
October 4, 2012 20:19
-
-
Save jedisct1/3836158 to your computer and use it in GitHub Desktop.
ptrace interposing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/ptrace.h> | |
int ptrace_interposed(int request, pid_t pid, caddr_t addr, int data) | |
{ | |
return 0; | |
} | |
const struct { void *hook_func; void *real_func; } | |
interposers[] __attribute__ ((section("__DATA, __interpose"))) = { | |
{ ptrace_interposed, ptrace } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment