TIL: #bash provides pseudo devices for TCP and UDP connections:

echo "hello" > /dev/udp/127.0.0.1/1337

or

exec 5<>/dev/tcp/www.google.com/80
echo -e "GET / HTTP/1.0\n" >&5
cat <&5

I'm baffled how I've never discovered that until today.

@fribbledom
I've known about it, but it's like knowing what's in the Necronomicon, it's powerful, but nothing good will come from it.

Sign in to participate in the conversation
mastodon.cloud

Everyone is welcome as long as you follow our code of conduct! Thank you. Mastodon.cloud is maintained by Sujitech, LLC.