小编use*_*713的帖子

SCAPY 发送数据包错误 OSError: [Errno 97] 协议不支持地址族

尝试使用以下方法发送数据包时遇到以下错误:

  • Ubuntu:发布 18.04
  • 蟒蛇:3.6.6
  • scapy 版本:2.4.0
>>> send(IP(dst="192.168.1.1")/ICMP())
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-2-8333be02b5c1> in <module>
----> 1 send(IP(dst="192.168.1.1")/ICMP())

~/scapy/lib/python3.6/site-packages/scapy/sendrecv.py in send(x, inter, loop, count, verbose, realtime, return_packets, socket, *args, **kargs)
    298      [socket=None]) -> None"""
    299     if socket is None
--> 300         socket = conf.L3socket(*args, **kargs)
    301     return __gen_send(socket, x, inter=inter, loop=loop, count=count, verbose=verbose,
    302                       realtime=realtime, return_packets=return_packets)

~/scapy/lib/python3.6/site-packages/scapy/arch/linux.py in __init__(self, iface, type, promisc, filter, nofilter, monitor)
    405     def __init__(self, type = ETH_P_ALL, filter=None, promisc=None, iface=None, nofilter=0):
    406         self.type …
Run Code Online (Sandbox Code Playgroud)

python sockets scapy

2
推荐指数
1
解决办法
4318
查看次数

标签 统计

python ×1

scapy ×1

sockets ×1