Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #install server
- sudo apt install websocketd
- #server
- #websocketd is a websocket server that sends the output of a command to the client when they connect
- websocketd --port=4444 bash -c ls
- websocketd --port=4444 bash -c "while [ 1 ];do date;sleep 1;done"
- # maybe you want to monitor dmesg output
- sudo dmesg -w > dmesg
- websocketd --port=4444 bash -c "tail -F dmesg"
- #client
- # If you want to connect from the shell
- sudo apt install node-wscat
- wscat -c "ws://localhost:4444"
- # Web interface:
- https://pastebin.com/0Gd4a7H7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement