So I'm trying to get the source IP of a packet I receive using Scapy, but it just doesn't seem to work. The program crashes as soon as I try to print the IP.
I send this packet
send(IP(dst="10.0.0.12")/UDP(dport=53))
And it's received, I made sure of that, I even printed "Potato" after I received it, and it worked. Now, I try to print the source IP with this
from scapy.all import *
import sys
import time
rcvPkt = sniff(count = 1, filter = "port 53")
print rcvPkt.getlayer(IP).src
But whenever I do that, it says that 'list' object has no attribute 'src'. What do I do?