aboutsummaryrefslogtreecommitdiff
path: root/executables/extract-pcap.sh
diff options
context:
space:
mode:
authorSigma-Ohio <crt@teleco.ch>2025-06-07 06:35:16 +0200
committerSigma-Ohio <crt@teleco.ch>2025-06-07 06:35:16 +0200
commit7ceba5a0f3cbeb6ab15bc7f99aec87741ef177ea (patch)
treefd7bcd69b477eb6cb641abafb0b686204aede3c9 /executables/extract-pcap.sh
parent9413cc24ab623f7d7959f18310262eb3b792ff9d (diff)
ich committe mit mienen besten
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