Hello all this is my code:
#!usr/bin/env python
import scapy.all as scapy
from scapy_http import http
def sniff(interface):
scapy.sniff(iface=interface, store=False, prn=process_sniffed_packet)
def process_sniffed_packet(packet):
if packet.haslayer(http.HTTPRequest):`enter code here`
if packet.haslayer(Raw)
print(packet[scapy.Raw].load)
sniff("eth0")
But, every time I run this code, I get the following error:
if packet.haslayer(Raw)
^
SyntaxError: invalid syntax