(target, capfile)
Checks if .cap file contains a handshake.
        Returns True if handshake is found, False otherwise.
Checks if .cap file contains a handshake.
        Returns True if handshake is found, False otherwise.
Checks if . cap file contains a handshake . Returns True if handshake is found False otherwise .
def has_handshake(target, capfile):
    """
        Checks if .cap file contains a handshake.
        Returns True if handshake is found, False otherwise.
    """
    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)
    
    # Use CowPatty to check for handshake.
    if valid_handshake and RUN_CONFIG.WPA_HANDSHAKE_COWPATTY:
        tried = True
        valid_handshake = has_handshake_cowpatty(target, capfile)
        
    # Check for handshake using Pyrit if applicable
    if valid_handshake and RUN_CONFIG.WPA_HANDSHAKE_PYRIT:
        tried = True
        valid_handshake = has_handshake_pyrit(target, capfile)
    
    # Check for handshake using aircrack-ng
    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 ) # Use CowPatty to check for handshake. if valid_handshake and RUN_CONFIG . WPA_HANDSHAKE_COWPATTY : tried = True valid_handshake = has_handshake_cowpatty ( target , capfile ) # Check for handshake using Pyrit if applicable if valid_handshake and RUN_CONFIG . WPA_HANDSHAKE_PYRIT : tried = True valid_handshake = has_handshake_pyrit ( target , capfile ) # Check for handshake using aircrack-ng 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 )