Test TCP connection without telnet or nc

It’s simple

$ timeout 1 bash -c '< /dev/tcp/google.com/80'

$ echo $?

0

 

Leave a Reply

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