I tried to use Scapy to configure L3 socket like :
from scapy.all import *
soc = conf.L3socket(iface="eth1")
When I use this code in Ubuntu VM everything is OK , but when I used this code with WSL I got that error:
/usr/local/lib/python3.10/dist-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated
cipher=algorithms.Blowfish,
/usr/local/lib/python3.10/dist-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated
cipher=algorithms.CAST5,
Traceback (most recent call last):
File "........./python/test.py", line 2, in <module>
soc = conf.L3socket(iface="eth1")
File "/usr/local/lib/python3.10/dist-packages/scapy/arch/linux.py", line 486, in __init__
self.ins = socket.socket(
File "/usr/lib/python3.10/socket.py", line 232, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
How can I fix that ?