首页 > 代码库 > hping的用法
hping的用法
$ hping --help | head -1
usage: hping host [options]
HPING lonlife.net (eth0 210.77.146.101): S set, 40 headers + 0 data bytes
len=48 ip=210.77.146.101 ttl=48 DF id=0 sport=80 flags=SA seq=0 win=14600 rtt=38.1 ms
len=48 ip=210.77.146.101 ttl=48 DF id=0 sport=80 flags=SA seq=1 win=14600 rtt=40.0 ms
len=48 ip=210.77.146.101 ttl=48 DF id=0 sport=80 flags=SA seq=2 win=14600 rtt=36.7 ms
len=48 ip=210.77.146.101 ttl=48 DF id=0 sport=80 flags=SA seq=3 win=14600 rtt=41.5 ms
len=48 ip=210.77.146.101 ttl=48 DF id=0 sport=80 flags=SA seq=4 win=14600 rtt=44.2 ms
--- lonlife.net hping statistic ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 36.7/40.1/44.2 ms
$ hping lonlife.net -2 -p 80 -c 5 # -2 UDP-ping
HPING lonlife.net (eth0 210.77.146.101): udp mode set, 28 headers + 0 data bytes
ICMP Port Unreachable from ip=210.77.146.101 name=UNKNOWN
ICMP Port Unreachable from ip=210.77.146.101 name=UNKNOWN
ICMP Port Unreachable from ip=210.77.146.101 name=UNKNOWN
ICMP Port Unreachable from ip=210.77.146.101 name=UNKNOWN
--- lonlife.net hping statistic ---
5 packets transmitted, 4 packets received, 20% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
$ hping xy.com --rand-source --syn --flood # 这个不解释了
总结:
hping的udp ping,当对方的回复ICMP Port Unreachable时,下面的时间统计竟然没有有效数据,而nmap的nping不存在此类问题,建议使用nping (另外一个原因,hping早已停止更新,nmap一直在更新)
来自为知笔记(Wiz)
hping的用法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。