n = 7576962585305391589 d = 4406608918927534373 result = []
with open("RSA.txt","r") as f: print f.readline() print f.readline() print f.readline() print f.readline() for c in f: result.append(str(pow(int(c),d,n))) print result print"".join(result)
combiners = "".join(result)
spliters = [chr(int(combiners[i:i+2])) for i in range(0,len(combiners),2)] print spliters
combiners2 = "".join(spliters) print combiners2
flag = base64.b32decode(combiners2) print flag
out = flag.split(" ") print out
flags = []
for i in range(len(out)): flags.append(chr(int(out[i])))
with open("old.txt","r") as f: for c in f: d = c.replace("09","0").replace("20","1").replace(" ","") new.write(d) flag.append(''.join(chr(int(d[i*8:i*8+8],2)) for i in range(len(d)//8)))
# flag.enc and AEScipher class are given, we just have to brute force :P
from Crypto.Cipher import AES from Crypto.Random import new as Random from hashlib import sha256 from base64 import b64encode,b64decode import time import threading
defdecrypt(self): cipher_text = b64decode(self.data.encode()) iv = cipher_text[:self.block_size] cipher = AES.new(self.key,AES.MODE_OFB,iv) return self.unpad(cipher.decrypt(cipher_text[self.block_size:])).decode() defbrute(test): data = 'vLlZz11nZdu84N57/eqkJJ0EXIlgedx41w/akqmreH7aD8pr0Bds8dNaWvbWd9MW/zeCAFzjYav+XQtyv6eijA==' try: result = AESCipher(data, test.strip()).decrypt() if'radar'in result: print result except: pass
path = '/usr/share/wordlists/rockyou.txt' with open(path, 'r') as f: lines = f.readlines() for i in lines: thread1 = threading.Thread(target=brute, args=[i,]) thread1.start() time.sleep(0.01)