如何修复 OSError: b'打开适配器时出错:找不到指定的设备。 (20)'
我试图运行这个简单的 python 代码只是为了开始学习嗅探器的工作原理,但我得到这个持续的错误:
OSError: b'Error opening adapter: 找不到指定的设备。 (20)'
请注意,“找不到指定的设备”是我的语言,我翻译成英语,所以可能有点不同。我尝试运行的代码是:
import scapy.all as scapy
def process_packet(packet):
print(packet)
def sniffing(interface):
scapy.sniff(iface=interface, store=False, prn=process_packet)
sniffing('Wi-Fi')
我观看的视频在这里: https://www.youtube.com/watch?v=rI0rTpH0f1o
感谢您的支持你的时间。如果您需要原始错误(用我的语言),请发表评论,我会写它。
i'm trying to run this simple python code just to start learning how a sniffer works, but i get this constant error:
OSError: b'Error opening adapter: Cannot find specified device. (20)'
Please note that the "Cannot find specified device" was in my language, and i translated in english, so it might be a little bit different. The code that i'm trying to run is:
import scapy.all as scapy
def process_packet(packet):
print(packet)
def sniffing(interface):
scapy.sniff(iface=interface, store=False, prn=process_packet)
sniffing('Wi-Fi')
The video i watched is here:
https://www.youtube.com/watch?v=rI0rTpH0f1o
Thank you for your time. If you need the original error (in my language) please post a comment and i'll write it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢丹尼尔·库尔曼提供答案。对于遇到相同问题的其他用户,将
sniffing('Wi-Fi')
替换为sniffing(None)
解决了该问题。请注意:Windows 10 上已修复问题
Thanks to dianiel kullmann for providing an answer. To other users having the same issue, replacing
sniffing('Wi-Fi')
withsniffing(None)
solved the issue.Please note: issue fixed on windows 10