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.
You can download the latest tarballs, RPMs, and debs from PyPi. Installing the package specific to your distribution is recommended. However, you
can also install it using
pip if you wish
pip install pyrasite pyrasite-gui
pyrasite-gui for instructions on installing the graphical interface
Additional installation notes¶
If you’re using Fedora 17 or later, you’ll need to disable an SELinux boolean to allow ptrace.
sudo setsebool -P deny_ptrace=off
Mac OS X¶
If you don’t want to override Apple’s default gdb, install the latest version of gdb with a prefix (e.g. gnu)
$ ./configure --program-prefix=gnu $ pyrasite <PID> payloads/reverse_python_shell.py --gdb-prefix="gnu"
You can install pyrasite from the Arch User Repository If you want python debugging symbols, you may have to self compile python2.