<commit_before>try:
	import socket
	from os.path import isfile
	from Crypto.Cipher import PKCS1_OAEP
	from Crypto.PublicKey import RSA
	from Crypto.Cipher import AES
	from Crypto import Random
	from binascii import hexlify
except ImportError as e:
	print("[-] {}, exiting".format(e))
	exit(1)

def main(HOST, PORT, CIPHER, tryAgain = 6):

	AES_key = Random.new().read(32)
	msg = CIPHER.encrypt("3317BLT5_#_{0}_#_{1}\n".format(socket.gethostname(), hexlify(AES_key).decode()).encode())

	# As you can see, there is no connect() call; UDP has no connections.
	# Instead, data is directly sent to the recipient via sendto().
	print("[ ] sending message to {}:{}".format(HOST,PORT))
		
	#try connecting tryAgain number of times
	for i in range(tryAgain):
		print("[ ] Attempting to contact server")
		received = sendAndRecv(msg, HOST, PORT)
		if received:
			#break so that we don't exit... control flow is great
			print("[+] Got a reply")<commit_msg>artificially limit hostnames to 32 char<commit_after>try:
	import socket
	from os.path import isfile
	from Crypto.Cipher import PKCS1_OAEP
	from Crypto.PublicKey import RSA
	from Crypto.Cipher import AES
	from Crypto import Random
	from binascii import hexlify
except ImportError as e:
	print("[-] {}, exiting".format(e))
	exit(1)

def main(HOST, PORT, CIPHER, tryAgain = 6):

	AES_key = Random.new().read(32)
	msg = CIPHER.encrypt("3317BLT5_#_{0}_#_{1}\n".format(socket.gethostname()[:32], hexlify(AES_key).decode()).encode())

	# As you can see, there is no connect() call; UDP has no connections.
	# Instead, data is directly sent to the recipient via sendto().
	print("[ ] sending message to {}:{}".format(HOST,PORT))
		
	#try connecting tryAgain number of times
	for i in range(tryAgain):
		print("[ ] Attempting to contact server")
		received = sendAndRecv(msg, HOST, PORT)
		if received:
			#break so that we don't exit... control flow is great
			print("[+] Got a reply")
{'fraction_non_alphanumeric': 0.12610275038920601, 'fraction_numerical': 0.014530358069538143, 'mean_word_length': 4.572254335260116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7172517', 'n_tokens_mistral': 693, 'n_tokens_neox': 643, 'n_words': 220}