Skip to main content

Parasitic Computing Framework

Project description


BrainSlug is a work in progress. Code may change rapidly in incompatible manners. Any question, please drop us an issue License Apache

BrainSlug is a framework for parasitic computing. Allowing you to write programs which code and logic live in a computer but actions or side-effects are performed on another.


from brainslug import run, slug, body

@slug(remote=body.platform == 'linux')
def get_root_shell(remote):
    with'/etc/passwd', 'r') as passwd:
        for line in passwd:
            if line.startswith('root'):
                return line.split(':')[-1]


This code should be run in a computer we call slug. Running this code will open the port 8080 and stop execution until a body connects to it.

To connect a body, in a remote system run the following:

$ curl http://<slug-ip>:8080/boot/python | python

This will spawn the body to life and connect it with the slug.

The program continues running in the slug, but the file reads are performed in the body.

More examples on the example section.

Project details

Download files

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

Source Distribution

brainslug-0.0.2.tar.gz (6.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page