安装完scapy,简单写了个脚本执行总是会警告一下:
[root@CentOS7 scapy]# python
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type"help","copyright","credits" or"license" for more information
>>> from scapy.all import *
WARNING: No route found for IPv6 destination :: (no default route?)
>>>
警告:WARNING: No route found for IPv6 destination :: (no default route?)
原因是用 from scapy.all import *的时候把ipv6相关的模块也导进去了,ipv6我们用不着,所以这警告不但不起作用,还很讨厌,我们打开scapy安装目录,打开all.py文件, 把与ipv6相关的几行注释掉就OK了。
scapy-2.6.1/scapy/all.py
#if conf.ipv6_enabled:
# from utils6 import *
# from route6 import *