Created
December 10, 2024 17:49
-
-
Save vdm/9e7676ca6651f300adfce11dfbe80e80 to your computer and use it in GitHub Desktop.
tcpdump -x single column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $ tshark -e udp.payload | |
# $ tcpdump -x | awk -f tcpdump-x.awk | |
END { | |
if (header != "") { print header " " hex } | |
} | |
/^[^\t]/ { | |
if (header != "") { print header " " hex } | |
header = $0 | |
hex = "" | |
next | |
} | |
/^\t0x/ { | |
if (NF > 9) NF = 9 | |
for (i=2; i<=NF; i++) { | |
hex = hex $i | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment