A cross-platform tool/library allowing dynamic library injection into running processes. If you are looking for a way to inject python code into a running process, try the hypno library.
Pyinjector has no external python dependencies. It is implemented as a python wrapper for kubo/injector.
pip install pyinjector
Both source distributions, manylinux2010
wheels and windows wheels are uploaded to Pypi for every release.
inject <pid> <path/to/shared/library>
from pyinjector import inject
inject(pid, path_to_so_file)
We build kubo/injector as a C-extension and use its interface using ctypes
.
kubo/injector is an awesome repo allowing to inject shared libraries into running
processes both on Windows (CreateRemoteThread
), Linux (ptrace
), and Mac (task_for_pid
).