سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top