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.2.0.tar.gz (8.9 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.2.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyvaultrce-2.2.0.tar.gz
Algorithm Hash digest
SHA256 664916af7659f890e58d83972c6cd2a0de5914a3d16950f3d23d4a2030378f31
MD5 a36acbc1ecaaba591b8757270964a477
BLAKE2b-256 3e182b5a4b3465b3830f48af320f8a5caaa9c665d2a4363c3e2fff136c6645b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyvaultrce-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ebc6e015499a39b9cde90b8e1d1a4e315a90e63fee112ae8c8db37afe920cb2
MD5 e7a53aff1cced9ca6a6df7771ebc9b3a
BLAKE2b-256 02f58978778c780de0071786258ce44fc216acde286852974c958b61a5d5945c

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