From 90601314d6b33bda0b5c095149fc9e0a67f2cd88 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 27 Jun 2023 22:30:14 +0000 Subject: [PATCH] better explain why very-bad-idea is a very bad idea --- README.md | 1 + bin/mtag/README.md | 9 +++++++++ bin/mtag/very-bad-idea.py | 13 ++++++++----- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1655c9c7..0d26eabb 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ turn almost any device into a file server with resumable uploads/downloads using * [reverse-proxy](#reverse-proxy) - running copyparty next to other websites * [packages](#packages) - the party might be closer than you think * [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes) + * [fedora package](#fedora-package) - now [available on copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/) * [nix package](#nix-package) - `nix profile install github:9001/copyparty` * [nixos module](#nixos-module) * [browser support](#browser-support) - TLDR: yes diff --git a/bin/mtag/README.md b/bin/mtag/README.md index 84a543e9..19c89611 100644 --- a/bin/mtag/README.md +++ b/bin/mtag/README.md @@ -24,6 +24,15 @@ these do not have any problematic dependencies at all: * also available as an [event hook](../hooks/wget.py) +## dangerous plugins + +plugins in this section should only be used with appropriate precautions: + +* [very-bad-idea.py](./very-bad-idea.py) combined with [meadup.js](https://github.com/9001/copyparty/blob/hovudstraum/contrib/plugins/meadup.js) converts copyparty into a janky yet extremely flexible chromecast clone + * also adds a virtual keyboard by @steinuil to the basic-upload tab for comfy couch crowd control + * anything uploaded through the [android app](https://github.com/9001/party-up) (files or links) are executed on the server, meaning anyone can infect your PC with malware... so protect this with a password and keep it on a LAN! + + # dependencies run [`install-deps.sh`](install-deps.sh) to build/install most dependencies required by these programs (supports windows/linux/macos) diff --git a/bin/mtag/very-bad-idea.py b/bin/mtag/very-bad-idea.py index a03bc05e..10425aa5 100755 --- a/bin/mtag/very-bad-idea.py +++ b/bin/mtag/very-bad-idea.py @@ -1,6 +1,11 @@ #!/usr/bin/env python3 """ +WARNING -- DANGEROUS PLUGIN -- + if someone is able to upload files to a copyparty which is + running this plugin, they can execute malware on your machine + so please keep this on a LAN and protect it with a password + use copyparty as a chromecast replacement: * post a URL and it will open in the default browser * upload a file and it will open in the default application @@ -12,11 +17,9 @@ the android app makes it a breeze to post pics and links: https://github.com/9001/party-up/releases (iOS devices have to rely on the web-UI) -goes without saying, but this is HELLA DANGEROUS, - GIVES RCE TO ANYONE WHO HAVE UPLOAD PERMISSIONS - -example copyparty config to use this: - --urlform save,get -v.::w:c,e2d,e2t,mte=+a1:c,mtp=a1=ad,kn,c0,bin/mtag/very-bad-idea.py +example copyparty config to use this; +lets the user "kevin" with password "hunter2" use this plugin: + -a kevin:hunter2 --urlform save,get -v.::w,kevin:c,e2d,e2t,mte=+a1:c,mtp=a1=ad,kn,c0,bin/mtag/very-bad-idea.py recommended deps: apt install xdotool libnotify-bin