Skip to content

Commit

Permalink
fix 0823
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntu committed Aug 23, 2019
1 parent 141beb1 commit 2efcbe6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion copperstudy2.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,34 @@ def c4():
[+]n=92896523979616431783569762645945918751162321185159790302085768095763248357146198882641160678623069857011832929179987623492267852304178894461486295864091871341339490870689110279720283415976342208476126414933914026436666789270209690168581379143120688241413470569887426810705898518783625903350928784794371176183
\n[+]e=3
\n[+]m=random.getrandbits(512)
\n[+]n1=23419685303892339080979695469481275906709035609088426118328601771163101123641599051556995351678670765521269546319724616458499631461037359417701720430452076029312714313804716888119910334476982840024696320503747736428099717113471541651211596481005191146454458591558743268791485623924245960696651150688621664860
\n[+]c1=pow(m,e,n2)=2519188594271759205757864486234199030368509477419996746572813835802776507456368520243429255706508061522045
\n[+]n2==72080679612442543693944655041130370753964497034378634203383617624269927191363529233872659451561571441107920350406295389613006330637565645758727103723546610079332161151567096389071050158035757745766399510575237344950873632114050632573903701015749830874081198250578516967517980592506626547273178363503100507676
\n[+]c2=pow(m,e,n3)=78642188663937191491235684351005990853149481644703243255021321296087539054265733392095095639539412823093600710316645130404423641473150336492175402885270861906530337207734106926328737198871118125840680572148601743121884788919989184318198417654263598170932154428514561079675550090698019678767738203477097731989
\n[+]n3=91638855323231795590642755267985988356764327384001022396221901964430032527111968159623063760057482761918901490239790230176524505469897183382928646349163030620342744192731246392941227433195249399795012672172947919435254998997253131826888070173526892674308708289629739522194864912899817994807268945141349669311
\n[+]c3=pow(m,e,n3)=98174485544103863705821086588292917749386955237408645745685476234349659452606822650329076955303471252833860010724515777826660887118742978051231030080666542833950748806944312437614585352818344599399156268450521239843157288915059003487783576003027303399985723834248634230998110618288843582573006048070816520647
\n[-]long_to_bytes(m).encode('hex')=
''')
buf = raw_input(BUFSIZE).replace('\n', '')
if buf == 'FLAG{2^8rsa5ab086745f6ec745619a8b65fe4ec560}'.encode('hex'):
#if buf == 'FLAG{2^8rsa5ab086745f6ec745619a8b65fe4ec560}'.encode('hex'):
if buf == 'FLAG{2^8rsa8c5f3cff4bc095349fec65fc2263e878}'.encode('hex'):
print('challenge4 completed\n')
else:
print('bye~')
Expand Down

0 comments on commit 2efcbe6

Please sign in to comment.