1

I'm trying to dump using sqlmap, I have 3 columns: name, lastname, userid with 9000 entries in each.

When I just --dump the table, it will start from 1 to 9000.

I don't want all the 9000, how can I tell it to start from 5000 and stop at 9000?

I tried the --start= and --stop= but it didn't help.

  • 1
    You can use --sql-query to specify an ordinary SQL statement. – Arminius Aug 21 '17 at 21:30
  • Could you give me an example please? – sivi109 Aug 21 '17 at 21:37
  • @sivi109 --sql-query="SELECT * FROM table LIMIT 4000 OFFSET 5000"? – Mark Buffalo Aug 21 '17 at 22:39
1

--sql-query

Like Arminius said, you can use --sql-query to specify an ordinary SQL statement. Provided you know the table/database name, you could use something like this:

--sql-query="use db; SELECT * FROM table OFFSET 5000 ROWS FETCH NEXT 4000 ROWS ONLY;"

That would only work on SQL Server 2012 and above. For earlier versions, you'll need something like ROW_NUMBER().

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.