Beispiel #1
0
def unpack_handshake(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_handshake_general(encoded_message, crypto_dict, "client", verbose)
Beispiel #2
0
def unpack_handshake(encoded_message, crypto_dict, verbose = False):
	
	if verbose:
		print "\n"
		
	return util.unpack_handshake_general(encoded_message, crypto_dict, "server", verbose)