출처: http://vallista.tistory.com/entry/Syntax-Highlighter-티스토리에서-코드-이쁘게-넣기 [VallistA]>

posted by ddanss 2019. 9. 23. 22:04
728x90

import string

N = 22211149480575639993429030519324903433947913532364781040868963328192510711356813047019777682976897694523708823502748768149007288902843985412808705624398873301639600888468250478096471710461804856036409585519537946352413960371213677893523940481424813184421465313214067723492301317054407961642320909213358344993453825109139928083868146685834149311590508677641684185974469669019522897333475910002506624356655715375691861599282035176111228787146595035293770294934083506588432931535561733381730924617763450268288785249430304809062568532772866407535937947253602671915278827388538023000320823892308918791287865032550658101647
e = 65537
c = 17092019895398435490936645877681389522100314381280314137324590582626113380519883878346612680436149571504342956062627199254592419000136198748264157134720216337534802137245374257104787163473593768075381161119603573787923015405105192411372689756878820005036480013443173993126005361536816259899310244534769833694660355126920566669139672444357708161337389888825104348833002955918763849005061351140425567156148202269336347554989169075541289307981444741551677799416273481457219933391047628725337828725080079301570909831609401028488393457876225318163558871115320155827798534306397644894097358075465535794590825299057956641732

N,e,c를 이렇게 주는데

찾아보니 간단한 문제는

python RsaCtfTool -n 58900433780152059829684181006276669633073820320761216330291745734792546625247 -e 65537 --uncipher 56191946659070299323432594589209132754159316947267240359739328886944131258862

이런식으로도 풀어진다고 한다.

그런데 내껀 n,c가 너무크다...

그래서 다른 생각을 해보았다 ㅠㅠㅠ

결국 안풀렸는데 바킹독님 라방에서 슬쩍 풀어주셨따 희희

감사합니다링


for c1 in string.ascii_lowercase:
    print("now c1 is " + c1)
    for c2 in string.ascii_lowercase:
        for c3 in string.ascii_lowercase:
            for c4 in string.ascii_lowercase:
                m=int.from_bytes(('nactf{'+c1+c2+c3+c4+'}').encode(), byteorder='big')
                if pow(m,e,N)==c:
                    print('nactf{'+c1+c2+c3+c4+'}')

반응형

'ctf 및 여러가지 문제들 > 기타등등' 카테고리의 다른 글

angstormCTF 2020 - Patcherman  (0) 2020.03.15
nactf - format #0  (0) 2019.09.24
nactf - cryptography - Reversible Sneaky Algorithm #0  (0) 2019.09.21
nactf - keygen  (0) 2019.09.19
HackingcampCTF - SimpleREV  (0) 2019.08.30