Python RPC with Pushbullet as its transport mechanism
7.9K
by Chris Jones [email protected]
Released under the MIT licence.
This is a simple tool for remote execution. You send a message with Pushbullet, from a trusted device, and a corresponding command is executed.
requirements.txt file describes the Python dependencies required, you can cause them to be installed with pip install -r requirements.txtodp.py somewhere usefulsample-config.json to /etc/odp.json and edit itodp.py with -s after adding your API keyodp.py to be running on your machine, it will create a new device in your Pushbullet account called ODPODP deviceodp_device_name entry in the JSON configuration.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)
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.
Content type
Image
Digest
Size
259 MB
Last updated
over 9 years ago
docker pull cmsj/orbital-defence-platform