def has_handshake_aircrack(target, capfile):
 if (not program_exists('aircrack-ng')):
  return False
 crack = ((('echo "" | aircrack-ng -a 2 -w - -b ' + target.bssid) + ' ') + capfile)
 proc_crack = Popen(crack, stdout=PIPE, stderr=DN, shell=True)
 proc_crack.wait()
 txt = proc_crack.communicate()[0]
 return (txt.find('Passphrase not in dictionary') != (-1))

def has_handshake_aircrack ( target , capfile ) : if ( not program_exists ( 'aircrack-ng' ) ) : return False crack = ( ( ( 'echo "" | aircrack-ng -a 2 -w - -b ' + target . bssid ) + ' ' ) + capfile ) proc_crack = Popen ( crack , stdout = PIPE , stderr = DN , shell = True ) proc_crack . wait ( ) txt = proc_crack . communicate ( ) [ 0 ] return ( txt . find ( 'Passphrase not in dictionary' ) != ( - 1 ) )
uses aircrack-ng to check for handshake .