在MySQL中选择带有索引的列的输出是什么?

我已经进行了一段时间的SQL注入。在这个过程中,我找到了一篇文章,我可以说是关于基于错误的SQL注入的最佳文章。

https://www.hackingarticles.in/beginner-guide-sql-injection-part-1/?unapproved=131901&moderation-hash=e3888f15366f6326c49a0205a79a6d70#comment-131901

他在本文中对所有内容进行了精美的解释。但是我听不懂一小段代码。那就是

http://localhost/sqli/Less-1/?id=-1' union select 1,2,3 --+
Or
http://localhost/sqli/Less-1/?id=15' union select 1,3 --+

输出为

sql injection

在此输出为

您的登录名是2

您的密码是3。

我认为当我们选择带有索引的列时,输出仅是其列号。我错了吗?

whj901180 回答:在MySQL中选择带有索引的列的输出是什么?

不,您是正确的。

http://localhost/sqli/Less-1/?id=-1' union select 1,2,3 --+
Or
http://localhost/sqli/Less-1/?id=15' union select 1,3 --+
您提到的

查询正在按索引选择列,但是它显示的是与数据库中哪一列相关的字段(即loginname2password3)。

本文链接:https://www.f2er.com/3116610.html

大家都在问