Skip to content

Instantly share code, notes, and snippets.

@higebu
Created December 19, 2018 08:40
Show Gist options
  • Save higebu/65c1ea2b77558bfc62390225432e7af5 to your computer and use it in GitHub Desktop.
Save higebu/65c1ea2b77558bfc62390225432e7af5 to your computer and use it in GitHub Desktop.
hex stream to pcap
#!/bin/bash
hex=$1 # hex stream of packet like 0abcdef...
out=$2 # output file name
echo "$1" | xxd -r -p - - | od -Ax -tx1 - | text2pcap - $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment