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.
Metadata
Release files for brainslug 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brainslug-0.0.2.tar.gz | 6.0 kB | Without provenance | Details for brainslug-0.0.2.tar.gz |
Release files / brainslug-0.0.2.tar.gz
| Download URL | brainslug-0.0.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d86310a0538d5126d54a74c7195044a328f2ac2d31698921ca573fc2f9b0017
|
|
BLAKE2b-256 checksum How to use checksums |
1139f9fa740ce001316639b429c8ac1f5d4cd8155608e0cd933dd33c3feadd7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for brainslug 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.