Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LiveCapture for a limited number of packet_count doesn't stop even after packet count reaches the limit

I am trying to sniff packets using pyshark library in Python and I managed to capture live packets using pyshark.LiveCapture(interface='...'). However, when I use capture.sniff(packet_count=5), the capture doesn't stop after 5 packets, it continues on. How can I stop packet receiving using pyshark?

LiveCapture for a limited number of packet_count doesn't stop even after packet count reaches the limit

I am trying to sniff packets using pyshark library in Python and I managed to capture live packets using pyshark.LiveCapture(interface='...'). pyshark.LiveCapture(interface='...'). However, when I use capture.sniff(packet_count=5), capture.sniff(packet_count=5), the capture doesn't stop after 5 packets, it continues on. How can I stop packet receiving using pyshark?