Skip to content

Instantly share code, notes, and snippets.

@dougvj
Created April 14, 2025 20:12
Show Gist options
  • Save dougvj/ca82256c4f8db8a462bf2599927523a3 to your computer and use it in GitHub Desktop.
Save dougvj/ca82256c4f8db8a462bf2599927523a3 to your computer and use it in GitHub Desktop.
Capture with tshark on all hardware interfaces
#!/bin/bash
# Filters on all real hardware interfaces
#
interfaces=$(ip -o link show type "" | awk -F ': ' '{print $2}')
tshark_interfaces=""
for i in $interfaces; do
echo $i
tshark_interfaces+=" -i $i"
done
tshark $tshark_interfaces $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment