<?php
error_reporting(0);
$zero=$_REQUEST['zero'];
$first=$_REQUEST['first'];
$second=$zero.$first;
if(preg_match_all("/Yeedo|wants|a|girl|friend|or|a|flag/i",$second)){
$key=$second;
if(preg_match("/\.\.|flag/",$key)){
die("Noooood hacker!");
}else{
$third=$first;
if(preg_match("/\\|\056\160\150\x70/i",$third)){
$end=substr($third,5);
highlight_file(base64_decode($zero).$end);//maybe flag in flag.php
}
}
}
else{
highlight_file(__FILE__);
}
看着这里要传入量参数zero和first,并提示flag有可能在flag.php中
second为zero和first的合并
但是要传入的second要含有字段/Yeedo|wants|a|girl|friend|or|a|flag/i中的一个
进入后又不能被测出含有flag
这里要匹配到关键词才能返回true
这里有个有趣的地方
preg_match("/\\|\056\160\150\x70/i",$third)
这里的\\|代表的是\|,即|字符本身,所以要求first中含有字段|.php字符
最终zero为ZmxhZw==
而first为girl|.php