Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Inject code into a running Python process

Project description

Injects code into a running Python process.


Example Payloads

Hello World

pyrasite <PID> payloads/

This payload is used by the test suite, which can be run by doing:

python test

Reverse Python Shell

$ python
>>> x = 'foo'
$ pyrasite <PID> payloads/
$ nc -l localhost 9001
Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16)
[GCC 4.6.0 20110331 (Red Hat 4.6.0-2)]
Type 'quit' to exit.
>>> print x

>>> globals()['x'] = 'bar'

Reverse Shell

$ pyrasite <PID> payloads/
$ nc -l localhost 9001
Linux tomservo #1 SMP Tue Aug 16 04:10:59 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Type 'quit' to exit.
% ls

Dumping memory, modules, stacks


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyrasite, version 1.0dev
Filename, size File type Python version Upload date Hashes
Filename, size pyrasite-1.0dev.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page