Sniff dissected packets to JSON
# debian linux
sudo apt install tshark
# macos
brew install tsharknpm i -g snort
Flags
-
-ithe interface to sniff on (required) -
-dthe sniff duration (required) -
-kabsolute path to an ssl keylog file for encrypted sniffing (optional) -
--monitorsniff in monitor mode (optional) -
-sa wireless network ssid (optional) -
-pa wpa2 password (optional)
Examples
# Sniff https packets for 30 seconds on your localhost
snort -i lo -d 30 -k sslkeys.txt
# Sniff all http packets on an insecure network
snort -i wlp2s0 -d 30 --monitorlaunch firefox like
SSLKEYLOGFILE=sslkeys.txt firefoxto generate the keylog file