当前位置:网站首页>In SQL injection, why must the ID of union joint query be equal to 0
In SQL injection, why must the ID of union joint query be equal to 0
2022-07-02 09:41:00 【hangshao0.0】
In fact, it is not necessary to let id=0
?id=0' union select 1,2,3 --+ ?id=0' union select 1,database(),3 --+
?id=0' union select 1,database(),user() --+

there id Special attention is needed :
If there are only two echo positions
that id You must fill in a nonexistent number (-1 perhaps 0), Joint query can echo successfully
Because in the data table ,id by 1,2,3,……
If the parameter is :?id=1' union select 1,2,3 --+
So the query statement is :select * from users where id='1' union select 1,2,3 --+' limit 0,1
id=1 The data is queried , Return to page , It occupies two echo positions 
This is the time , union The content of the query , Because the only two echo bits are occupied , It makes it impossible to echo
If id=2, The returned content will also occupy the echo bit , Lead to union The content of the query cannot be echoed to the page 
If id Is a number that does not exist in the table , for example id=0,id=-1 wait
So the query statement is :select * from users where id='0' union select 1,2,3 --+' limit 0,1
because id=0 No query results , So the page returns union The content of the query 
You don't have to let id=0
Actually id=-1,id=-5 It's OK to wait

therefore , We can know :
as long as union The previous query failed , that union The following query results can be echoed to the page
id=1’ and 1=2 union select 1,2,3 –+ adopt and 1=2 Statement to trigger an error
id=1’ or 1=1 union select 1,2,3 –+ adopt or 1=1 Statement to trigger an error

边栏推荐
- 图像识别-数据增广
- C language programming problems
- Inverter Simulink model -- processor in the loop test (PIL)
- Learn combinelatest through a practical example
- YOLO物体识别,生成数据用到的工具
- 2837xd code generation - Summary
- Insight into cloud native | microservices and microservice architecture
- Bugkuctf-web16 (backup is a good habit)
- Matplotlib swordsman - a stylist who can draw without tools and code
- Difference between redis serialization genericjackson2jsonredisserializer and jackson2jsonredisserializer
猜你喜欢

2837xd 代码生成——补充(3)

Operation and application of stack and queue

2837xd 代码生成——补充(1)

Creation and jump of activity

2837xd code generation - Summary

Bugkuctf-web21 (detailed problem solving ideas and steps)

Break the cocoon | one article explains what is the real cloud primordial

自定義Redis連接池

How to use PHP spoole to implement millisecond scheduled tasks

2837xd 代码生成——StateFlow(3)
随机推荐
Chrome视频下载插件–Video Downloader for Chrome
2837xd 代码生成——总结篇
Tools used for Yolo object recognition and data generation
Timed thread pool implements request merging
Thinkphp5 how to determine whether a table exists
Insight into cloud native | microservices and microservice architecture
Chrome user script manager tempermonkey monkey
Chrome browser tag management plug-in – onetab
hystrix 实现请求合并
Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)
Ckeditor 4.10.1 upload pictures to prompt "incorrect server response" problem solution
保存视频 opencv::VideoWriter
How to use PHP spoole to implement millisecond scheduled tasks
PI control of three-phase grid connected inverter - off grid mode
2837xd 代码生成——StateFlow(4)
C语言之做木桶
JVM instruction mnemonic
上班第一天的报错(AWVS卸载不彻底)
Image recognition - Data Acquisition
Cmake command - Official Document