If you have done wireless testing with Back-Track or Kali Linux, then you will be familiar with the airmon-ng suite. The airmon-ng script is used to enable monitor mode on wireless interfaces. The Monitor mode allows a wireless device to capture frames without having to associate with an AP. We are going to run all our programs on Kali Linux. The following screenshot shows you how to set mon0:
When you run the airmon-ng script, it gives the wireless card a name, such as wlan0, as shown in the preceding screenshot. The airmon-ng start wlan0 command will start wlan0 in monitor mode, and mon0 captures wireless packets.
Now, let's write our first program, which gives three values: SSID, BSSID, and the channel number. The program name is ssid_finder_raw.py. Let's see the code and explanation as...