0

I need to generate MaACsec traffic via scapy, I've tried to follow scapy.contrib.macsec .

Here is what i tried:

import scapy.all as scapy
from scapy.layers.inet import Ether
from scapy.contrib.macsec import MACsec
from scapy.layers.inet import IP, TCP
from scapy.all import *

data='test_MACsec'

pkt = Ether(dst="00:00:01:00:00:01", src="00:10:94:00:00:02") / MACsec() / data
sendp(pkt, iface="eth2", count=400)

Error I get in wireshark capture:

enter image description here

Any suggestions about how I can fix this issue?

Dennis Kozevnikoff
  • 2,078
  • 3
  • 19
  • 29
newbie
  • 646
  • 8
  • 27
  • 2
    What's the problem? – Carcigenicate Jan 08 '21 at 14:28
  • the protocol should be MACsec not its ethertype 0x88e5 – newbie Jan 08 '21 at 14:35
  • Should be more specific about your "error" – sbail95 Jun 23 '21 at 20:50
  • Looks like you aren't setting any of the MACSec tag fields so what specifically were you expecting to happen for reference to readers/answerers? You probably need to create an MACSecSA if you want to encrypt(). All you've done above I believe is added the ethertype for macsec and added a default tag https://fossies.org/linux/privat/scapy-2.4.5.tar.gz/scapy-2.4.5/test/contrib/macsec.uts might help with what you're going for – sbail95 Jun 23 '21 at 20:56

0 Answers0