Pyrasite - Tools for Injecting Code Into a Running Python Process


Pyrasite is a library and a set of tools for injecting arbitrary code into running Python processes.

Requirements:

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] pid [filename]

pyrasite - inject code into a running python process

positional arguments:
pid The ID of the process to inject code into
filename The second argument must be a filename

optional arguments:
-h, --help show this help message and exit
--gdb-prefix GDB_PREFIX
GDB prefix (if specified during installation)
--verbose Verbose mode

Pyrasite-GUI

The Pyrasite-GUI is a graphical interface for Pyrasite that lets you easily monitor, analyze, introspect, and alter running Python programs.

Requirements:

  • Python debuginfo (needed for live object inspection)
  • PyGObject3 Introspection bindings
  • WebKitGTK3
  • 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)
  • pycallgraph
  • psutil









Source: www.effecthacking.com
Pyrasite - Tools for Injecting Code Into a Running Python Process Pyrasite - Tools for Injecting Code Into a Running Python Process Reviewed by Unknown on 3:23 AM Rating: 5