I have a assignment where I have to pseudonymisate the last 3 bytes of every mac adress I'm getting back as probe requests. By that I mean to format a printed mac adress like this ce:63:be:f5:04:00
to ce:63:be:aa:aa:a1
everytime I'm sniffing. How can I do this in my python script?
from scapy.all import *
def PacketHandler(pkt) :
if pkt.haslayer(Dot11) :
if pkt.type == 0 and pkt.subtype == 4 :
print("Client with Mac: %s probing for SSID: %s" % (pkt.addr2, pkt.info))
sniff(iface="wlan1mon", prn = PacketHandler)