Python Forum

Full Version: scapy wifi scan to get payload \ data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello ,
I want to scan WiFi and get from "probe request" the information Elements (IEs)

I'm able to get the probe request , and I can read the payload where I think the IEs is

if pkt.haslayer(Dot11):
        dot11_layer = pkt.getlayer(Dot11)
        #print(dot11_layer.encode())
        #if dot11_layer.addr2 and
        if pkt.subtype == 4:
            MAC = dot11_layer.addr2
            PayloadName = dot11_layer.payload.name # just to be sure , can be remove 
            Type = pkt.type
            SubType =  pkt.subtype
            payload = str(bytes(pkt.payload))
            print(payload? "  , payload )
but I get this :
payload? "  b"\x80\x00\x00\x00\xff\xff\xff\xff\xff\xff\x04\xf0!\x9c(s\x04\xf0!\x9c(s\xb0\xb0\x83!s\xd1w\x00\x00\x00d\x001\x04\x00\x06office\x01\x08\x82\x84\x8b\x96\x0c\x12\x18$\x03\x01\x01\x05\x04\x00\x01\x00\x00\x07\x06IL \x01\r\x14*\x01\x002\x040H`l-\x1a\xad\t\x03\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00=\x16\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x08\x04\x00\x0f\x00\x00\x00\x00@\xbf\x0c\xb2y\x8b3\xaa\xff\x00\x00\xaa\xff\x00 \xc0\x05\x00\x00\x00\xfc\xff\xdd\x18\x00P\xf2\x02\x01\x01\x80\x00\x03\xa4\x00\x00'\xa4\x00\x00BC^\x00b2/\x00\xdd\t\x00\x03\x7f\x01\x01\x00\x00\xff\x7f\xdd\x08\x8c\xfd\xf0\x01\x01\x02\x01\x00\xdd\x16\x8c\xfd\xf0\x04\x00\x00ILQ\x03\x02\tr\x01\x8c\x16\x00\x00F\x00\x00\x000\x14\x01\x00\x00\x0f\xac\x04\x01\x00\x00\x0f\xac\x04\x01\x00\x00\x0f\xac\x02\x00\x00\xa0j(Z"
1. am I reading the correct value?
2. how can I decode\encode it so I can see\get the data ?

Thanks,