# Start airodump to capture handshake dump_cmd = f"sudo airodump-ng -c channel --bssid bssid -w output_file mon_interface" proc = subprocess.Popen(dump_cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) time.sleep(5)
if os.geteuid() != 0: print(RED + "This script must be run as root (sudo)." + RESET) sys.exit(1)
time.sleep(10) proc.terminate()