Question

please provide a comand for editcap to convert a .pcap thats actually a .pcapng file to...

please provide a comand for editcap to convert a .pcap thats actually a .pcapng file to pcap format
0 0
Add a comment Improve this question Transcribed image text
Answer #1

cd /path/to/folders   // the path to folder where your folders containing '*.pcapng' files are in
find . -type f -name '*.pcapng' -print0 | while IFS= read -r -d '' f; do editcap -F libpcap "$f" "${f%.pcapng}.pcap"; done

Example:
mahesh@bt:~/lab$ ls
first.pcapng
mahesh@bt:~/lab$ find . -type f -name '*.pcapng' -print0 | while IFS= read -r -d '' f; do editcap -F libpcap "$f" "${f%.pcapng}.pcap"; done
mahesh@bt:~/lab$ file something.pcap first.pcapng
first.pcap:   tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 65535)
first.pcapng: pcap-ng capture file - version 1.0
mahesh@bt:~/lab$

Add a comment
Know the answer?
Add Answer to:
please provide a comand for editcap to convert a .pcap thats actually a .pcapng file to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT