Skip to content

Instantly share code, notes, and snippets.

@Ropes
Last active August 29, 2015 14:24
Show Gist options
  • Save Ropes/96504aa424a969097fe9 to your computer and use it in GitHub Desktop.
Save Ropes/96504aa424a969097fe9 to your computer and use it in GitHub Desktop.
TCP Dump Magic

Show all packet contents traversing a port
tcpdump -s 0 -A 'tcp port 9200'

Show packets with a destination on a port
tcpdump -s 0 -A 'tcp dst port 9200

Voodoo to show the HTTP Header of packets destined for a port
tcpdump -s 0 -A 'tcp dst port 9200 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)'

Good StackOverflow

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