Skip to main content

Reverse PTY shell over WebSocket

Project description

revpty

Reverse PTY shell over WebSocket.

Installation

pip install revpty

Usage

1. Start server:

revpty-server --host 0.0.0.0 --port 8765

2. Start client (on target machine):

revpty-client --server ws://your-server:8765 --session my-session

3. Attach to PTY (from your machine):

revpty-attach --server ws://your-server:8765 --session my-session

Cloudflare Access Authentication

If your server is protected by Cloudflare Zero Trust with Service Token authentication:

revpty-client --server wss://your-server:8765 --session my-session \
    --cf-client-id YOUR_CLIENT_ID.access \
    --cf-client-secret YOUR_CLIENT_SECRET

Same for attach:

revpty-attach --server wss://your-server:8765 --session my-session \
    --cf-client-id YOUR_CLIENT_ID.access \
    --cf-client-secret YOUR_CLIENT_SECRET

The client will send CF-Access-Client-Id and CF-Access-Client-Secret headers during WebSocket connection.

Features

  • WebSocket-based PTY relay
  • Session-based routing
  • Reconnect support
  • HTTP proxy support for client
  • Cloudflare Access Service Token authentication
  • Minimal architecture

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

revpty-0.5.7.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

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

revpty-0.5.7-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

Details for the file revpty-0.5.7.tar.gz.

File metadata

  • Download URL: revpty-0.5.7.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for revpty-0.5.7.tar.gz
Algorithm Hash digest
SHA256 8bc9c7fdf12a8d21717724f9ab4d1e02d7770ed8de09d970f2b8cb4036caced9
MD5 98050e4d3fbcd2e9d220c6a186ddb0f8
BLAKE2b-256 4cad9ebd13463acde876d669c22bcaff76a2fda0d7b1861241b7a14cffe316de

See more details on using hashes here.

File details

Details for the file revpty-0.5.7-py3-none-any.whl.

File metadata

  • Download URL: revpty-0.5.7-py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for revpty-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 949fbb253d6fdf251322cc3585fb9302875ca8f796f91b79f28b8951a104e868
MD5 0180f2b601e063268f8b230a8c189d55
BLAKE2b-256 d3fcfe4ee261a627e1fab035262f29a8d8ba767df0878d309d4dd35ee6e0fbeb

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