Comment on Uses for cURLComments−randomfool13yReal HTTP from the command line is 'telnet localhost 80'.−planckscnst13y'nc localhost 80' FTFY−fafner13y exec 5<>"/dev/tcp/localhost/80" echo -ne "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" > &5 cat < &5 FTFY−jlgreco13yClever, though nc really is better than telnet. It is much easier to pipe into just for starters.−planckscnst13y/dev/tcp is a bashism. It's not a real (kernel-provided) device.−tedunangst13yActually, you broke it. telnet sends CRLF line breaks like you're supposed to. nc will just send LF. A strict web server won't talk to you.
Comments
Real HTTP from the command line is 'telnet localhost 80'.
'nc localhost 80' FTFY
Clever, though nc really is better than telnet. It is much easier to pipe into just for starters.
/dev/tcp is a bashism. It's not a real (kernel-provided) device.
Actually, you broke it. telnet sends CRLF line breaks like you're supposed to. nc will just send LF. A strict web server won't talk to you.