Pyjacker
Little framework to hijack library functions and create hooks in python language
Install / Use
/learn @rugginoso/PyjackerREADME
Pyjacker
Pyjacker is a little framework to hijack library functions and create hooks in python language.
Instructions
- Create your hooks python module, for example:
from ctypes import * import pyjacker
libc = CDLL('libc.so.6')
@pyjacker.hook('ssize_t write(int fd, const void* buf, size_t count)', ctypes_ret_type=c_long, ctypes_args=(c_int, c_void_p, c_ulong)) def write(fd, buf, count): print "hooking write" print fd print buf print count
return libc.write(fd, buf, count)
if name == "main": import sys pyjacker.launch(sys.argv[1:], file)
- Launch your hooks file with your program and its args:
$ python hooks.py program arg1 arg2
