nc send string over network.
vagrant@vagrant-ubuntu-trusty-64:~$ printf ‘HEAD / HTTP/1.1\r\nHost: www.google.co.jp\r\n\r\n’ | nc www.google.co.jp 80
HTTP/1.1 200 OK
Date: Sat, 10 Dec 2016 13:39:24 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=Shift_JIS
P3P: CP=”This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info.”
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: NID=91=vO7aa7YjWxJPGDWffZj–p855KgcdJdpvH9dCUAVgWBX7f8JZdeweK_wY3msj09u8Osyz2tK4H4X3cjnZX1QK45cCxRB910amTq7Kmllk6TS3iH9HMIVw73LAaOW4Swq; expires=Sun, 11-Jun-2017 13:39:24 GMT; path=/; domain=.google.co.jp; HttpOnly
Transfer-Encoding: chunked
Accept-Ranges: none
Vary: Accept-Encoding
vagrant@vagrant-ubuntu-trusty-64:~$ printf ‘HEAD / HTTP/1.1\r\nHost: www.amazon.com\r\n\r\n’ | nc www.amazon.com 80
HTTP/1.1 301 Moved Permanently
Date: Sat, 10 Dec 2016 13:44:34 GMT
Server: Server
Location: https://www.amazon.com/
Content-Type: text/html; charset=iso-8859-1
vagrant@vagrant-ubuntu-trusty-64:~$ man nc
connecting by nc command.
vagrant@vagrant-ubuntu-trusty-64:~$ nc localhost 3456 vagrant@vagrant-ubuntu-trusty-64:~$ nc -l 3456