My code That I have tried is as follows:
from scapy.all import *
def PacketHandler(pkt) :
if pkt.haslayer == 2 and pkt.subtype==0:
if pkt.haslayer(IP) :
ip=pkt.getlayer(IP)
print ip.dst
if pkt.haslayer(UDP):
udp=pkt.getlayer(UDP)
print udp.dport
if pkt.haslayer(TCP) :
tcp=pkt.getlayer(TCP)
print tcp.port
sniff(iface="mon0", prn=PacketHandler)
Using this, I want to capture all wireless DATA packets but I am getting only multicast ( IP/UDP) packets. So how can I get all DATA packet in my wireless network? I have disabled encryption on my access point for this (temporarily) so I can get access to the data in packets.