-
Notifications
You must be signed in to change notification settings - Fork 1
Little framework to hijack library functions and create hooks in python language
License
rugginoso/Pyjacker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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
About
Little framework to hijack library functions and create hooks in python language
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published