comex / inject_and_interpose

like mach_inject
127 stars 53 forks source link

Cannot Hook the Callback functions. #5

Closed rtibdewal closed 11 years ago

rtibdewal commented 13 years ago

Hello there,

If you modify puts() in file testputs.c for using callback mechanism then function hooking does not work.

Below is the source code to test it.

include <stdio.h>

include <unistd.h>

int main() {

typeof(puts) *putting = puts;

while(1) {
    putting("Hi!\n");
    sleep(1);
}

}

rtibdewal commented 11 years ago

In interpose we are using symbol table to hook so we cannot manage function pointers.