Tools for injecting arbitrary code into running Python processes.
- gdb (version 7.3+ (or RHEL5+))
Pyrasite works with Python 2.4 and newer. Injection works between versions as well, so you can run Pyrasite under Python 3 and inject into 2, and vice versa.
usage: pyrasite [-h] [--gdb-prefix GDB_PREFIX] [--verbose] [--output OUTPUT_TYPE] pid [filepath|payloadname]
pyrasite - inject code into a running python process
pid The ID of the process to inject code into
filepath|payloadname The second argument must be a path to a
file that will be sent as a payload to the
target process or it must be the name of
an existing payload (see --list-payloads).
-h, --help show this help message and exit
GDB prefix (if specified during installation)
--verbose Verbose mode
--output OUTPUT_TYPE This option controls where the output from
the executed payload will be printed. If
the value is 'procstreams' (the default) then
the output is sent to the stdout/stderr of the
process. If the value is 'localterm' then the
output is piped back and printed on the local
terminal where pyrasite is being run.
--list-payloads List payloads that are delivered by pyrasite
For updates, visit https://github.com/lmacken/pyrasite
The graphical interface can be found here: https://github.com/lmacken/pyrasite-gui
- Python debuginfo (needed for live object inspection)
- PyGObject3 Introspection bindings
- meliae (easy_install/pip may not work for this install. If not, use the tarball from the distribution website. You may need to install Cython in order to get meliae to build)
|irc:||#pyrasite on Freenode|