0

I try to start capturing with Wireshark using command line but the default output file is pcap extension but Wireshark - pcapng file type and I need libpcap file type. My command is

tshark.exe" -i interfacenumber -W MyFile.pcap

I also tried

tshark.exe" -i 1 -F libpcap -W MyFile.pcap

and in this case no file created on my disk although I can see the packets in the command line window

3 Answers 3

2
tshark.exe -i 1 -F libpcap -w MyFile.pcap`

is the right answer (note the lower case 'w').

(-W does something different. There's lot's of tshark options, so you need to look carefully at the tshark -h output to make sure you're using the right option).

Sign up to request clarification or add additional context in comments.

Comments

0

Since the -F libpcap option is not working for me either, I'm using another command line tool in the same directory:

editcap -F libpcap currentFile.pcap(ng) libpcapConvertedFile.pcap where "currentFile.whatever" is the pcapng-formatted file and "libpcapConvertedFile.whatever" is the outputted legacy libpcap format.

I run this once tshark is done capturing the original file.

1 Comment

This is a bug: bugs.wireshark.org/bugzilla/show_bug.cgi?id=9991 . It will be fixed so that -F libpcap creates a file in pcap format
0

I think that in the newest Wireshark versions (1.8.x or 1.10.x) you cannot start capturing in libpcap format and the default format is pcapng (also pcap extension - try to use verion 1.6.x) That's what solve my problem

http://www.wireshark.org/download/win64/all-versions/

http://www.wireshark.org/download/win32/all-versions/

2 Comments

This is a bug: bugs.wireshark.org/bugzilla/show_bug.cgi?id=9991 . It will be fixed so that -F libpcap creates a file in pcap format
I've fixed the bug; Specifying '-F libpcap' (1.8) or '-F pcap' (1.10 & newer) will create the proper format file). The fix will be available shortly in the next releases of Wireshark 1.8 and Wireshark 1.10 (to be released shortly)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.