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.0.0.tar.gz (7.7 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.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyvaultrce-2.0.0.tar.gz
Algorithm Hash digest
SHA256 529fd0f2420f380f32c05fbc5d1109f171a582dffc36b4b0246e79cf2b7a846f
MD5 b1eb31d3d2e1c3de1e31aa43dde5dd3b
BLAKE2b-256 dbd302f94727bc63d44f431a1802b7e464bcbf74a79b21635097bf00e0b9ca8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyvaultrce-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c73820322eeae28665fe5d163e9f7c96d33f6db844a111d78dc2ba3243eb6e4
MD5 7b1b558b9e024ea5d21d4d01728a4ecf
BLAKE2b-256 5d60ce0fc001bf8502ac0b4272f97e8d618e98c2533fc0e4905dd7d17f43e744

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