【发布时间】:2019-12-10 04:50:15
【问题描述】:
我正在做一些 sqli 挑战(overthewire.org,natas Web 应用程序挑战),在其中一个 sqli 挑战中我遇到了以下问题。
当我比较 substr(password,1,1)="a" 时,它会忽略大小写。比如
Select * from users where username="user" and substr(password,1,1)='a'
将是真实的,所以将是
Select * from users where username="user" and substr(password,1,1)='A'
如果我使用
`Select * from users where username="user" and ascii(substr(password,1,1))=ascii('a')`
反而一切正常。
有人知道为什么要这样实施吗?这是默认的mysql行为吗? 最好的
【问题讨论】:
-
谢谢,后面的基本上就是我要找的答案了。
标签: mysql sql sql-injection