较长时间未用wireshark,打开扫描接口时报错:Unable to load Npcap or WinPcap (wpcap.dll); you will not be able to capture packets. In order to capture packets Npcap or WinPcap must be installed. See https://nmap.org/npcap/ for a downloadable version of Npcap and for instructions on how to install it.
原因:安装的winpcap损坏或C:\Windows\System32下的wpcap.dll被删除
解决:
1.控制面板->程序和功能->卸载winpcap
下载重装winpcap(一直下一步即可)
重启wireshark:正常使用
如果想要捕获访问localhost的数据包,需要监视环回网卡,但winpcap扫描不到该网卡,所以可以前往Npcap: Windows Packet Capture Library & Driver下载npcap安装(同样一直下一步即可)
然后重启wireshark即可看到环回网卡的接口(选中的那个):