shell2http
HTTP-server to execute shell commands. Designed for development, prototyping or remote control. Settings through two command line arguments, path and shell command. By default bind to :8080. with shell2udp it runs with minimal latency.
Usage
shell2http [-h] [-form] [-no-index] [-add-exit] [-output] [-sse] [-p PORT] ["shell command" for /] /path "shell command" /path2 "shell command2" ...
positional arguments:
command
optional arguments:
-h, --help show this help message and exit
-form parse query into environment vars
-no-index do not generate index page
-add-exit add /exit command
-output send back output
-sse use Server Sent Events
-p PORT, --port PORT
Install
pip install shell2http
Examples
Windows
stop http server with Ctrl + Pause/Break
shell2http "shutdown -s -t 0"
shell2http "shutdown -s -t 0" /beep "powershell -c echo `a"
shell2http --port 3306 /beep "powershell -command [Console]::Beep(440,2000)"
http://localhost:8080/form?from=10&to=100
shell2http -output -form /form 'echo %v_from%, %v_to%'
Linux
shell2http 'notify-send Hello root'
shell2http -p3000 'notify-send Hello root' /path 'canberra-gtk-play -i desktop-login'
shell2http -p3000 /path 'canberra-gtk-play -i desktop-login'
shell2http -output /info 'uname -a'
shell2http -output -sse /ping 'ping -c4 8.8.8.8'
shell2http -add-exit pwd
http://localhost:8080/form?from=10&to=100
shell2http -output -form /form 'echo $v_from, $v_to'
html sufix to endpoint will change header to "text/html":
# Ability to have server events and server simple html pages as clients
shell2http -output -sse /serve_files_as.html "cat LICENSE|sed 's/.*/<pre>&<\/pre>/'"
Acknowledgements
Metadata
Release files for shell2http 2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shell2http-2.10.tar.gz | 4.2 kB | Without provenance | Details for shell2http-2.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shell2http-2.10-py3-none-any.whl | Python 3 | none | any | Details for shell2http-2.10-py3-none-any.whl |
Total release size: 8.8 kB
Release files / shell2http-2.10.tar.gz
| Download URL | shell2http-2.10.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ebec6c45c9ed82c983f4424e76a5de34d06fa188db5c8e1ed27b81ebed991d1
|
|
BLAKE2b-256 checksum How to use checksums |
a3c2816e6538a5e7957801b6bbd07de6d89d1cac921d96f378f7dafe34dd3635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / shell2http-2.10-py3-none-any.whl
| Download URL | shell2http-2.10-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
942f257b50cc99806d43444b4b3acc2d940e803f7ccab248bf117cf3f57079a2
|
|
BLAKE2b-256 checksum How to use checksums |
ff74fe670cebe5ccae8b6594408c88eb3ba78231bd26e08e8514531075416f5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Security for shell2http 2.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.