Skip to main content

Remote Code Execution & Hosting client for PyVault — source never exposed

Project description

PyVaultRCE

Remote Code Execution & Hosting client for PyVault.

Upload Python scripts to a PyVault server and execute them remotely — the source code never leaves the server. Clients only ever hold a 21-character hex Session ID.

Install

pip install PyVaultRCE

Quick Start

from pyvaultrce import CodeManager

# Upload a local .py file → get Session ID
sid = CodeManager.enc("my_script.py")
# [PyVault] ✓ Uploaded  — Session ID : 3a7f1c9b2d0e8a5f41c7e

# Upload from a paste service URL
sid = CodeManager.enc_url("https://pastebin.com/abcXYZ123")

# Execute remotely (source stays on server)
CodeManager.run(sid)

# Check metadata without incrementing execution counter
CodeManager.info(sid)

# Verify server is up
CodeManager.ping()

Configuration

Set PYVAULT_URL to point at your hosted PyVault server:

export PYVAULT_URL=https://your-server.replit.app

API Reference

Method Description
CodeManager.enc(file_path) Upload a local .py file → returns Session ID
CodeManager.enc_url(url) Download code from a paste URL and upload → returns Session ID
CodeManager.run(session_id) Fetch and execute code by Session ID
CodeManager.info(session_id) Get session metadata (no exec count increment)
CodeManager.ping() Check server connectivity
CodeManager.edit(session_id, file_path, admin_token) Replace stored code (admin only)

Supported Paste Services (enc_url)

  • pastebin.com
  • hastebin.com
  • dpaste.com
  • paste.ofcode.org
  • GitHub raw URLs
  • Any URL returning raw Python text

Error Handling

Exception When
FileNotFoundError Local file not found
ValueError Invalid Session ID or empty file
ConnectionError Server unreachable
TimeoutError Request timed out
RuntimeError Server error (404, 403, 500, etc.)
SyntaxError Remote code syntax error (during run)

Security

  • Session IDs are 21-character cryptographically random hex strings
  • Source code is never written to disk on the client
  • Edit operations require a server-side admin token
  • Regular users cannot modify stored code

License

MIT

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

pyvaultrce-2.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvaultrce-2.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file pyvaultrce-2.1.0.tar.gz.

File metadata

  • Download URL: pyvaultrce-2.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for pyvaultrce-2.1.0.tar.gz
Algorithm Hash digest
SHA256 708fd9872b91821eef6e339177f82bb65b5ed3ec5fa4550b70ca5219ffb9afd8
MD5 d27bc4058b36f0230b14ecb23ce1ca93
BLAKE2b-256 8a4f98b4858f0bcad5a2c578700d920e6d55732a3cd5cbe13683c5cf1a08c1f7

See more details on using hashes here.

File details

Details for the file pyvaultrce-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyvaultrce-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for pyvaultrce-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddd74950964c9e26da5aaf0e4511e70b0621e00a38e0aa0d661e0aee5eafa116
MD5 b3060c1a476447874db50eca4e5309cc
BLAKE2b-256 65f1c7119c1c5165a44cbdadbb127534e21a08dfbfcb0074f24c35fe9161bc42

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