Linux command
hping 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Send ICMP ping
hping3 -1 [host]
Send TCP SYN to port
hping3 -S -p [80] [host]
Send UDP packets
hping3 -2 -p [53] [host]
Traceroute mode
hping3 --traceroute -1 [host]
Specify packet count
hping3 -c [5] -1 [host]
Set source IP (spoofing)
hping3 -a [source-ip] -S -p [80] [host]
Port scan
hping3 -8 [1-100] -S [host]
说明
hping3 is a network packet crafting tool that sends custom TCP, UDP, ICMP, or raw IP packets and displays replies. Use it for firewall testing, port scanning, network performance testing, path MTU discovery, and OS fingerprinting. Supports packet fragmentation and arbitrary body content.
参数
- -1
- ICMP mode (default echo request).
- -2
- UDP mode.
- -S
- TCP SYN flag.
- -p _port_
- Destination port.
- -c _count_
- Number of packets.
- -a _address_
- Spoof source IP.
- -8 _range_
- Port scan mode.
- --traceroute
- Traceroute mode.
- -C _type_
- Set ICMP type.
- -K _code_
- Set ICMP code.
FAQ
What is the hping command used for?
hping3 is a network packet crafting tool that sends custom TCP, UDP, ICMP, or raw IP packets and displays replies. Use it for firewall testing, port scanning, network performance testing, path MTU discovery, and OS fingerprinting. Supports packet fragmentation and arbitrary body content.
How do I run a basic hping example?
Run `hping3 -1 [host]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -1 do in hping?
ICMP mode (default echo request).