当前位置:网站首页>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
边栏推荐
- 上班第一天的报错(Nessus安装winpcap报错)
- Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)
- 一次聊天勾起的回忆
- 企业级SaaS CRM实现
- MySQL事务
- web安全与防御
- vs+qt 设置应用程序图标
- 2837xd 代碼生成——StateFlow(4)
- Off grid control of three-phase inverter - PR control
- Read Day5 30 minutes before going to bed every day_ All key values in the map, how to obtain all value values
猜你喜欢
FragmentTabHost实现房贷计算器界面
Chrome browser tag management plug-in – onetab
2837xd 代码生成——StateFlow(4)
DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
c语言编程题
自定义Redis连接池
Required request body is missing: (cross domain problem)
JDBC回顾
MySQL default transaction isolation level and row lock
Insight into cloud native | microservices and microservice architecture
随机推荐
道阻且长,行则将至
Timed thread pool implements request merging
记录一下初次使用Xray的有趣过程
自定义Redis连接池
QT QLabel样式设置
并网逆变器PI控制(并网模式)
BugkuCTF-web21(详细解题思路及步骤)
每天睡觉前30分钟阅读_day4_Files
Kinect DK obtains color RGB images in cv:: mat format (used in openpose)
C语言之做木桶
Solutions to Chinese garbled code in CMD window
分布式锁的这三种实现方式,如何在效率和正确性之间选择?
Statistical learning methods - Chapter 5, decision tree model and learning (Part 1)
Tinyxml2 reading and modifying files
PI control of three-phase grid connected inverter - off grid mode
图像识别-数据采集
别找了,Chrome浏览器必装插件都在这了
Fragmenttabhost implements the interface of housing loan calculator
tinyxml2 读取和修改文件
Required request body is missing:(跨域问题)