Skip to content

Zedeldi/RCoH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RCoH

GitHub license GitHub last commit Code style: black

Remote Control over HTTP (RCoH).

Description

A Flask application to provide endpoints for viewing and controlling the remote host.

pyautogui is used for all local operations, e.g. mouse clicks, key-presses and display monitoring.

There are four endpoints:

  • / - return client web page
  • /display - return current frame (Base64-encoded)
  • /keypress - press specified key
  • /click - move mouse and click specified button

Using JavaScript, clicks and key-presses are sent to the relevant endpoints with the required data. The current frame (screenshot) is downloaded every 1000/FPS milliseconds, formatted as IMAGE_FORMAT and Base64-encoded. If disconnected from the server, remote control will resume after reconnecting.

Use Cases

RCoH is useful where the client only has a web browser available and temporary remote access is required for a host. The server will control the active session of the user who has started it.

The host must be accessible to the client, in order to connect to the web server, whether by being connected to the same LAN or by port forwarding.

However, please note that all traffic is unencrypted, meaning the display, mouse clicks and keystrokes are openly visible. If deploying in a public setting, either a reverse proxy - such as nginx - with HTTPS should be used, or the Flask application should listen on localhost and port forward via SSH, encrypting traffic along the way.

Limitations

If other remote desktop protocols, such as RDP or VNC, are unavailable, RCoH should be sufficient for troubleshooting, but lacks various features to be suitable for a robust remote desktop environment.

  • Currently, mouse movements are not sent to the server - only clicks.
    • In the same way, mouse dragging will not work either.
  • Keys are pressed instantaneously. Therefore, keyboard shortcuts will not work yet.
  • Sound is not sent at all - and likely never will be.

Installation

After cloning the repository with: git clone https://github.com/Zedeldi/RCoH.git

Build

  1. Install project: pip install .
  2. Run: rcoh-server [host] [port]

Development

  1. Install dependencies: pip install -r requirements.txt
  2. Run: python -m rcoh [host] [port]

PyInstaller

The server application can be bundled with PyInstaller, by adding the required static files and templates for Flask to the bundle.

pyinstaller --name "rcoh-server" --add-data "rcoh/static:static" --add-data "rcoh/templates:templates" rcoh/server.py

Libraries:

License

RCoH is licensed under the MIT Licence for everyone to use, modify and share freely.

This project is distributed in the hope that it will be useful, but without any warranty.

Credits

Icons = https://feathericons.com/

Donate

If you found this project useful, please consider donating. Any amount is greatly appreciated! Thank you 😃

PayPal

About

Remote Control over HTTP (RCoH).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published