wifi-monitor
wifi-monitor copied to clipboard
Error handling does not work
These lines:
try:
promisc = Popen(['airmon-ng', 'start', '%s' % interface], stdout=PIPE, stderr=DN)
promisc = promisc.communicate()[0]
monmode = re.search('monitor mode enabled on (.+)\)', promisc)
monmode = monmode.group(1)
except OSError, e:
sys.exit('[-] Enabling monitor mode failed, do you have aircrack-ng installed?')
do not correctly handle airmon-ng returning an empty string for some reason, as monmode.group(1) will be empty and return "None can't have group" error message instead of something descriptive. Found this out through lots of troubleshooting.
Also sorry I can't provide a more detailed error message, I fixed my airmon and can no longer reproduce it. Failing to enable monitor mode can also happen because there isn't a suitable wireless interface, so it would probably be prudent to expand the error message a bit.