scapy: error sending packets

那年仲夏 提交于 2019-12-06 08:59:48

Slightly late, but:

I ran into the same problem a few months ago, and what worked for me eventually was to tunnel the WiFi through another network interface. It seems that the problem is in the IP obtaining process; Maybe you should try to run as administrator, and set the features of both Python and the Scapy files so that they have full control (right click->Properties->Security).

Do you encounter the same problem while using other methods like send/sr/srp?

I find solution ;}

Just edit c:\Python27\lib\site-packages\scapy\arch\windows__init__.py Like this:

  1. Delete c:\Python27\lib\site-packages\scapy\arch\windows__init__.pyc
  2. Change line get(iff)['addr']) to get(iff)['link_addr'])

In case anybody else has issues with getmacbyip() timing out before it can resolve a MAC, here's a band-aid fix that works:

mac = None
while not mac:
    mac = getmacbyip(ipaddr)

getmacbyip() will return None if it doesn't resolve. This works, but it will still take a few seconds. I wish this wasn't necessary to make it work.

I've update my scapy to the dev version (https://github.com/secdev/scapy/), and then it's working properly.

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