关于substr的错误使用-女黑客-必火安全学院

女黑客

 找回密码
 立即注册

QQ登录

只需一步,快速开始

关于substr的错误使用

[复制链接]
发表于 2017-8-19 19:48:07 | 显示全部楼层 |阅读模式
  1. <?php
  2. $name = substr(addslashes($_GET['name']),1);
  3. $sql = "select * from users where username = '$name' limit 1";
  4. echo $sql;
  5. ?>
复制代码
浏览器访问:http://localhost/magic_quotes_gpc.php?order_sn=' and 2*3=6  -- +
程序返回
  1. select * from users where username = '' and 2*3=6 -- ' limit 1
复制代码

即可构造注入
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|女黑客 |网站地图

© Copyright 2021 版权所有(一极教育科技有限公司)

津ICP备17008032号-3
快速回复 返回顶部 返回列表