Question

I'm trying to find a good and stable network packet sniffer in python, that allows me to do exactly the as I used to with tcpdump.

I found this pycap but it does not seem to be that stable... Another options would be Scapy but it does not handle reassembling TCP streams.

Any other options? Or am I wrong about pycap?

Was it helpful?

Solution

If you're worried about the stability of other python based packages, you can use python's ctypes library to dynamically load in libpcap.so.

You can find out more on using libpcap.so over here while the ctypes documentation is here.

OTHER TIPS

Take a look at PyShark. It allows you to sniff specific interface continuously.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top