Skip to content

Instantly share code, notes, and snippets.

View djlambert's full-sized avatar

Derek J. Lambert djlambert

View GitHub Profile
@jhass
jhass / dump_socket.sh
Last active March 6, 2024 19:32
Capture unix socket to pcap file with socat and tshark
#!/bin/bash
# Parameters
socket="/run/foo.sock"
dump="/tmp/capture.pcap"
# Extract repetition
port=9876
source_socket="$(dirname "${socket}")/$(basename "${socket}").orig"