1

Hi I'm trying to sniff network with pyshark. I just want to capture the packet but pyshark does not capture any packet

Hi is the basic code and result

>>> cap = pyshark.LiveCapture(interface="wlan0")
>>> cap.sniff(timeout=20)
>>> cap
<LiveCapture (0 packets)>

Please help

morten
  • 53
  • 11
  • You can try enabling debug mode with `cap.set_debug(True)` before your call to `cap.sniff()`. This might give you some more information. – import random Feb 08 '18 at 02:09
  • https://stackoverflow.com/questions/35985296/pyshark-can-not-capture-the-packet-on-windows-7-python/54064844#54064844 check this if this might solve your error. –  Jan 06 '19 at 19:04

1 Answers1

2

Are you using windows 10? it may be late but the LiveCapture feature of pyshark 3.7.9 has some problems in windows 10.

You can roll back to pyshark 0.3.6.2 with, pip install pyshark==0.3.6.2