Skip to content

Instantly share code, notes, and snippets.

@infosec-intern
Last active January 22, 2017 05:56
Show Gist options
  • Save infosec-intern/ad622c879e51297e1247663c908b42a7 to your computer and use it in GitHub Desktop.
Save infosec-intern/ad622c879e51297e1247663c908b42a7 to your computer and use it in GitHub Desktop.
tcpdump -i wlan0 -nn -XX -S -s 0 -w /media/data/packets.pcap -vvv host 192.168.1.100
# -i wlan0 : Only capture packets coming in through interface wlan0
# -nn: Don't resolve hostnames or port numbers
# -XX: Capture packet contents in hex, ASCII, and ethernet headers
# -S: Print sequence numbers
# -s 0: Collect the entire length of a packet instead of just the first 96 bytes
# -w <file>: Write data to the specified file
# -vvv: Get really, really verbose. Show me all the info tcpdump has
# host 192.168.1.100: Filter incoming packets to only those coming to/from this host
# More flag details: https://danielmiessler.com/study/tcpdump/#gs.null
# Rotating output files: http://superuser.com/questions/904786/tcpdump-rotate-capture-files-using-g-w-and-c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment