VPS侦探论坛

 找回密码
 注册
查看: 5200|回复: 0

跨站漏洞和代码注入漏洞

[复制链接]
发表于 2013-4-18 12:39:37 | 显示全部楼层 |阅读模式

阿里云检测的如图
<code>
<?php
set_time_limit(0);
$prescription = htmlspecialchars($prescription);
$prescription = trim($_GET['q']);
$id = intval($_GET['id']);
$r_num = 0; //结果个数
$lan = 3;
$pf = "";
$pf_l = "";
if($prescription!=""){
        $dreamdb=file("data/yf.dat");//读取验方文件
        $count=count($dreamdb);//计算行数
        for($i=0; $i<$count; $i++) {
                $keyword=explode(" ",$prescription);//拆分关键字
                $dreamcount=count($keyword);//关键字个数
                $detail=explode("\t",$dreamdb[$i]);
                for ($ai=0; $ai<$dreamcount; $ai++) {
                        @eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[0]\");");
                        if(($found)){
                                if(fmod($r_num,$lan)==0) $pf_l .= "<tr>";
                                $pf_l .= '<td width="'.(100/$lan).'%"><img src="/img/jiantou.gif" /> <a href="?id='.($i+1).'">'.$detail[0].'</a></td>';
                                if(fmod($r_num,$lan)+1==$lan) $pf_l .= "</tr>";
                                $r_num++;
                                break;
                        }
                }
        }

</code>
我不懂php,请大神看看,红色部分是自己照着改的

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-24 11:31 , Processed in 0.038545 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表