fork download
  1. from Crypto.Util.number import *
  2. import random
  3. flag = bytes_to_long(b'CTF{???}')
  4.  
  5. while 1:
  6. a,b = random.randint(1,2**64), random.randint(1,2**64)
  7. p = a**5 + 31*a + 1337
  8. q = b**5 + 31*b + 1337
  9. if isPrime(p) and isPrime(q):
  10. break
  11.  
  12. n = p*q
  13. print(pow(flag,0x10001, n))
  14. print(n)
  15. '''
  16. 299283280172784388002621777143112508232897482235938239132301676724645760470709838176572583363898894557257969776348582219682371374315371761439454132629047176255194022346550472893345926373575
  17. 364630360821816958168159121172891438234154150910237507963558450347599753587713740340051298831730101264902452950320017666816377883225135609621929933304121406114748546253948502696206562238293
  18. '''
Success #stdin #stdout 0.27s 11860KB
stdin
Standard input is empty
stdout
204507009159283654462542086999939438358559110660356574722028468226135261819998782597827040804775517742821352029382652565468136042983081338945779426377231654084052899283426395022541948557
553934442531245483109580734543249059225197461382524664073551608453475773958581912344893376273772758955223251770332129728658698258625028158424447882758651702137113648979876124457484890809