B2Bbuilder最新版sql注入

咱们看到到modulebuyadminadd_cart.php   1 2 3 4 5 6 7 8 9...

咱们看到到modulebuyadminadd_cart.php

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if(!empty($_POST["cat"])&&!empty($_GET["id"]))
{        
        $ext_table=$config['table_pre'].'defind_'.$_POST['ext_field_cat'];
        $_POST['ext_field_cat']*=1;
        
        if($_POST['pid']!=0)
        {
                if($_POST["pid"]!==substr($_GET['id'],0,strlen($_GET['id'])-2))
                {
                        $s=$_POST["pid"]."00";
                        $b=$_POST["pid"]."99";
                        $sql="select max(catid) as catid from $cat_table where catid>$s and catid<$b";
                        $db->query($sql);
                        $re=$db->fetchRow();
                        $id=$re["catid"];
                        if(!$id)
                                $id=$_POST["pid"]."01";
                        else
                                $id=$id+1;
                }
                else
                        $id=$_GET['id'];
                //修改当时类别信息
                $sql="update $cat_table set catid='$id', cat='".$_POST['cat']."',isindex='".$isindex."'
                        ,pic='$_POST[pic]',brand='$_POST[brand]',ext_table='$ext_table',ext_field_cat='$_POST[ext_field_cat]',template='$_POST[template]' where catid='".$_GET['id']."'";
                $re=$db->query($sql);
                //假如当时类别下面带有子类别把子类别一同移过去
                $s=$_GET['id']."00";
                $b=$_GET['id']."99";
                $sql="update $cat_table set catid=replace(catid,$_GET[id],$id) where catid>=$s and catid<=$b";
                $re=$db->query($sql);
        }

[1] [2] [3]  黑客接单网

  • 发表于 2021-04-13 08:20
  • 阅读 ( 242 )
  • 分类:互联网

0 条评论

请先 登录 后评论
周晴
周晴

718 篇文章

你可能感兴趣的文章

相关问题