Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active September 11, 2021 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cellularmitosis/a18fc81b74a7365c5162ea6493c89640 to your computer and use it in GitHub Desktop.
Save cellularmitosis/a18fc81b74a7365c5162ea6493c89640 to your computer and use it in GitHub Desktop.
hping3

Blog 2019/4/29

<- previous | index | next ->

hping3

Like ping, but for TCP ports.

$ sudo hping3 -S -V -p 80 github.com
using en1, addr: 192.168.2.5, MTU: 1500
HPING github.com (en1 192.30.253.112): S set, 40 headers + 0 data bytes
len=44 ip=192.30.253.112 ttl=47 DF id=0 tos=0 iplen=44
sport=80 flags=SA seq=0 win=28720 rtt=64.6 ms
seq=2893730458 ack=809625076 sum=c00a urp=0

len=44 ip=192.30.253.112 ttl=48 DF id=0 tos=0 iplen=44
sport=80 flags=SA seq=1 win=28720 rtt=60.5 ms
seq=2898820301 ack=1401346771 sum=1a48 urp=0

len=44 ip=192.30.253.112 ttl=48 DF id=0 tos=0 iplen=44
sport=80 flags=SA seq=2 win=28720 rtt=57.0 ms
seq=2021630632 ack=1401918392 sum=999d urp=0

On Debian:

apt-get install hping3

On Mac OS:

brew install hping3

You'll need to ensure /usr/local/sbin in your $PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment