Skip to main content

Executing shell commands via HTTP server

Project description

Python PyPI

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] [-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
  -add-exit             add /exit command
  -output               send back output
  -sse                  use Server Sent Events
  -p PORT, --port PORT

Install

pip install shell2http

Examples

Windows

shell2http 'shutdown -s -t 0'
shell2http 'shutdown -s -t 0' /beep 'echo ^G'
shell2http --port 3306 /beep 'powershell -command [Console]::Beep(440,2000)'

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
shell2http -output -form /form 'echo $v_from, $v_to'

Acknowledgements

https://github.com/msoap/shell2http

https://github.com/eshaan7/Flask-Shell2HTTP

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shell2http-2.4.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

shell2http-2.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file shell2http-2.4.tar.gz.

File metadata

  • Download URL: shell2http-2.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for shell2http-2.4.tar.gz
Algorithm Hash digest
SHA256 6d3744c462ba19dfcffa11bb57836c24a56a144961c172986a0dd6f997a4f543
MD5 c062a5fcee635bc81fd0db79ee64a790
BLAKE2b-256 f99fa01907db4e8ad99fed49339360ac2806ea929ac5aff97ae78a9150988f50

See more details on using hashes here.

File details

Details for the file shell2http-2.4-py3-none-any.whl.

File metadata

  • Download URL: shell2http-2.4-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for shell2http-2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 14ee833238721fca2a8c5ccf46d04120b6ff998c3f85ae7fac4b919833c39cfd
MD5 19ef06b8fe22b5195452788fecff2571
BLAKE2b-256 cf3e25c863bb4add7fb32b18b37440e461151596558e19db35df30359ccacdcf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page