At this point, we have 3/5 primes and I don't know how to find the other 2. Then I had a wild thought that if the flag is small enough i.e. Flag≤3∗2048bits then we can decrypt it with these 3 primes we found!
So, I used N=p1⋅p2⋅p3 and got the flag!
N = p1*p2*p3phi = (p1-1)*(p2-1)*(p3-1)d =inverse(e, phi)m =pow(c,d,N)print(long_to_bytes(m))
The flag is small enough(423 bits only). Thus we can use only one prime to solve this challenge!
>>> p =17902191503504318692492983181426479429129629402134322300932089073264193457312369235124051377038134553831711933113892211853965031666242480894505639132083095732409489783116318887702080377870202003301132065524001196532617092648243286550077159288426540457737782791405867895087690277872066304450383159289357492536640408232982423825180176573357771141517406466778108221707215067133195792273142653043249649291323921761563788491853484825750598328567783413153944297865943407526067428565461515399561267445081195095300514755593450420493237997272435459140171292735803019836543947409733063944596031206583742779877774484876687058741>>> phi = (p-1)>>> e =65537>>> d =inverse(e,(p-1))>>>long_to_bytes(pow(c,d,p))b'TMUCTF{Y35!!!__M4Y_N0t_4lW4y5_N33d_4ll_p21M3_f4c70R5}'