3 ms·
exec 5<>"/dev/tcp/localhost/80" echo -ne "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" > &5 cat < &5 FTFY
by fafner 14y ago
exec 5<>"/dev/tcp/localhost/80"
echo -ne "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" > &5
cat < &5
FTFY
- jlgreco 14y agoClever, though nc really is better than telnet. It is much easier to pipe into just for starters.
- planckscnst 14y ago/dev/tcp is a bashism. It's not a real (kernel-provided) device.