I have captured UDP packet log files which contains payload data only, i need to convert these UDP packets from log files to.pcap using C#. I dont have any idea how to convert log files to .pcap files.
Asked
Active
Viewed 1,084 times
0
-
You won't find an existing tool to just do this for you, not because of the pcap format, but because we know nothing about your existing log files. They could be formatted any which way. Without some known structure, we're stuck. You're gonna have to write new code to parse the files yourself and convert them to the pcap format. You might find help for the latter part of that, but you're still gonna need a lot of your own code for the first part. – Joel Coehoorn Jun 01 '18 at 18:21
-
... and again ... without knowing anything about how the logs were captured, we can't really help you with any of this. If you make an _attempt_ yourself first, we can help with that, but until then... until you have some code to show to give an idea of the structure of these logs, this question is off topic. – Joel Coehoorn Jun 01 '18 at 18:22
1 Answers
0
You can create Packets using Pcap.Net by following the tutorial. https://github.com/PcapDotNet/Pcap.Net/wiki/Pcap.Net-Tutorial-Sending-Packets
Then you can dump the packets into a .pcap file by following the tutorial. https://github.com/PcapDotNet/Pcap.Net/wiki/Pcap.Net-Tutorial-Handling-offline-dump-files#saving-packets-to-a-dump-file

brickner
- 6,595
- 3
- 41
- 54
-
Not the same thing... those both involve taking _new_ dumps. He wants to convert logs from an existing dump to be useful with pcap tools. – Joel Coehoorn Jun 01 '18 at 18:18
-
Yes, I've explained how to create a new .pcap dump. Reading the log should be done based on the log format. – brickner Jun 24 '18 at 10:03