Turn simple C program into server using netcat
问题 One cool feature of netcat is how it can turn any command line program into a server. For example, on Unix systems we can make a simple date server by passing the date binary to netcat so that it's stdout is sent through the socket: netcat -l -p 2020 -e date Then we can invoke this service from another machine by simply issuing the command: netcat <ip-address> 2020 Even a shell could be connected ( /bin/sh ), although I know this is highly unrecommended and has big security implications.