Question

For a school project I need to hack a database (made by the school for practice) and I have to retrieve all the rows of a specific column via SQL-Injection. I have been provided the column and table name.

Here is my example query that needs help.

bla' union all select 2, DefaultCreditCardNumber,5,6 from buyer#

This will retrieve only 1 row each time I enter the query. Is it possible to get all the rows at once? If so how?

Was it helpful?

Solution

Unless the queries results are not printed in a loop you can not get all rows at once.

You need to get the data row by row:

bla' union all select 2, DefaultCreditCardNumber,5,6 from buyer LIMIT n,1#

Where n is the index of the row (0, 1, 2, ...)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top