Ok so I found this code online and though it looked interesting so I ran it but can someone tell me why it doesn't work? I have scapy installed btw
#!/usr/bin/env python
from scapy.all import *
from scapy.error import Scapy_Exception
m_iface="wlan0"
filter_message="http"
count=0
def pktTCP(pkt):
global count
if pkt.haslayer(TCP) and pkt.getlayer(TCP).dport == 80 and pkt.haslayer(Raw):
count=count+1
print pkt.getlayer(Raw).load
sniff(iface=m_iface,prn=pktTCP)