Executing shell commands via UDP server
Project description
shell2udp
UDP-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.
Usage
shell2udp [options] ["shell command" for /] /path "shell command" /path2 "shell command2" ...
options:
-p, --port NNNN : port for udp server ( default 8080 )
Install
pip install shell2udp
Examples
Windows
shell2udp 'shutdown -s -t 0'
shell2udp 'shutdown -s -t 0' /beep "powershell -c echo `a"
shell2udp --port 3306 /beep 'powershell -command [Console]::Beep(440,2000)'
Dispatch
[System.Net.Sockets.UdpClient]::New().Send("", 0, "localhost", 8080)
[System.Net.Sockets.UdpClient]::New().Send([System.Text.Encoding]::UTF8.GetBytes("/beep"), 5, "localhost", 8080)
# [System.Text.Encoding]::UTF8.GetBytes("/beep").Length
Linux
shell2udp 'notify-send Hello root'
shell2udp -p3000 'notify-send Hello root' /path 'canberra-gtk-play -i desktop-login'
shell2udp -p3000 /path 'canberra-gtk-play -i desktop-login'
Dispatch
echo > /dev/udp/localhost/8080
echo /path > /dev/udp/localhost/8080
Acknowledgements
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
shell2udp-1.5.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file shell2udp-1.5.tar.gz
.
File metadata
- Download URL: shell2udp-1.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fe3815d47139116a0a55519018b5c40e4dd8c346bcd3fcca765f7b43c3249a6 |
|
MD5 | c7b2496832430b19ffb7dd33ee6b850f |
|
BLAKE2b-256 | d615b952dbb9b17558ce0e89396e478cbb73dc853e513689a806db815b354f86 |
File details
Details for the file shell2udp-1.5-py3-none-any.whl
.
File metadata
- Download URL: shell2udp-1.5-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b30cad3b506b1fc7f249f972133d8ce73d65ca263c92e87ab41a83150c9f2507 |
|
MD5 | 236b56df1481e3055fc0534d756e8927 |
|
BLAKE2b-256 | b5a84a44f6ac671a7573889de039fcb639bb412c149f0097de0d8bf3b3fa4eea |