Using /dev/tcp instead of wget
- by User1
Why does this work:
exec 3</dev/tcp/www.google.com/80
echo -e "GET / HTTP/1.1\n\n"&3
cat <&3
And this fail:
echo -e "GET / HTTP/1.1\n\n" /dev/tcp/www.google.com/80
cat </dev/tcp/www.google.com/80
Is there a way to do it in one-line w/o using wget, curl, or some other library?