'Checks if .cap file contains a handshake.
Returns True if handshake is found, False otherwise.'

def has_handshake(self, target, capfile):

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