pcapy.findalldevs() No valid interfaces to open

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 03:39:15

问题


I am trying to run Sulley's (the fuzzer) "network_monitor.py" on an Ubuntu vm. Everytime I do, I get the following error.

pcapy.PcapError: No valid interfaces to open

I believe that this has little to do with the code I am running it in, because when I run

python
>>> import pcapy
>>> devices = pcapy.findalldevs()

I get the same error

Any hints on what's going on would be amazing. Thanks so much in advance


回答1:


Try to use it with sudo.

Pcapy, AFAIK, needs special rights to access interfaces.

mycode.py:
    import pcapy
    devices = pcapy.findalldevs()

sudo python mycode.py


来源:https://stackoverflow.com/questions/24270255/pcapy-findalldevs-no-valid-interfaces-to-open

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!