Getting ready
As we have to sniff the packets from the interface, we require a Wi-Fi card capable of sniffing the Wi-Fi signals with the Monitor Mode. So we have to make sure the card is capable of sniffing. Then we have to set the interface to the Monitor Mode which is different for different operating systems. As Scapy has some limitations in the Windows systems, we have to run this recipe in a Linux or macOS environment.
Before we start coding, we have to get an idea about the Wi-Fi packets. As with the other packets, Wi-Fi packets also have a structure. According to the specification 802.11, each beacon frame from the access point contains a lot of information about the specific SSID.
Here is the frame format for an 802.11 mgmt beacon ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access