当前位置:网站首页>Infiltration learning - problems encountered during SQL injection - explanation of sort=left (version(), 1) - understanding of order by followed by string
Infiltration learning - problems encountered during SQL injection - explanation of sort=left (version(), 1) - understanding of order by followed by string
2022-06-27 22:28:00 【dfzy$_$】
Problem scenario :
This is mainly to explain some problems encountered in my shooting range , That is to say sqllibs Of Less46 Off use sort=left(version(),1) The reason why it can still be echoed normally , And right order by Followed by a string varchar Character types can also be interpreted normally .
Cause analysis :
Yes left This function is in order by After the explanation :
First , Here is the main explanation left(version(),1) Here means to take from the left version() First digit of value , in other words version()=5.7.26 Words , that left This will be equal to 5.
And here's the thing to note , The resulting value here , When placed in order by Then there is a string type ( namely varchar type ), That is to say, it is equivalent to order by “5” In this form . therefore , Whether it's mid left still right All that comes out is “ String of numeric content ”, Sorting it still uses character rules , Will not get the result we want .
Yes order by Understanding of the following string :
Suppose we take order by "5" To execute , that mysql Will literally mean “ By number 5 Sort ”, Instead of sorting by the fifth column in the table (order by 5 It means sorting by the fifth column ).
If you are sorting by character rules , This is not going to happen MySQL( Unless some versions are improved ) Generate the correct sort in , Except by chance . If nothing else is done ( Such as addition, deletion and modification ) Words , This will be sorted according to the sort table in the disk ( That is, the order in which data is read from the disk . This should be determined by the default read mode of the file system or disk ).
That is, no matter what you type in the string , Sorting is basically the default .
Input "5":
Input "less38"
Input 1
Input left(version(),1):
As can be seen from the above , No matter what string you enter , The sorting is the same , because order by Sorting by character set is invalid ,mysql At this point, the disk order table will be sorted by default .
Conclusion
That's what I understand , If there is any mistake, please point it out !!!
边栏推荐
- Yarn中RMApp、RMAppAttempt、RMContainer和RMNode状态机及其状态转移
- Crontab scheduled task common commands
- Open source technology exchange - Introduction to Chengying, a one-stop fully automated operation and maintenance manager
- 对话乔心昱:用户是魏牌的产品经理,零焦虑定义豪华
- Management system itclub (medium)
- 不外泄的测试用例设计秘籍--模块测试
- 软件测试自动化测试之——接口测试从入门到精通,每天学习一点点
- 軟件測試自動化測試之——接口測試從入門到精通,每天學習一點點
- Common problems encountered by burp Suite
- 【mysql实战】查询语句实战演示
猜你喜欢

Codeforces Round #716 (Div. 2)

Go from introduction to actual combat - task cancellation (note)

Professor of Tsinghua University: software testing has gone into a misunderstanding - "code is necessary"

Experience sharing of meituan 20K Software Test Engineers

登录凭证(cookie+session和Token令牌)

average-population-of-each-continent

管理系統-ITclub(下)

Stm32f107+lan8720a use stm32subemx to configure network connection +tcp master-slave +udp app

信通院举办“业务与应用安全发展论坛” 天翼云安全能力再获认可

Dialogue with Qiao Xinyu: the user is the product manager of Wei brand, and zero anxiety defines luxury
随机推荐
regular expression
OpenSSL programming I: basic concepts
Where can I set the slides on the front page of CMS applet?
VMware virtual machine PE startup
Matlab finds the position of a row or column in the matrix
6G显卡显存不足出现CUDA Error:out of memory解决办法
Deep learning has a new pit! The University of Sydney proposed a new cross modal task, using text to guide image matting
二维数组中修改代价最小问题【转换题意+最短路径】(Dijkstra+01BFS)
Yolov6: the fast and accurate target detection framework is open source
Use Fiddler to simulate weak network test (2g/3g)
大厂常用软件测试面试题三(附答案)
[LeetCode]508. The most frequent subtree elements and
软件缺陷管理——测试人员必会
正则表达式
MONTHS_BETWEEN函数使用
如何做好功能测试?你确定不想知道吗?
[LeetCode]161. Edit distance of 1
Codeforces Round #716 (Div. 2)
PCIe knowledge point -008: structure of PCIe switch
MONTHS_ Between function use