aboutsummaryrefslogtreecommitdiff
path: root/executables/extract-pcap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'executables/extract-pcap.sh')
-rw-r--r--executables/extract-pcap.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/executables/extract-pcap.sh b/executables/extract-pcap.sh
new file mode 100644
index 0000000..6f3a5d3
--- /dev/null
+++ b/executables/extract-pcap.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Usage: ./extract_udp_hex.sh input.pcap output.txt
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <input.pcap> <output.txt>"
+ exit 1
+fi
+
+INPUT="$1"
+OUTPUT="$2"
+
+# Extract UDP payloads as hex, one per line
+tshark -r "$INPUT" -Y "udp" -T fields -e data > "$OUTPUT"
+
+echo "UDP hex streams written to $OUTPUT" \ No newline at end of file