Does anyone know what something like OR 1# means in the context of mysql injection?
Does anyone know what something like OR 1# means in the context of mysql
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is MySQL’s version of the line comment delimiter. In standard SQL, the line comment delimiter is
--.So in the context of SQL injection, if the attacker knows you’re using MySQL he may use it to abruptly terminate the malicious SQL statement, causing MySQL to ignore whatever is behind the
#and execute only the stuff that comes before it. This is only effective against single-line SQL statements, however. Here’s an example:Input:
Resultant SQL:
Which is executed as this, which returns every row: