0

I am fairly new to sql injections and tried to solve a little hackit to understand everything better. I wasn't able to solve one of the levels so I ran sqlmap to see what it would do. The payloads that I got looked a bit like this

http://some-hackit.com/sqli/level4.php?id=0'+or+ascii(substring((select+smth+from+something+limit+0,1),1,1))=120+and+'1'+'1

I don't really understand what and+'1'+'1 is doing. As soon as I add this part to all of my other injections they suddenly work and I am able to solve the hackit. I tried to search for explanations online, but didn't find anything. I would really appreciate it if someone on here could maybe explain it to me.

Edit: While playing around with the payload I noticed that simply adding +and+'1 has the same effect. All of my injections suddenly work. Furthermore, it doesn't even have to be the number 1. Any number works as long as I put an apostrophe in front. However, I still don't understand what is happening here.

cybel
  • 111
  • 3

0 Answers0