Send data via UPD or TCP without Netcat on Linux/Mac

I only just found out about this…

# Send data via TCP to host 127.0.0.1 port 12201
echo "hello" >/dev/tcp/127.0.0.1/12201

# Send data via UDP to host 127.0.0.1 port 12201
echo "hello" >/dev/udp/127.0.0.1/12201

Now is there a way to listen via the same /dev/tcp|udp end point?

One thought on “Send data via UPD or TCP without Netcat on Linux/Mac”

Leave a Reply

Your email address will not be published. Required fields are marked *