Blogger Information
Blog 1
fans 0
comment 0
visits 635
Related recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
ctf题目
Xmmmmm0
Original
635 people have browsed it


实例

<?php
  class SoFun{ 
    protected $file='index.php';
    function __destruct(){
        if(!empty($this->file)) 
        {
            //查找file文件中的字符串,如果有'\\'和'/'在字符串中,就显示错误
            if(strchr($this->file,"\\")===false &&  strchr($this->file, '/')===false)
            {
                show_source(dirname (__FILE__).'/'.$this ->file);
            }
            else{
                    die('Wrong filename.');
                }
        }
    }
    function __wakeup()
    { 
        $this-> file='index.php';
    } 
    public function __toString()
    {
        return '';
    }
    }     
    if (!isset($_GET['file']))
    { 
        show_source('index.php'); 
    } 
    else{ 
       $file=base64_decode( $_GET['file']); 
       echo unserialize($file ); 
    } 
?>  #<!--flag in flag.php-->

运行实例 »

点击 "运行实例" 按钮查看在线实例

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post