def has_handshake(target, capfile):
 global RUN_CONFIG
 valid_handshake = True
 tried = False
 if RUN_CONFIG.WPA_HANDSHAKE_TSHARK:
  tried = True
  valid_handshake = has_handshake_tshark(target, capfile)
 if (valid_handshake and RUN_CONFIG.WPA_HANDSHAKE_COWPATTY):
  tried = True
  valid_handshake = has_handshake_cowpatty(target, capfile)
 if (valid_handshake and RUN_CONFIG.WPA_HANDSHAKE_COWPATTY):
  tried = True
  valid_handshake = has_handshake_cowpatty(target, capfile)
 if (valid_handshake and RUN_CONFIG.WPA_HANDSHAKE_PYRIT):
  tried = True
  valid_handshake = has_handshake_pyrit(target, capfile)
 if (valid_handshake and RUN_CONFIG.WPA_HANDSHAKE_AIRCRACK):
  tried = True
  valid_handshake = has_handshake_aircrack(target, capfile)
 if tried:
  return valid_handshake
 print (((R + ' [!]') + O) + ' unable to check for handshake: all handshake options are disabled!')
 exit_gracefully(1)

def has_handshake ( target , capfile ) : global RUN_CONFIG valid_handshake = True tried = False if RUN_CONFIG . WPA_HANDSHAKE_TSHARK : tried = True valid_handshake = has_handshake_tshark ( target , capfile ) if ( valid_handshake and RUN_CONFIG . WPA_HANDSHAKE_COWPATTY ) : tried = True valid_handshake = has_handshake_cowpatty ( target , capfile ) if ( valid_handshake and RUN_CONFIG . WPA_HANDSHAKE_COWPATTY ) : tried = True valid_handshake = has_handshake_cowpatty ( target , capfile ) if ( valid_handshake and RUN_CONFIG . WPA_HANDSHAKE_PYRIT ) : tried = True valid_handshake = has_handshake_pyrit ( target , capfile ) if ( valid_handshake and RUN_CONFIG . WPA_HANDSHAKE_AIRCRACK ) : tried = True valid_handshake = has_handshake_aircrack ( target , capfile ) if tried : return valid_handshake print ( ( ( R + ' [!]' ) + O ) + ' unable to check for handshake: all handshake options are disabled!' ) exit_gracefully ( 1 )
checks if .