Dump each packet data received on a different file where the file name is the tcp.time_relative
what i'm trying to achieve is to sniff the traffic over the loopback and writing every packet payload on its own file where the file name is the tcp.time_relative
with:
sudo tshark -i lo -T fields -e tcp.time_relative -e tcp.payload
I can get the two fields i need, what is crucial now is a way to write each tcp.payload to a file where tcp.time_relative is the file name. If someone knows some usefull tshark commands or a way to script this would be really nice.
thank you in advance for you answers
Do you want the empty files where there is no
tcp.payload
data?no i don't i already modified the command like this:
to filter a packet i don't wanna read and ignore empty data
"a way to script this" - are you working on some flavor of *nix so a bash script would be ok?
ye a bash script would do the trick