3 ms·
websocketd --port=8080 bash Then in the browser console: ws.send("ls") I just ported bash to the web :)
by gren 13y ago
websocketd --port=8080 bash
Then in the browser console:
ws.send("ls")
I just ported bash to the web :)
- mrspeaker 13y agoHa ha! That's so cool. Hey, off topic... what's your IP? ;)
- huhtenberg 13y agoDon't know his, but I've got the best one 127.123.234.345!
- awestroke 13y agows.send('cat $HOME/.ssh/{id_rsa,id_rsa.pub,known_hosts}'); ws.send('history'); ws.send('echo "' + pubkey + '" >> $HOME/.ssh/authorized_hosts');
- jamescun 13y agoCombine that with Term.js[1] and you could have a fully functioning terminal in the browser. [1] https://github.com/chjj/term.js https://github.com/chjj/term.js
- glomph 13y agoThere is already https://code.google.com/p/shellinabox/ https://code.google.com/p/shellinabox/
- X4 13y agoThe possibilities are endless, just add a websocket proxy as a front-server and you can allow dynamic and even secure control of an entire infrastructure (given that you add auth layer). Here's something you could use for that: https://news.ycombinator.com/item?id=6880487 https://news.ycombinator.com/item?id=6880487 Or just setup haproxy with it.
- tlrobinson 13y agoSo basically replicate SSH in a half assed way?
- e12e 13y agoWell, no. More like telnet (optionally over tls).