I am probing a host using OpenBSD's netcat.
nc -v -w 3 -z host.com 80-81
If it finds port 80 open and 81 closed it sits there in an endless loop
and after a long time it gives a connection time-out error.
Code:
# nc -v -w 3 -z host.com 80-81
Connection to host.com 80 port [tcp/www] succeeded!
nc: connect to host.com port 81 (tcp) failed: Connection timed out
How can I make this timeout a bit faster? I am already telling it to
bail out after 3 seconds with ( -w 3 ) but seems like it is not helping.