Inspiration is taken from David Bombal's YouTube video regarding how to crack a WiFi password using hashcat and hcxdumptool, so all credit goes to him for the idea. If you have not watched the video I would advise you to do so since this script does not show or do any cracking of passwords. The script is made to automate the process of capturing the four-way handshake using the hcxdumptool, then converting the output of the hcxdumptool to a hashcat readable format using the hcxpcapngtool. This script works with Debian-based Linux distros.
The tools used in this script are created by ZerBea, if you want to learn more about the tools visit the links below!
• hcxdumptool by ZerBea
• hcxtools by ZerBea
Getting the source:
git clone https://github.com/luddekn/WiFi-scanner.git
cd WiFi-scanner
Make the file executable:
sudo chmod +x WiFi-scanner.sh
Run the script:
sudo ./WiFi-scanner.sh
After running the script you should have three files: .pcapng, .hc22000, and ESSID list. You could now go into the .hc22000 file and select which WiFi network you want to crack by filtering out the MAC address of your target. To obtain the MAC address of your target you could do this command, this shows you both the ESSID and MAC addresses to make it easier to find:
sudo hcxdumptool --do_rcascan -i wlan_name
After you have your .hc22000 file with the WiFi password you want to crack, you can then use hashcat to do a bruteforce attack. David Bombal shows this process in the video linked above.