File type is neither a supported pcap nor pcapng format
Hello Experts,
I am hoping for some help here regarding the error I get when I try to pipe tcpdump output to Wireshark on my Mac. I am running the following command getting this error.
ssh <username>@sw "tcpdump -s 0 -Un -w - -i et1" -batch | wireshark -k -i -
(wireshark:35822) 01:03:45.418531 [GUI WARNING] -- Populating font family aliases took 147 ms. Replace uses of missing font family ".AppleSystemUIFont" with one that exists to avoid this cost.
(wireshark:35822) 01:03:46.303276 [Capture MESSAGE] -- Capture Start ...
(wireshark:35822) 01:03:46.850295 [Capture MESSAGE] -- Error message from child: "File type is neither a supported pcap nor pcapng format. (magic = 0x74203e0a)", "Please report this to the developers of the program writing to the pipe."
(wireshark:35822) 01:03:50.123431 [Capture MESSAGE] -- Capture stopped.
(wireshark:35822) 01:03:50.123547 [Capture WARNING] ui/capture.c:722 -- capture_input_closed():
I am running the latest version of Wireshark 4.2.5
Thank for your help
Not sure what that "-batch" parameter is for/doing?
0x74203e0a
=t >
crLooks like extra characters.
tcpdump suppress console output in script & write to file
Pipe the
ssh
output tohexdump
(or similar hex output program) and look for the magic numbers:Magic numbers for supported capture files for Wireshark
Do you mean to run ssh with
-o BatchMode=yes
or similar? I am not aware of a version that takes a flag-batch
.For testing purposes you might want to limit tcpdump output to just one packet with the
-c 1
option and direct the ssh output to thehexdump
utility on the macOS system itself: