Skip to content

Instantly share code, notes, and snippets.

@jason-riddle
Last active October 21, 2019 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jason-riddle/d2bf6de8b25a70c05a6570232da9d0c9 to your computer and use it in GitHub Desktop.
Save jason-riddle/d2bf6de8b25a70c05a6570232da9d0c9 to your computer and use it in GitHub Desktop.
Snippet using tcpdump to listen on an http port #snippet #complete
# Ref: https://github.com/SergK/cheatsheat-tcpdump/blob/master/tcpdump_advanced_filters.txt
# Ref: http://edoceo.com/cli/tcpdump
HTTP_PORT="8444"
HTTP_FILTER="(((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)"
tcpdump -i any -s 0 -A "tcp port $HTTP_PORT and $HTTP_FILTER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment