观察代码可知,要从n中分离出p,q 使用http://factordb.com/index.php?输入n值得到p
,q然后使用脚本正常解题得到flagNSSCTF{no_why}
from gmpy2 import *
from Crypto.Util.number import *
p = 7221289171488727827673517139597844534869368289455419695964957239047692699919030405800116133805855968123601433247022090070114331842771417566928809956044421
q = 7221289171488727827673517139597844534869368289455419695964957239047692699919030405800116133805855968123601433247022090070114331842771417566928809956045093
flag= 10227915341268619536932290456122384969242151167487654201363877568935534996454863939953106193665663567559506242151019201314446286458150141991211233219320700112533775367958964780047682920839507351492644735811096995884754664899221842470772096509258104067131614630939533042322095150722344048082688772981180270243
e = int(0x10001)
n = p*q
phi = (p - 1) * (q - 1)
d = invert(e,phi)
plaintext = powmod(flag , d , n)
print(long_to_bytes(plaintext))