3 ms·
You can actually write a web server in pure bash, with no netcat, using /dev/tcp (bash magic). https://www.gnu.org/software/bash/manual/html_node/Redirections.h
by neeee 13y ago
You can actually write a web server in pure bash, with no netcat, using /dev/tcp (bash magic).
https://www.gnu.org/software/bash/manual/html_node/Redirections.html https://www.gnu.org/software/bash/manual/html_node/Redirecti...
http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip http://www.linuxjournal.com/content/more-using-bashs-built-d...
- defap 13y agoThat's demonstrating an HTTP client, not a server. I don't think there's a way to make /dev/tcp accept incoming connections.