The flag.zip contains the flag I am looking for but it is password protected. The password is the encrypted message which has to be correctly decrypted so I can useit to open the zip file. I tried using RSA but the zip doesn’t open by it. Can you help me get the flag please?
a.txt has a really small value of
n. The factors of this value can be brute-forced for directly and then an integer is obtained. The only file in
flag.txt which is password-protected. The password to this file is the integer which is obtained.
import mod c=32949 n=64741 e=42667 p = None for i in range(2,n): if n % i == 0: p = i break q = n // p em = mod.Mod(e, (p-1) * (q-1)) d = int(1//em) cm = mod.Mod(c,n) ans = int(cm ** d) print(ans)