tcping 可以偵測某 TCP Port 是否有 Listen
Exit codes are:
-1: an error occured.
0: port is open
1: port is closed
2: user timeout
# tcping 192.168.6.25 80
192.168.6.25 port 80 open.
# tcping 192.168.6.254 25
192.168.6.25 port 25 closed.
Windows 版的 tcping 還可以計算的回應時間, 跟 ping 的輸出類似
D:\>tcping 192.168.6.25 80
Probing 192.168.6.25:80/tcp - Port is open - time=5.341ms
Probing 192.168.6.25:80/tcp - Port is open - time=1.119ms
Probing 192.168.6.25:80/tcp - Port is open - time=1.132ms
Probing 192.168.6.25:80/tcp - Port is open - time=1.160ms
Ping statistics for 192.168.6.25:80
4 probes sent.
4 successful, 0 failed.
Approximate trip times in milli-seconds:
Minimum = 1.119ms, Maximum = 5.341ms, Average = 2.188ms
D:\>tcping 192.168.6.25 25
Probing 192.168.6.25:25/tcp - Socket is not connected (10057) - time=2004.628ms
Probing 192.168.6.25:25/tcp - Socket is not connected (10057) - time=2000.934ms
Probing 192.168.6.25:25/tcp - Socket is not connected (10057) - time=2001.002ms
Probing 192.168.6.25:25/tcp - Socket is not connected (10057) - time=2000.867ms
Ping statistics for 192.168.6.25:25
4 probes sent.
0 successful, 4 failed.
Was unable to connect, cannot provide trip statistics.
http://www.elifulkerson.com/projects/tcping.php