I am trying to send a packet using a UDP protocol. I am running Python 3 on Ubuntu and using scapy. However, I get the following error message: "AttributeError: 'L2Socket' object has no attribute 'ins'". The full error message can be seen below.
I read here https://github.com/secdev/scapy/issues/1868 that it may be a problem with not being able to run as root because Ubuntu is run through a virtual machine. Any help is more than welcome!
These are the lines of code in question:
from scapy.all import *packet = IP(dst="127.0.0.1")/UDP(dport=123)/Raw(load="123")send(packet)