Sqli-labs Customs Record-2

Source: Internet
Author: User

At this level, I learned

1. The error of the program is not the school charges, the single quotation mark error and the minus sign error to understand

Single quotation mark error.

I tried the payload with the first pass.

To see the source code:

Then the SQL that we construct becomes

$sql = "SELECT * from Users WHERE id=1 ' or 1=1--+ LIMIT 0,1";

So that id=1 ' is not executed, and the statement becomes:

$sql = "or 1=1--+ limit 0,1";

Test it with MySQL, for example. That's true!

Then single quotation mark does not change the minus sign, is the minus sign Bai.

It's natural to be able to do it again.

The complete SQL statement is as follows:

$sql = "SELECT * from users WHERE id=-1 or 1=1--+ LIMIT 0,1";

The final MySQL statement executed is:

SELECT * from users where 1=1--+ limit 0, 1; the clause is a valid SQL statement that can be executed successfully.

What you need to understand here is the concept of single-quote errors and negative sign errors .

Single quote error refers to syntax error

The negative sign is the error that is prompted because it does not exist

So know the reason so continue to operate ha.

Sqli-labs Customs Record-2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.