https://github.com/cmsj/orbital-defence-platform
RPC for servers via Pushbullet
https://github.com/cmsj/orbital-defence-platform
Last synced: 6 months ago
JSON representation
RPC for servers via Pushbullet
- Host: GitHub
- URL: https://github.com/cmsj/orbital-defence-platform
- Owner: cmsj
- Created: 2017-03-01T21:20:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T14:34:03.000Z (almost 9 years ago)
- Last Synced: 2025-04-09T07:16:21.266Z (about 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Orbital Defence Platform
by Chris Jones
## Licence
Released under the MIT licence.
## Introduction
This is a simple tool for remote execution. You send a message with Pushbullet, from a trusted device, and a corresponding command is executed.
## Installation
* The `requirements.txt` file describes the Python dependencies required, you can cause them to be installed with `pip install -r requirements.txt`
* Copy `odp.py` somewhere useful
* Copy `sample-config.json` to `/etc/odp.json` and edit it
* Insert your Pushbullet API key
* Add one or more Pushbullet identifiers for your trusted devices. You can find these identifiers by running `odp.py` with `-s` after adding your API key
* Add one or more commands to the configuration
* Arrange for `odp.py` to be running on your machine, it will create a new device in your Pushbullet account called `ODP`
* Send one of your pre-defined commands from a trusted source device, to your `ODP` device
* If you want to, you can choose a different name for the odp device, by adding an `odp_device_name` entry in the JSON configuration.
## Security
Obviously there are huge potential risks in exposing a machine to a third party service, when command execution is involved.
For this reason, ODP will never include any part of the remote message, in the command that is executed. Commands must be strictly pre-defined in the configuration file.
You are strongly encouraged to run ODP as an unprivileged user, with its configuration file not writeable by that user. To execute privileged commands, create static, passwordless `sudoers` entries which tightly control the privileged commands that can be executed (the correct ways to do this are beyond the scope of this README, you are encouraged to seek out the many tutorials for writing locked-down `sudoers` entries)
## Troubleshooting
You can run `odp.py` with `-d` to get fairly comprehensive logging.
The process will poll Pushbullet for new messages, every 30 seconds, which may cause you to get ratelimited if you're not a Pushbullet Pro subscriber. You can change the polling interval with the `-t` command line option.