how to handle/generate pcap file

E

Evan

Hello -

I'm trying to decode the pcap file which is packet capture by tcpdump
or wireshark. Is there a python module that I can use it for this
problem?

Can python-libpcap or pycap or dpkt do that?

On the other hand, I also generate some packets by dpkt module, can I
also dump these packets to a pcap file? such as *.pcap.

The problem is I do not want to send these packets, I just want to
generate some special packets and then store it in a pcap file
(libpcap format), so other guys can check it by tcpdump or wireshark.

Thanks,
Evan
 
J

Jorgen Grahn

Yap, I found that dpkt can do this, Thanks all.

I have used the 'pcapy' module successfully for this. Might be better
than the ones mentioned above, might be worse.

Also, the pcap file format isn't really hard: you can write such code
by yourself in a few hours. I've done that too.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top