ctf之py反编译求p*q%n==1
生活随笔
收集整理的這篇文章主要介紹了
ctf之py反编译求p*q%n==1
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
拿到一個(gè)pyc反編譯,分析了一下,要求t1,t2,t3
from flag import t1, t2, t3 N = 91080783459224114417419735848141602413276894709356670475166857901383529276788422992031159L s1 = 11411269144987772222786703496950992585276983184692849555141859373112423610294869112786252L s2 = 58599619676130565690598871824198278116020685570207351127154648707502599199944142046246402L s3 = 65974795812758987659130564760412992885703783478354682873750151867682024151063561297876490L if s1 * t1 % N != 1:exit() if s2 * t2 % N != 1:exit() if s3 * t3 % N != 1:exit() flag = hex(t1 + t2 + t3)[2:-1].decode('hex') print flag已知s1*t1%N==1,求t1,這其實(shí)是個(gè)數(shù)論問(wèn)題,t1=ModReverse(s1,N)
鏈接:https://blog.csdn.net/CosmopolitanMe/article/details/78948011
解題代碼:
總結(jié)
以上是生活随笔為你收集整理的ctf之py反编译求p*q%n==1的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: FSG2.0脱壳记录
- 下一篇: *ctf box题解