I have this packet sniffer I made:
from scapy.all import *
def decode(rawload):
#still trying to figure out how to decode the payload
return str(rawload) #temporary
try:
sniff(iface = "wlan0", filter="host 192.168.1.13", prn=lambda x:x.sprintf("src: %IP.src% (%Ether.src%) receiver: %IP.dst% load: {}".format(decode(x.payload)))) #Error right here
except KeyboardInterrupt:
sys.exit(1)
And the error I get is "Scapy Exception: Bad condition in format string: []". Could anyone explain what I'm doing wrong here?