winpcapy
winpcapy copied to clipboard
Cannot Read Pcap file ?
Hi @orweis Thanks for sharing this project. It works great. I was working with this library and I am stuck in between so I need to read a pcap file now. Is it possible to do so with this project ? I tried Winpcaputils.capture_on(filename, function callback) but it doesnt seem to work. Some help would be very useful! Thanks in advance!
Hi @bansilol , Happy you find this project useful :)
WinPcap allows to open files- but the code here wasn't planned for it. It has been quite a while since I worked on this, and I'm sorry to say I have too many other things before in the queue. But I can perhaps give you some guidance here to fix this yourself, and even contribute a solution back with a pull-request.
The issue seems to be that our code here calls pcap_open_live
and for files we need to call - pcap_open
You can follow the C example here: https://www.winpcap.org/docs/docs_412/html/group__wpcap__tut7.html and try to replicate in Python
Hope this helps, Or