Closed BLUEHAIYANG closed 3 years ago
when I try to execute the example just show nothing why capture can not work?
Hi! Have you installed the WinPcap?
I have just reinstalled WinPcap but the problem still exists
what information should i provide to solve this problem?:D
Are you sure you have an Ethernet device on the machine? Try:
from winpcapy import WinPcapDevices
WinPcapDevices.list_devices()
To see which devices you can capture on
>>> from winpcapy import WinPcapDevices
>>> WinPcapDevices.list_devices()
{'\\Device\\NPF_{3AF46E4A-010F-4494-A968-AC5445AF44A0}': 'Microsoft', '\\Device\\NPF_{4B2D6E1B-4EF3-4CAB-94FE-F5A5F9DE941A}': 'Microsoft', '\\Device\\NPF_{5FE9559C-2FB2-4E52-993A-150B23CC496D}': 'Microsoft', '\\Device\\NPF_{443F1F7C-0E7A-45BB-87E4-7618F1DACA97}': 'Realtek PCIe GbE Family Controller'}
>>>
here is the output
Cool - so as you can see non of your devices have 'Ethernet' in their name. Try one of the device names you got ;-) e.g. "Microsoft" or 'Realtek PCIe GbE Family Controller'
>>> from winpcapy import WinPcapUtils
>>> WinPcapUtils.capture_on_and_print("*Microsoft*")
This time it just pause ,the cursor is blinking and still show nothing -- This problem is what causes me to be here
Probably no traffic on that device - you need to be sure you are listening on the device you actually have traffic on. Perhaps you should start with a tool like Wireshark to get familiarized with the devices on your machine and their traffic
Thanks for your advice.I'd try Wireshark :D
when I try to execute the example
just show nothing why capture can not work?