diff --git a/mempodipper.c b/mempodipper.c index dcc037c..cbbb5d0 100644 --- a/mempodipper.c +++ b/mempodipper.c @@ -127,10 +127,8 @@ unsigned long ptrace_address() #endif if (instruction_pointer < upper_bound) { uint32_t instruction = ptrace(PTRACE_PEEKTEXT, child, instruction_pointer, NULL); - int operator = instruction & 0xFF; - if (operator == 0xe8 /* call */) { - int32_t offset = ptrace(PTRACE_PEEKTEXT, child, instruction_pointer + 1, NULL) + 5; - return instruction_pointer + offset; + if ((instruction & 0xffff) == 0x25ff) { + return instruction_pointer; } } }