Skip to main content

Parasitic Computing Framework

Project description

https://raw.githubusercontent.com/BBVA/brainslug/master/assets/images/brainslug.png https://img.shields.io/pypi/v/brainslug.svg https://img.shields.io/circleci/project/github/BBVA/brainslug/master.svg https://readthedocs.org/projects/brainslug/badge/?version=latest 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.

Example:

from brainslug import run, slug, body

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

run(get_root_shell)

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 details)

Uploaded Source

File details

Details for the file brainslug-0.0.2.tar.gz.

File metadata

  • Download URL: brainslug-0.0.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for brainslug-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8d86310a0538d5126d54a74c7195044a328f2ac2d31698921ca573fc2f9b0017
MD5 f4bbb9b0c3b2bb70861b7a1395350a92
BLAKE2b-256 1139f9fa740ce001316639b429c8ac1f5d4cd8155608e0cd933dd33c3feadd7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page