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

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料