pcapy
pcapy copied to clipboard
On windows findalldevs() returns unintelligible results
print("\n".join(pcapy.findalldevs()))
How is a human expected to know which adapter they want to specify / choose?
\Device\NPF_{5F548CD6-AB25-4913-ABC1-AE6DCF74760B}
\Device\NPF_{38014CA5-B0D9-4BE3-8CB6-4AA3442CB25F}
\Device\NPF_{1DE9A80A-A2B0-4DFE-9810-2EBD8D4DCA2C}
\Device\NPF_{AC59B406-A1B1-4F50-8621-9441AE84E06C}
\Device\NPF_{102E3A0A-8932-4156-9864-9C637014EA4E}
\Device\NPF_{26BCC034-5CAA-40A3-96D4-B2C5D9B7059F}
\Device\NPF_{6688476E-2EDB-4A6C-9976-AF020063ABC5}
\Device\NPF_{28E2730D-EAD3-4F25-85B8-DFFE14D9A054}
\Device\NPF_{556D609A-1036-466A-98B9-9A1E784AFF3A}
Hey @skewty might you be having additional drivers for virtual network adapter? And did you correctly install and link the WinPcap Dev Kit during compilation?
I have a 802.1Q trunk into my development workstation. So I have more more "network adapters" than most :) That said, I was able to get it to work.
In the end the trouble was too much for my coworkers so I just used a different library and gave up on pcapy.
Good to know you figured another way out. Although I would be interested to figure out the initial problem you had with Pcapy. I'll assume it's the 'network adapters' issue :)
:+1:
@JohnTroony @skewty there's a PR I created years ago in which I implemented functionallity that transfers LUID ("Local Area Connection") to GUID ("\Device\NPF_{5F548CD6-AB25-4913-ABC1-AE6DCF74760B}") but it was rejected because of other functionality and I want to get back to it. https://github.com/helpsystems/pcapy/pull/28
This is interesting, I'll check your implementation in the #28
I usually use WMIC to counter check the NIC incase I find myself in such a situation :
wmic nicconfig get ipaddress,SettingID
if you know a particular IP address you are looking for, wmic nicconfig get ipaddress,SettingID | findstr your_ip_here
@JohnTroony @skewty you can also use wireshark -k
to display the matching names if I remember correctly
I created a new PR for this https://github.com/helpsystems/pcapy/pull/61