def unpack_message(encoded_message, crypto_dict, verbose = False): if verbose: print "\n" if "." in encoded_message: encoded_message = encoded_message[1:] vcc = verifyCloseConnection(crypto_dict, encoded_message) if vcc[0]: if vcc[1] == "close": return [False, "Error: connection closed by server"] else: return [False, "Error: connection closed for an unknown reason, possibly malicious"] return vcc return util.unpack_message_general(encoded_message, crypto_dict, "client", verbose)
def unpack_message(encoded_message, crypto_dict, verbose = False): if verbose: print "\n" return util.unpack_message_general(encoded_message, crypto_dict, "server", verbose)