码迷,mamicode.com
首页 > 其他好文 > 详细

nping : hping 的替代

时间:2014-12-19 18:56:30      阅读:889      评论:0      收藏:0      [点我收藏+]

标签:

nping :

    This handy little utility assembles and sends custom ICMP, UDP, or TCP packets and then displays any replies. It was inspired by the ping command, but offers far more control over the probes sent.

   在所有平台上,其使用方法与显示格式是相同的。nping是nmap项目的一部分,nping是hping的替代,而hping是ping的替代。

    Since hping hasn‘t been updated since 2005. The Nmap Project created and maintains Nping, a similar program with more modern features such as IPv6 support, and a unique echo mode.

技术分享

使用示例:
技术分享
技术分享



$ nping --tcp -c 5 --delay 500ms lonlife.net -p 80 # -c 测试次数 : --delay 每次测试间隔时间 : -p 指定测试目标端口的范围

Starting Nping 0.6.47 ( http://nmap.org/nping ) at 2014-12-17 18:42 EST
SENT (0.0040s) TCP 10.0.0.99:48541 > 210.77.146.101:80 S ttl=64 id=62364 iplen=40  seq=265613054 win=1480
RCVD (0.0427s) TCP 210.77.146.101:80 > 10.0.0.99:48541 SA ttl=48 id=0 iplen=44  seq=2342234789 win=14600 <mss 1304>
SENT (0.5109s) TCP 10.0.0.99:48541 > 210.77.146.101:80 S ttl=64 id=62364 iplen=40  seq=265613054 win=1480
RCVD (0.5509s) TCP 210.77.146.101:80 > 10.0.0.99:48541 SA ttl=48 id=0 iplen=44  seq=2529085705 win=14600 <mss 1304>
SENT (1.0246s) TCP 10.0.0.99:48541 > 210.77.146.101:80 S ttl=64 id=62364 iplen=40  seq=265613054 win=1480
RCVD (1.0637s) TCP 210.77.146.101:80 > 10.0.0.99:48541 SA ttl=48 id=0 iplen=44  seq=2537098764 win=14600 <mss 1304>
SENT (1.5398s) TCP 10.0.0.99:48541 > 210.77.146.101:80 S ttl=64 id=62364 iplen=40  seq=265613054 win=1480
RCVD (1.5796s) TCP 210.77.146.101:80 > 10.0.0.99:48541 SA ttl=48 id=0 iplen=44  seq=2545148525 win=14600 <mss 1304>
SENT (2.0548s) TCP 10.0.0.99:48541 > 210.77.146.101:80 S ttl=64 id=62364 iplen=40  seq=265613054 win=1480
RCVD (2.0941s) TCP 210.77.146.101:80 > 10.0.0.99:48541 SA ttl=48 id=0 iplen=44  seq=2553199767 win=14600 <mss 1304>

Max rtt: 39.509ms | Min rtt: 37.646ms | Avg rtt: 38.728ms
Raw packets sent: 5 (200B) | Rcvd: 5 (240B) | Lost: 0 (0.00%)
Nping done: 1 IP address pinged in 2.09 seconds

$ nping --udp -c 5 --delay 500ms lonlife.net -p 80

Starting Nping 0.6.47 ( http://nmap.org/nping ) at 2014-12-17 18:47 EST
SENT (0.0121s) UDP 10.0.0.99:53 > 210.77.146.101:80 ttl=64 id=11063 iplen=28
RCVD (0.0511s) ICMP [210.77.146.101 > 10.0.0.99 Port unreachable (type=3/code=3) ] IP [ttl=48 id=25305 iplen=56 ]
SENT (0.5136s) UDP 10.0.0.99:53 > 210.77.146.101:80 ttl=64 id=11063 iplen=28
RCVD (0.5520s) ICMP [210.77.146.101 > 10.0.0.99 Port unreachable (type=3/code=3) ] IP [ttl=48 id=25306 iplen=56 ]
SENT (1.0161s) UDP 10.0.0.99:53 > 210.77.146.101:80 ttl=64 id=11063 iplen=28
RCVD (1.0551s) ICMP [210.77.146.101 > 10.0.0.99 Port unreachable (type=3/code=3) ] IP [ttl=48 id=25307 iplen=56 ]
SENT (1.5186s) UDP 10.0.0.99:53 > 210.77.146.101:80 ttl=64 id=11063 iplen=28
RCVD (1.5573s) ICMP [210.77.146.101 > 10.0.0.99 Port unreachable (type=3/code=3) ] IP [ttl=48 id=25308 iplen=56 ]
SENT (2.0191s) UDP 10.0.0.99:53 > 210.77.146.101:80 ttl=64 id=11063 iplen=28
RCVD (2.0579s) ICMP [210.77.146.101 > 10.0.0.99 Port unreachable (type=3/code=3) ] IP [ttl=48 id=25309 iplen=56 ]

Max rtt: 38.812ms | Min rtt: 37.815ms | Avg rtt: 38.388ms
Raw packets sent: 5 (140B) | Rcvd: 5 (280B) | Lost: 0 (0.00%)
Nping done: 1 IP address pinged in 2.06 seconds










 

nping : hping 的替代

标签:

原文地址:http://www.cnblogs.com/SwordTao/p/4174320.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!