$ echo "foo" > /dev/tcp/192.168.1.2/25
this command will send a message to the socket 25 on host 192.168.1.2 in tcp.
works on udp and icmp
understand only IP address, not hostname.
on the other side (192.168.1.2), you can listen to this socket and test if you receive the message.
easy to diagnose a firewall problem or not.
by David Winterbottom (codeinthehole.com)
0sem comentários ainda