For SQL injection and defense, having 1 = 1, sqlhaving

Source: Internet
Author: User

For SQL injection and defense, having 1 = 1, sqlhaving

The latest version of SQL injection and defense is shown on the 32nd page. Note: It is used to display information about statements executed by the database, such as having 1 = 1.

My database: mysql

Version: 5.1.66

Run: select * from aa where id = 2 having 1 = 1; -- convert the injection into the actual SQL statement.

Result: The result is correct.

Certificate --------------------------------------------------------------------------------------------------------------------------------------------------

Database: SQL server

When running the preceding SQL statement, the error message is "group by IS MISSING ". It can be seen that at least in the current mysql database, the execution information of the database cannot be obtained through this method.

 

Certificate ---------------------------------------------------------------------------------------------------------------------------------------------------

This involves: Which functions in mysql must exist at the same time. At least the SQL statements that are constructed are not plenary, leading to server errors.

 

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.